disko again

This commit is contained in:
twoneis 2024-05-08 16:32:37 +02:00
parent f53f80a837
commit a22d5c3c57
4 changed files with 35 additions and 28 deletions

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ imports = [
./hardware-config.nix ./hardware-config.nix
./disko.nix
./nvidia.nix ./nvidia.nix
./options.nix ./options.nix
]; ];
@ -16,7 +17,7 @@
enable = true; enable = true;
efiSupport = true; efiSupport = true;
efiInstallAsRemovable = true; efiInstallAsRemovable = true;
device = "nodev"; # device = "nodev";
useOSProber = true; useOSProber = true;
font = null; font = null;
splashImage = null; splashImage = null;

View file

@ -4,32 +4,32 @@
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems = { # fileSystems = {
"/boot" = { # "/boot" = {
device = "/dev/disk/by-uuid/646D-4793"; # device = "/dev/disk/by-uuid/646D-4793";
fsType = "vfat"; # fsType = "vfat";
}; # };
"/" = { # "/" = {
device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868";
fsType = "btrfs"; # fsType = "btrfs";
options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; # options = [ "subvol=rootfs" "compress=zstd" "noatime" ];
}; # };
"/nix" = { # "/nix" = {
device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868";
fsType = "btrfs"; # fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ]; # options = [ "subvol=nix" "compress=zstd" "noatime" ];
}; # };
"/persist" = { # "/persist" = {
device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868"; # device = "/dev/disk/by-uuid/1a5777297-4ed3-48d7-adc7-a937fa93d868";
fsType = "btrfs"; # fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" "noatime" ]; # options = [ "subvol=persist" "compress=zstd" "noatime" ];
}; # };
"/ext" = { # "/ext" = {
device = "/dev/disk/by-uuid/89112638-6953-48a7-9b2f-dd61ce9fe8b0"; # device = "/dev/disk/by-uuid/89112638-6953-48a7-9b2f-dd61ce9fe8b0";
fsType = "btrfs"; # fsType = "btrfs";
options = [ "subvol=ext" "compress=zstd" "noatime" ]; # options = [ "subvol=ext" "compress=zstd" "noatime" ];
}; # };
}; # };
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -21,6 +21,11 @@
url = "github:sodiboo/niri-flake"; url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs: import ./outputs.nix inputs; outputs = inputs: import ./outputs.nix inputs;

View file

@ -1,10 +1,11 @@
{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }@inputs: { { nixpkgs, home-manager, nixos-hardware, nur, niri, disko, ... }@inputs: {
nixosConfigurations = let nixosConfigurations = let
clientModules = [ clientModules = [
./modules/system ./modules/system
./options.nix ./options.nix
niri.nixosModules.niri niri.nixosModules.niri
disko.nixosModules.disko
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
nixpkgs.overlays = [ nixpkgs.overlays = [
nur.overlay nur.overlay