From a9fb51279a48c83c387c0ff0d563b342fefbab04 Mon Sep 17 00:00:00 2001 From: Shahab Dogar Date: Tue, 4 Feb 2025 00:01:53 +0500 Subject: [PATCH] chore: Flake | a bit of cleanup --- flake.nix | 15 +++++---------- nixos/configuration.nix | 5 +++-- nixos/hardware-configuration.nix | 13 +++++++++---- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index d3da482..2f6bd6a 100644 --- a/flake.nix +++ b/flake.nix @@ -43,11 +43,6 @@ outputs = { self, nixpkgs, - home-manager, - disko, - lanzaboote, - nixos-hardware, - sops-nix, ... } @ inputs: let @@ -60,10 +55,10 @@ "${host}" = nixpkgs.lib.nixosSystem { inherit system; modules = [ - lanzaboote.nixosModules.lanzaboote - disko.nixosModules.disko - nixos-hardware.nixosModules.framework-13-7040-amd - sops-nix.nixosModules.sops + inputs.lanzaboote.nixosModules.lanzaboote + inputs.disko.nixosModules.disko + inputs.nixos-hardware.nixosModules.framework-13-7040-amd + inputs.sops-nix.nixosModules.sops ./nixos/configuration.nix ./nixos/disko-config.nix ./nixos/hardware-configuration.nix @@ -76,7 +71,7 @@ }; homeConfigurations = { - "${user}" = home-manager.lib.homeManagerConfiguration { + "${user}" = inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home-manager/home.nix ]; }; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 8c29d73..fd79e28 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -12,12 +12,13 @@ in boot = { loader = { # Set this to true on first install. This must be false for secure boot. - systemd-boot.enable = lib.mkForce false; + systemd-boot.enable = true; + # systemd-boot.enable = lib.mkForce false; efi.canTouchEfiVariables = true; }; lanzaboote = { - enable = true; + enable = false; pkiBundle = "/etc/secureboot"; }; }; diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index 7d4e36c..2db6444 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -6,10 +6,15 @@ { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot = { + initrd = { + availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; + kernelModules = [ ]; + }; + + kernelModules = [ "kvm-amd" ]; + extraModulePackages = [ ]; + }; # 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