From 4a5020043dca2f6d0af071b054cf69534c85ab6f Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Sat, 1 Jan 2022 15:16:12 +0000 Subject: [PATCH] add a rescue iso usb build, make /tmp tmpfs, getty chaoticryptidz on lappy --- hosts/default.nix | 6 ++++++ hosts/lappy/lappy.nix | 6 ++++++ hosts/rescue/rescue.nix | 44 +++++++++++++++++++++++++++++++++++++++++ profiles/base/boot.nix | 1 + 4 files changed, 57 insertions(+) create mode 100644 hosts/rescue/rescue.nix create mode 100644 profiles/base/boot.nix diff --git a/hosts/default.nix b/hosts/default.nix index 7f2dc5c..c75bbad 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -17,6 +17,12 @@ in { modules = defaultModules ++ [ ./lappy/lappy.nix ]; }; + rescue-x86_64 = nixpkgs.lib.nixosSystem { + specialArgs = defaultSpecialArgs; + system = "x86_64-linux"; + modules = defaultModules ++ [ ./rescue/rescue.nix ]; + }; + hetzner-vm = nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs; system = "x86_64-linux"; diff --git a/hosts/lappy/lappy.nix b/hosts/lappy/lappy.nix index 0db33a0..be5ecd2 100644 --- a/hosts/lappy/lappy.nix +++ b/hosts/lappy/lappy.nix @@ -41,6 +41,12 @@ ]; }; + services.getty.extraArgs = [ + "--skip-login" + "--login-options" + "chaoticryptidz" + ]; + networking.firewall.enable = true; # let vscode, vivaldi, etc work. security.unprivilegedUsernsClone = true; diff --git a/hosts/rescue/rescue.nix b/hosts/rescue/rescue.nix new file mode 100644 index 0000000..7a34644 --- /dev/null +++ b/hosts/rescue/rescue.nix @@ -0,0 +1,44 @@ +{ tree, modulesPath, config, pkgs, lib, ... }: + +{ + imports = with tree; [ + users.root + users.chaoticryptidz + profiles.base + profiles.gui + profiles.network_manager + profiles.sway + profiles.tor + (modulesPath + "/installer/cd-dvd/installation-cd-base.nix") + ]; + + home-manager.users.root = { imports = with tree; [ home.base ]; }; + home-manager.users.chaoticryptidz = { + imports = with tree; [ + home.base + home.gui + home.dev + home.network_manager + home.sway + home.apps.vivaldi + home.programming + home.programming.languages.nix + ]; + }; + + users.users.chaoticryptidz.initialPassword = ""; + + # let vscode, vivaldi, etc work. + security.unprivilegedUsernsClone = true; + + networking = { + hostName = "rescue"; + networkmanager.enable = true; + wireless.enable = lib.mkForce false; + }; + + time.timeZone = "Europe/London"; + + system.stateVersion = "21.11"; +} + diff --git a/profiles/base/boot.nix b/profiles/base/boot.nix new file mode 100644 index 0000000..8154545 --- /dev/null +++ b/profiles/base/boot.nix @@ -0,0 +1 @@ +{ ... }: { boot.tmpOnTmpfs = true; }