diff --git a/flake.lock b/flake.lock index 8f264c3..38c4312 100644 --- a/flake.lock +++ b/flake.lock @@ -148,6 +148,26 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713749408, + "narHash": "sha256-9hFaSpgx+rZgGVLsjWdT+QUGyZplUyGdK45IoWEx1GM=", + "owner": "nix-community", + "repo": "disko", + "rev": "b8785a1c37f6176b6bc3d2939df329ab3a8f226c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -1339,6 +1359,7 @@ "attic": "attic", "atuin": "atuin", "deploy-rs": "deploy-rs", + "disko": "disko", "flake-parts": "flake-parts_2", "helix": "helix", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index d24de87..3a76b7e 100755 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,10 @@ url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; }; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/ame/disko-config.nix b/hosts/ame/disko-config.nix new file mode 100644 index 0000000..e69131f --- /dev/null +++ b/hosts/ame/disko-config.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + end = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + name = "root"; + end = "-0"; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/default.nix b/hosts/default.nix index 5919ec8..d6f5769 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,6 +11,7 @@ atticModule = inputs.attic.nixosModules.atticd; nurModule = inputs.nur.nixosModules.nur; t480Module = inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480; + diskoModule = inputs.disko.nixosModules.default; in { tsuki = nixosSystem { inherit specialArgs; @@ -20,6 +21,7 @@ hmModule atticModule nurModule + diskoModule { home-manager = { useGlobalPkgs = true; diff --git a/hosts/tsuki/disko-config.nix b/hosts/tsuki/disko-config.nix new file mode 100644 index 0000000..903ed01 --- /dev/null +++ b/hosts/tsuki/disko-config.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + end = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + name = "root"; + end = "-0"; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +}