diff --git a/hosts/alice/default.nix b/hosts/alice/default.nix index 8934337..c7ee472 100644 --- a/hosts/alice/default.nix +++ b/hosts/alice/default.nix @@ -1,8 +1,8 @@ { agenix, + disko, home-manager, lix-module, - nixos-hardware, nur, pkgs, ... @@ -11,11 +11,13 @@ ./hardware-configuration.nix ./system.nix agenix.nixosModules.default + disko.nixosModules.disko home-manager.nixosModule lix-module.nixosModules.default nur.nixosModules.nur ./borg.nix + ./disk-config.nix ./gdm.nix ./pipewire.nix ./printer.nix diff --git a/hosts/alice/disk-config.nix b/hosts/alice/disk-config.nix new file mode 100644 index 0000000..c7cefe0 --- /dev/null +++ b/hosts/alice/disk-config.nix @@ -0,0 +1,40 @@ +{ + disko.devices = { + disk.main = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + esp = { + name = "esp"; + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; + luks = { + size = "100%"; + label = "luks"; + content = { + type = "luks"; + name = "crypted"; + settings = { + allowDiscards = true; + }; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/alice/hardware-configuration.nix b/hosts/alice/hardware-configuration.nix index ba9f0e0..5186dde 100644 --- a/hosts/alice/hardware-configuration.nix +++ b/hosts/alice/hardware-configuration.nix @@ -19,20 +19,6 @@ extraModulePackages = []; }; - fileSystems."/" = { - device = "UUID=288cfd6e-dd6d-4ac4-bc2f-36c1309f8619"; - fsType = "bcachefs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/6029-DD49"; - fsType = "vfat"; - }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/62a6b7a0-413a-46e8-bf6f-aba4eedf06a9";} - ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction