From c736134ccdf0020b9f8c5edb0759427cedcfce3b Mon Sep 17 00:00:00 2001 From: Tristan Druyen Date: Mon, 18 Sep 2023 17:14:44 +0200 Subject: [PATCH] Enable disko hostConf & comment out current hardware filesystem stuff Signed-off-by: Tristan Druyen --- README.md | 15 +++++++++++++++ flake.nix | 2 ++ hardware.nix | 42 +++++++++++++++++++++--------------------- 3 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7e72605 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# My nix conf + + +## Apply disko partitioning from local filesystem + +``` +sudo nix run github:nix-community/disko -- --mode disko --flake path:$PWD#nixos-pulse +``` + + +## Apply nixos conf + +``` +sudo nixos-rebuild --flake .#nixos-pulse switch +``` diff --git a/flake.nix b/flake.nix index 36b3fe4..2d5a44e 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,8 @@ modules = [ ./configuration.nix ./home.nix + ./disko.nix + disko.nixosModules.disko home-manager.nixosModules.home-manager tuxedo-nixos.nixosModules.default { diff --git a/hardware.nix b/hardware.nix index ce44bbc..1d91b53 100644 --- a/hardware.nix +++ b/hardware.nix @@ -23,18 +23,18 @@ }; # modules - availableKernelModules = ["xhci_pci" "uas" "sd_mod"]; + availableKernelModules = ["nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod"]; kernelModules = []; # Enable swap on luks - luks = { - # Root - devices."luks-0ebc7402-5f50-4549-a407-b1f859285102".device = "/dev/disk/by-uuid/0ebc7402-5f50-4549-a407-b1f859285102"; + # luks = { + # # Root + # devices."luks-0ebc7402-5f50-4549-a407-b1f859285102".device = "/dev/disk/by-uuid/0ebc7402-5f50-4549-a407-b1f859285102"; - # Swap - devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".device = "/dev/disk/by-uuid/fa1e760a-71a3-4a79-a791-684cd82d9c3c"; - devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".keyFile = "/crypto_keyfile.bin"; - }; + # # Swap + # devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".device = "/dev/disk/by-uuid/fa1e760a-71a3-4a79-a791-684cd82d9c3c"; + # devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".keyFile = "/crypto_keyfile.bin"; + # }; }; kernelModules = ["kvm-amd" "amdgpu"]; @@ -43,20 +43,20 @@ services.xserver.videoDrivers = ["amdgpu"]; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/6ae6ea01-72d5-4cee-a512-7aab551577a0"; - fsType = "ext4"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/B471-B193"; - fsType = "vfat"; - }; - }; + # fileSystems = { + # "/" = { + # device = "/dev/disk/by-uuid/6ae6ea01-72d5-4cee-a512-7aab551577a0"; + # fsType = "ext4"; + # }; + # "/boot" = { + # device = "/dev/disk/by-uuid/B471-B193"; + # fsType = "vfat"; + # }; + # }; - swapDevices = [ - {device = "/dev/disk/by-uuid/5b3a6fa6-bdec-4bfb-914d-48d870776a53";} - ]; + # swapDevices = [ + # {device = "/dev/disk/by-uuid/5b3a6fa6-bdec-4bfb-914d-48d870776a53";} + # ]; networking = { useDHCP = lib.mkDefault true;