diff --git a/flake.lock b/flake.lock index b227cbb..b69953a 100644 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759439645, - "narHash": "sha256-oiAyQaRilPk525Z5aTtTNWNzSrcdJ7IXM0/PL3CGlbI=", + "lastModified": 1759580034, + "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "879bd460b3d3e8571354ce172128fbcbac1ed633", + "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fda0b39..ccf6cc5 100644 --- a/flake.nix +++ b/flake.nix @@ -17,8 +17,8 @@ nixosConfigurations.vm = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./hosts/vm/configuration.nix disko.nixosModules.disko + ./hosts/vm/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix index 307ea94..1badf09 100644 --- a/hosts/vm/configuration.nix +++ b/hosts/vm/configuration.nix @@ -18,15 +18,8 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # These are needed for ZFS - networking.hostId = "25698a58"; - # https://discourse.nixos.org/t/zfs-with-disko-faluire-to-import-zfs-pool/61988/3 - boot = { - zfs = { - devNodes = "/dev/disk/by-uuid"; - }; - }; + disko.devices.disk.main.device = "/dev/vda"; programs.git.enable = true; programs.firefox.enable = true; diff --git a/hosts/vm/disk.nix b/hosts/vm/disk.nix index accc839..115f2cd 100644 --- a/hosts/vm/disk.nix +++ b/hosts/vm/disk.nix @@ -1 +1,42 @@ -import ../../modules/disko.zfs-encrypted-root.nix +# USAGE in your configuration.nix. +# Update devices to match your hardware. +# { +# imports = [ ./disko-config.nix ]; +# disko.devices.disk.main.device = "/dev/sda"; +# } +{ + disko.devices = { + disk = { + main = { + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +}