diff --git a/flake.nix b/flake.nix index 72e8949..7af1950 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,10 @@ # Spotify client spicetify-nix.url = "github:the-argus/spicetify-nix"; spicetify-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + # Disko + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # }}} diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index af163e6..6d42698 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -3,6 +3,7 @@ let imports = [ inputs.hyprland.nixosModules.default + inputs.disko.nixosModules.default inputs.agenix.nixosModules.default inputs.stylix.nixosModules.stylix inputs.nur.nixosModules.nur diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index da48c73..4d9541a 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -28,9 +28,14 @@ # zfs rollback -r zroot@blank # ''; + disko.devices = import ./partitions.nix { + devices = [ "/dev/sda" ]; + }; + # Boot boot.loader.grub = { enable = true; + version = 2; device = "/dev/sda"; }; } diff --git a/hosts/nixos/lapetus/partitions.nix b/hosts/nixos/lapetus/partitions.nix index 6967b76..8143a65 100644 --- a/hosts/nixos/lapetus/partitions.nix +++ b/hosts/nixos/lapetus/partitions.nix @@ -56,15 +56,21 @@ # {{{ Datasets datasets = { "root/persist/data" = { + type = "zfs_fs"; mountpoint = "/persist/data"; options."com.sun:auto-snapshot" = "true"; }; "root/persist/state" = { + type = "zfs_fs"; mountpoint = "/persist/state"; options."com.sun:auto-snapshot" = "true"; }; - "root/local/nix" = { mountpoint = "/nix"; }; + "root/local/nix" = { + type = "zfs_fs"; + mountpoint = "/nix"; + }; "root/local/cache" = { + type = "zfs_fs"; mountpoint = "/persist/local/cache"; }; };