From a22d5c3c57e57776f263f817e11ebf3a581d35db Mon Sep 17 00:00:00 2001 From: twoneis Date: Wed, 8 May 2024 16:32:37 +0200 Subject: [PATCH] disko again --- devices/ellaca/default.nix | 3 +- devices/ellaca/hardware-config.nix | 52 +++++++++++++++--------------- flake.nix | 5 +++ outputs.nix | 3 +- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/devices/ellaca/default.nix b/devices/ellaca/default.nix index f3f1fa7..826aedb 100644 --- a/devices/ellaca/default.nix +++ b/devices/ellaca/default.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { imports = [ ./hardware-config.nix + ./disko.nix ./nvidia.nix ./options.nix ]; @@ -16,7 +17,7 @@ enable = true; efiSupport = true; efiInstallAsRemovable = true; - device = "nodev"; + # device = "nodev"; useOSProber = true; font = null; splashImage = null; diff --git a/devices/ellaca/hardware-config.nix b/devices/ellaca/hardware-config.nix index f2c0e1d..cea1e2a 100644 --- a/devices/ellaca/hardware-config.nix +++ b/devices/ellaca/hardware-config.nix @@ -4,32 +4,32 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems = { - "/boot" = { - device = "/dev/disk/by-uuid/646D-4793"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; - fsType = "btrfs"; - options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; - }; - "/persist" = { - device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" "noatime" ]; - }; - "/ext" = { - device = "/dev/disk/by-uuid/89112638-6953-48a7-9b2f-dd61ce9fe8b0"; - fsType = "btrfs"; - options = [ "subvol=ext" "compress=zstd" "noatime" ]; - }; - }; + # fileSystems = { + # "/boot" = { + # device = "/dev/disk/by-uuid/646D-4793"; + # fsType = "vfat"; + # }; + # "/" = { + # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; + # fsType = "btrfs"; + # options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; + # }; + # "/nix" = { + # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; + # fsType = "btrfs"; + # options = [ "subvol=nix" "compress=zstd" "noatime" ]; + # }; + # "/persist" = { + # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; + # fsType = "btrfs"; + # options = [ "subvol=persist" "compress=zstd" "noatime" ]; + # }; + # "/ext" = { + # device = "/dev/disk/by-uuid/89112638-6953-48a7-9b2f-dd61ce9fe8b0"; + # fsType = "btrfs"; + # options = [ "subvol=ext" "compress=zstd" "noatime" ]; + # }; + # }; # 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 diff --git a/flake.nix b/flake.nix index cbc14ef..37d6ff8 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,11 @@ url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; + + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs: import ./outputs.nix inputs; diff --git a/outputs.nix b/outputs.nix index 3aa3f1e..661379e 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,10 +1,11 @@ -{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }@inputs: { +{ nixpkgs, home-manager, nixos-hardware, nur, niri, disko, ... }@inputs: { nixosConfigurations = let clientModules = [ ./modules/system ./options.nix niri.nixosModules.niri + disko.nixosModules.disko home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay