diff --git a/flake.lock b/flake.lock index 5a980c0..80f869d 100644 --- a/flake.lock +++ b/flake.lock @@ -13,11 +13,11 @@ ] }, "locked": { - "lastModified": 1714761715, - "narHash": "sha256-93OkwjiNGhmT0k2kAOeHC9bPoeH0jBfNHMMs3QCNWOw=", + "lastModified": 1716688162, + "narHash": "sha256-1xu1nlkWn25TEcs5c7vAnPOsOO+NAjpiTNNdJoQhAgo=", "owner": "Mic92", "repo": "buildbot-nix", - "rev": "22885edd30aa5c1be2998213996596fe2536c7ea", + "rev": "af4a31c72fea81abb6317f268f487312680258b7", "type": "github" }, "original": { @@ -36,9 +36,7 @@ "nixpkgs": [ "nixpkgs" ], - "sops-nix": [ - "sops-nix" - ], + "sops-nix": "sops-nix", "treefmt-nix": [ "treefmt-nix" ] @@ -78,26 +76,6 @@ "type": "github" } }, - "disko_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1714405407, - "narHash": "sha256-h3pOvHCXkSdp1KOZqtkQmHgkR7VaOJXDhqhumk7sZLY=", - "owner": "nix-community", - "repo": "disko", - "rev": "5eaf747af38dd272e1ab28a8ec4bd972424b07cf", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "disko", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -175,10 +153,8 @@ "inputs": { "buildbot-nix": "buildbot-nix", "clan-core": "clan-core", - "disko": "disko_2", "flake-parts": "flake-parts", "nixpkgs": "nixpkgs", - "sops-nix": "sops-nix", "srvos": "srvos", "treefmt-nix": "treefmt-nix" } @@ -186,16 +162,19 @@ "sops-nix": { "inputs": { "nixpkgs": [ + "clan-core", "nixpkgs" ], - "nixpkgs-stable": [] + "nixpkgs-stable": [ + "clan-core" + ] }, "locked": { - "lastModified": 1713892811, - "narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=", + "lastModified": 1716692524, + "narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd", + "rev": "962797a8d7f15ed7033031731d0bb77244839960", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 374f524..cca84d4 100644 --- a/flake.nix +++ b/flake.nix @@ -13,13 +13,6 @@ treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; - disko.url = "github:nix-community/disko"; - disko.inputs.nixpkgs.follows = "nixpkgs"; - - sops-nix.url = "github:Mic92/sops-nix"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs"; - sops-nix.inputs.nixpkgs-stable.follows = ""; - srvos.url = "github:numtide/srvos"; # Use the version of nixpkgs that has been tested to work with SrvOS srvos.inputs.nixpkgs.follows = "nixpkgs"; @@ -28,7 +21,6 @@ clan-core.inputs.flake-parts.follows = "flake-parts"; clan-core.inputs.nixpkgs.follows = "nixpkgs"; clan-core.inputs.treefmt-nix.follows = "treefmt-nix"; - clan-core.inputs.sops-nix.follows = "sops-nix"; buildbot-nix.url = "github:Mic92/buildbot-nix"; buildbot-nix.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/single-disk.nix b/modules/single-disk.nix deleted file mode 100644 index 0cb20bf..0000000 --- a/modules/single-disk.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ self, ... }: -let - partitions = { - grub = { - name = "grub"; - size = "1M"; - type = "ef02"; - }; - esp = { - name = "ESP"; - type = "EF00"; - size = "500M"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "filesystem"; - # We use xfs because it has support for compression and has a quite good performance for databases - format = "xfs"; - mountpoint = "/"; - }; - }; - }; -in -{ - imports = [ - self.inputs.disko.nixosModules.disko - ]; - disko.devices = { - disk.sda = { - type = "disk"; - device = "/dev/sda"; - content = { - type = "gpt"; - inherit partitions; - }; - }; - }; -} diff --git a/modules/xfs-lvm-crypto-raid.nix b/modules/xfs-lvm-crypto-raid.nix deleted file mode 100644 index 3b2bd42..0000000 --- a/modules/xfs-lvm-crypto-raid.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ self, lib, ... }: - -let - disk = index: { - type = "disk"; - device = "/dev/nvme${toString index}n1"; - content = { - type = "gpt"; - partitions = - # systemd only wants to have one /boot partition - # should we rsync? - (lib.optionalAttrs (index == 0) { - boot = { - type = "EF00"; - size = "1G"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - }) // { - root = { - size = "100%"; - content = { - type = "luks"; - name = "crypted${toString index}"; - keyFile = "/tmp/secret.key"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - }; -in -{ - imports = [ - self.inputs.disko.nixosModules.disko - ]; - - boot.initrd.kernelModules = [ - "xhci_pci" - "ahci" - "sd_mod" - "nvme" - "dm-raid" - "dm-integrity" - ]; - - disko.devices = { - disk = { - nvme0n1 = disk 0; - nvme1n1 = disk 1; - }; - - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "95%FREE"; - lvm_type = "raid1"; - extraArgs = [ - "--raidintegrity" - "y" - ]; - content = { - type = "filesystem"; - format = "xfs"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/modules/zfs-crypto-raid.nix b/modules/zfs-crypto-raid.nix index ee016fd..7a3bd3c 100644 --- a/modules/zfs-crypto-raid.nix +++ b/modules/zfs-crypto-raid.nix @@ -27,10 +27,6 @@ let }; in { - imports = [ - self.inputs.disko.nixosModules.disko - ]; - networking.hostId = "8425e349"; boot.initrd.postDeviceCommands = ''