From 89cefcd61088f1cbb208da8f3557fd7369ed6504 Mon Sep 17 00:00:00 2001 From: Nickolaj Jepsen Date: Tue, 20 Jan 2026 23:55:02 +0100 Subject: [PATCH] feat: minor modules updates --- modules/base/defaults.nix | 1 + modules/base/fireproof.nix | 2 ++ modules/base/gc.nix | 1 + modules/base/nix.nix | 9 +++++++-- modules/programs/default.nix | 7 +------ modules/system/default.nix | 3 +-- modules/system/hardware.nix | 4 ++++ 7 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 modules/system/hardware.nix diff --git a/modules/base/defaults.nix b/modules/base/defaults.nix index 191c32e..4f2b1ae 100644 --- a/modules/base/defaults.nix +++ b/modules/base/defaults.nix @@ -2,6 +2,7 @@ options.fireproof.base.defaults = { terminal = lib.mkOption { type = lib.types.str; + default = "ghostty"; description = "The terminal to use"; }; }; diff --git a/modules/base/fireproof.nix b/modules/base/fireproof.nix index e7ce81b..ba6e446 100644 --- a/modules/base/fireproof.nix +++ b/modules/base/fireproof.nix @@ -8,6 +8,8 @@ type = lib.types.str; description = "The primary username for the machine"; }; + work.enable = lib.mkEnableOption "Enable work-related applications and tools"; + dev.enable = lib.mkEnableOption "Enable development tools and applications"; hardware = { battery = lib.mkOption { type = lib.types.bool; diff --git a/modules/base/gc.nix b/modules/base/gc.nix index 441a505..705a8b4 100644 --- a/modules/base/gc.nix +++ b/modules/base/gc.nix @@ -8,4 +8,5 @@ _: { }; nix.settings.auto-optimise-store = true; + nix.optimise.automatic = true; } diff --git a/modules/base/nix.nix b/modules/base/nix.nix index 6f553dd..50ccb2d 100644 --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{config, pkgs, ...}: { nixpkgs.config.allowUnfree = true; nix.settings = { @@ -8,7 +8,9 @@ config.fireproof.username ]; - experimental-features = "nix-command flakes"; + experimental-features = ["nix-command" "flakes"]; + warn-dirty = false; + substituters = [ "https://nix-community.cachix.org" "https://install.determinate.systems" @@ -19,4 +21,7 @@ "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" ]; }; + + # Make 'nix repl' have all the nixpkgs available + environment.systemPackages = [pkgs.nixpkgs-fmt]; } diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 44bce72..1a83c37 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,9 +1,4 @@ -{lib, ...}: { - options.fireproof = { - work.enable = lib.mkEnableOption "Enable work-related applications and tools"; - dev.enable = lib.mkEnableOption "Enable development tools and applications"; - }; - +_: { imports = [ ./fish/default.nix ./claude.nix diff --git a/modules/system/default.nix b/modules/system/default.nix index 0546cf8..1e4f3f9 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,8 +1,7 @@ _: { - options.fireproof.base = {}; - imports = [ ./boot.nix + ./hardware.nix ./hosts.nix ./keyd.nix ./wsl.nix diff --git a/modules/system/hardware.nix b/modules/system/hardware.nix new file mode 100644 index 0000000..0f63b6d --- /dev/null +++ b/modules/system/hardware.nix @@ -0,0 +1,4 @@ +_: { + services.fwupd.enable = true; + hardware.enableRedistributableFirmware = true; +}