This commit is contained in:
Shelvacu
2025-08-21 00:33:04 -07:00
committed by Shelvacu on fw
parent 9d80371eac
commit 0a6c15091e
3 changed files with 8 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ else
./units-config.nix
./units-impl.nix
./verify-system
./thunderbird.nix
];
options = {
vacu.rootCAs = mkOption { type = types.listOf types.str; };

View File

@@ -151,4 +151,6 @@
services.blueman.enable = true;
services.postgresql.enable = true; # for development
vacu.programs.thunderbird.enable = true;
}

View File

@@ -14,6 +14,9 @@ let
packagesSetType = types.attrsOf (
types.submodule (
{ name, config, ... }:
let
pieces = lib.splitString "." name;
in
{
options = {
enable = mkOption {
@@ -23,7 +26,7 @@ let
};
package = mkOption {
type = types.package;
default = pkgs.${name};
default = lib.attrByPath pieces (throw "Could not find package pkgs.${name}") pkgs;
defaultText = "pkgs.${name}";
};
overrides = mkOption {
@@ -43,14 +46,10 @@ let
enable = lib.mkOverride 900 true; # more important than mkDefault, less important than setting explicitly
nameToPackageSet =
name:
let
pieces = lib.splitString "." name;
in
{
name = lib.last pieces;
inherit name;
value = {
inherit enable;
package = lib.mkDefault (lib.attrByPath pieces (throw "Could not find package pkgs.${name}") pkgs);
};
};
listToPackageSet =