made some progress
This commit is contained in:
parent
c8f6c4d818
commit
21f6f37911
35 changed files with 1176 additions and 44 deletions
42
modules/nixos/default.nix
Normal file
42
modules/nixos/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue