diff --git a/README.md b/README.md index 2b22eae..b3bee88 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,17 @@ ## Start a NixOS setup with Impermanence 1. Create the configuration with the template - `nix flake init --template https://github.com/Krezzlu/impermanence-talk#default --extra-experimental-features "nix-command flakes"` -2. Change the template to your liking. - Specifically the `disko.nix` file. -3. `nix develop --extra-experimental-features "nix-command flakes"` -4. `sudo disko --mode disko ./systems/desktop//disko.nix` + `nix-shell -p git` + `nix flake new nixos --template git+https://git.krsnik.at/Kristian/impermanence-talk#default --extra-experimental-features "nix-command flakes"` + `cd nixos` + `nix develop --extra-experimental-features "nix-command flakes"` + `[CHANGE SETTINGS]` + `sudo disko --mode disko ./systems/disko.nix` + `[ENTER PASSWORD FOR ENCRYPTION]` + `cd ..` + `sudo mv nixos /mnt/persist` + `cd nixos /mnt/persist/nixos` + + `sudo nixos-generate-config --no-filesystems --force --root /mnt --dir ./system` + `sudo nixos-install --no-root-password --root /mnt --flake .#default` + diff --git a/template/flake.nix b/template/flake.nix index f75a52c..86d3213 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -26,18 +26,15 @@ modules = [ inputs.disko.nixosModules.default - { - imports = [ - (import ./system/disko.nix {}) - ]; - } + # { + # imports = [ + # (import ./system/disko.nix {}) + # ]; + # } inputs.impermanence.nixosModules.impermanence ./system - { - system.stateVersion = "23.11"; - } ]; }; }; diff --git a/template/libs/default.nix b/template/libs/default.nix index d020575..797c6d1 100644 --- a/template/libs/default.nix +++ b/template/libs/default.nix @@ -3,6 +3,7 @@ device ? throw "Missing required argument device. (e.g. /dev/sda)", swapCapacity ? throw "Missing required argument swapCapacity. (e.g. 16G)", ssd ? false, + efi ? true, ... }: { disko.devices = { @@ -14,8 +15,14 @@ type = "gpt"; partitions = { "esp" = { - size = "512M"; - type = "EF00"; + size = + if efi + then "512M" + else "1M"; + type = + if efi + then "EF00" + else "EF02"; content = { type = "filesystem"; format = "vfat"; diff --git a/template/system/custom/default.nix b/template/system/custom/default.nix index 479f18a..bb2a37f 100644 --- a/template/system/custom/default.nix +++ b/template/system/custom/default.nix @@ -27,6 +27,7 @@ mutableUsers = false; # Disallow creation of new users and groups users."admin" = { + password = "changeme"; # TODO: Maybe put a throw here. isNormalUser = true; extraGroups = ["wheel"]; };