Move quirks to profiles

This commit is contained in:
Christopher Mühl 2026-01-06 03:13:41 +01:00
parent 3026b6dbec
commit 0d17a0baf1
No known key found for this signature in database
GPG key ID: 925AC7D69955293F
8 changed files with 11 additions and 22 deletions

View file

@ -15,6 +15,8 @@
bosun = {
profiles = {
graphical.enable = true;
docker.enable = true;
work.enable = true;
};
#quirks = ["avahi" "docker" "nix-ld"];

View file

@ -4,7 +4,7 @@ in {
options.bosun.profiles = {
graphical.enable = mkEnableOption "Graphical interface";
headless.enable = mkEnableOption "Headless";
workstation.enable = mkEnableOption "Workstation";
server.enable = mkEnableOption "Server";
docker.enable = mkEnableOption "Docker usage";
work.enable = mkEnableOption "Work setup";
};
}

View file

@ -4,5 +4,6 @@
./profiles
./system.nix
./users.nix
./nix-ld.nix
];
}

View file

@ -4,7 +4,8 @@
lib,
...
}: {
config = lib.mkIf (builtins.elem "nix-ld" config.elements.quirks) {
# TODO: Enable quirk somehow
config = lib.mkIf false {
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
SDL

View file

@ -1,5 +1,7 @@
{
imports = [
./graphical
./work
./docker
];
}

View file

@ -3,7 +3,7 @@
lib,
...
}: {
config = lib.mkIf (builtins.elem "docker" config.elements.quirks) {
config = lib.mkIf config.bosun.profiles.docker.enable {
virtualisation.docker = {
enable = true;

View file

@ -2,10 +2,9 @@
config,
lib,
pkgs,
modulesPath,
...
}: {
config = lib.mkIf (builtins.elem "avahi" config.elements.quirks) {
config = lib.mkIf config.bosun.profiles.work.enable {
services = {
# Name Server Caching Daemon
nscd = {

View file

@ -1,16 +0,0 @@
{lib, ...}: {
# All quirks are imported and check themselves whether they are enabled
# via `(builtins.elem "quirk" config.elements.quirks)`.
imports = [
./avahi.nix
./docker.nix
./nix-ld.nix
];
options.elements = with lib; {
quirks = mkOption {
type = types.listOf types.str;
default = [];
};
};
}