From 5db849639d0d13a1e7cb0648009eadc91884d385 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Wed, 12 Mar 2025 18:44:59 +0100 Subject: allow reboot on autoUpgrade --- config/hardware-configuration.nix | 27 --------------------------- config/hardware/default.nix | 4 ++++ config/hardware/hardware-configuration.nix | 20 ++++++++++++++++++++ config/nix.nix | 2 ++ 4 files changed, 26 insertions(+), 27 deletions(-) delete mode 100644 config/hardware-configuration.nix create mode 100644 config/hardware/default.nix create mode 100644 config/hardware/hardware-configuration.nix (limited to 'config') diff --git a/config/hardware-configuration.nix b/config/hardware-configuration.nix deleted file mode 100644 index 1b79e6f..0000000 --- a/config/hardware-configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, lib, modulesPath, ... }: - -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - - boot.initrd.availableKernelModules = - [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/2b302948-5608-41c6-b54c-1c0e39ff6a58"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."root".device = - "/dev/disk/by-uuid/eaec758b-ba22-42ab-8992-e765cec9be55"; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/74d78eba-c29a-4724-8fb7-624e0a03faa5"; - fsType = "ext4"; - }; - - swapDevices = [{ device = "/swap"; }]; - -} diff --git a/config/hardware/default.nix b/config/hardware/default.nix new file mode 100644 index 0000000..9b32259 --- /dev/null +++ b/config/hardware/default.nix @@ -0,0 +1,4 @@ +{...}: { + imports = [./hardware-configuration.nix]; + personal.hardware.disks.crypted = "/dev/disk/by-uuid/eaec758b-ba22-42ab-8992-e765cec9be55"; +} diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix new file mode 100644 index 0000000..d089f4b --- /dev/null +++ b/config/hardware/hardware-configuration.nix @@ -0,0 +1,20 @@ +{modulesPath, ...}: { + imports = [(modulesPath + "/profiles/qemu-guest.nix")]; + + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/2b302948-5608-41c6-b54c-1c0e39ff6a58"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/74d78eba-c29a-4724-8fb7-624e0a03faa5"; + fsType = "ext4"; + }; + + swapDevices = [{device = "/swap";}]; +} diff --git a/config/nix.nix b/config/nix.nix index a2d25c8..04235c2 100644 --- a/config/nix.nix +++ b/config/nix.nix @@ -13,6 +13,8 @@ }; }; + system.autoUpgrade.allowReboot = true; + # disable remote builds nix.settings.max-jobs = 0; nixpkgs.flake = { -- cgit v1.2.3