made some progress

This commit is contained in:
Chris Kruining 2025-07-23 16:12:13 +02:00
parent 5ba5d55108
commit a9a4777168
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
35 changed files with 1176 additions and 44 deletions

42
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,42 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkOption mkMerge attrNames filterAttrs;
inherit (lib.types) nullOr enum;
cfg = config.${namespace};
in
{
options.${namespace} = {
preset = mkOption {
type = nullOr enum [ "server" "desktop" ];
default = null;
example = "desktop";
description = "Which defaults profile to start with";
};
};
config = mkMerge [
(mkIf cfg.preset == "desktop" {
"${namespace}" = mkDefault {
hardware.has = {
audio = true;
};
boot = {
quiet = true;
animated = true;
};
desktop.use = "kde";
};
})
(mkIf cfg.preset == "desktop" {
"${namespace}" = mkDefault {
services = {
ssh.enable = true;
};
};
})
];
}