My Nix Configuration

[flake] more updates and changes and such

Changed files
+21 -19
homeModules
profiles
desktop
programs
hosts
zaphod
services
nixosModules
dn42Wireguard
+2 -2
.nvim.lua
···
expr = "(builtins.getFlake (builtins.toString ./.)).currentSystem.options",
},
my_modules = {
-
exper = "(pkgs.lib.evalModules { modules = (builtins.getFlake (builtins.toString ./.)).nixosModules; }).options"
-
}
+
exper = "(pkgs.lib.evalModules { modules = (builtins.getFlake (builtins.toString ./.)).nixosModules; }).options",
+
},
},
},
},
+13 -10
homeModules/profiles/desktop/default.nix
···
cfg = config.py.profiles.desktop;
inherit (cfg) shell;
inherit (lib) mkIf mkDefault mkEnableOption;
+
+
mkShellOption =
+
name: var:
+
lib.mkOption {
+
type = lib.types.bool;
+
default = if (shell == var) then true else false;
+
description = "Enable ${name}";
+
readOnly = true;
+
visible = false;
+
internal = true;
+
};
in
{
options.py.profiles.desktop = {
···
default = "caelestia";
description = "The desktop shell to use in the graphical environment";
};
-
caelestia = lib.mkOption {
-
type = lib.types.bool;
-
default = if (shell == "caelestia") then true else false;
-
description = "Enable caelestia shell";
-
};
-
dms = lib.mkOption {
-
type = lib.types.bool;
-
default = if (shell == "dms") then true else false;
-
description = "Enable DMS";
-
};
+
caelestia = mkShellOption "Caelestia shell" "caelestia";
+
dms = mkShellOption "DMS" "dms";
};
config = mkIf cfg.enable {
py.profiles.base.enable = true;
+2
homeModules/programs/default.nix
···
{
imports = [
+
# keep-sorted start
./caelestia
./chromium
./dms
···
./starship
./vscodium
./zed-editor
+
# keep-sorted end
];
}
-1
hosts/zaphod/services/greeter.nix
···
hide_version_string = true;
};
};
-
security.pam.services.ly.fprintAuth = false;
}
+4 -6
nixosModules/dn42Wireguard/default.nix
···
# so tunnel config overrides defaults
fc = cfg.tunnelDefaults // (lib.filterAttrs (_: v: v != null) value);
in
-
(lib.nameValuePair "wg42_${name}" {
+
lib.nameValuePair "wg42_${name}" {
inherit (fc) listenPort privateKeyFile;
allowedIPsAsRoutes = false;
peers = [
···
fc.peerAddrs.v6 != null && fc.localAddrs.v6 != null
) "${pkgs.iproute2}/bin/ip addr add ${fc.localAddrs.v6} peer ${fc.peerAddrs.v6} dev wg42_${name}"}
'';
-
})
-
) (lib.filterAttrs (_: v: v.enable == true) cfg.tunnels);
+
}
+
) (lib.filterAttrs (_: v: v.enable) cfg.tunnels);
firewall = {
-
trustedInterfaces = lib.mapAttrsToList (name: _: "wg42_" + name) (
-
lib.filterAttrs (_: v: v.enable == true) cfg.tunnels
-
);
+
trustedInterfaces = lib.mapAttrsToList (name: _: "wg42_" + name) (lib.filterAttrs (_: v: v.enable) cfg.tunnels);
checkReversePath = false;
extraInputRules = ''
ip saddr 172.20.0.0/14 accept