Move quirks to profiles
This commit is contained in:
parent
3026b6dbec
commit
0d17a0baf1
8 changed files with 11 additions and 22 deletions
|
|
@ -15,6 +15,8 @@
|
||||||
bosun = {
|
bosun = {
|
||||||
profiles = {
|
profiles = {
|
||||||
graphical.enable = true;
|
graphical.enable = true;
|
||||||
|
docker.enable = true;
|
||||||
|
work.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#quirks = ["avahi" "docker" "nix-ld"];
|
#quirks = ["avahi" "docker" "nix-ld"];
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ in {
|
||||||
options.bosun.profiles = {
|
options.bosun.profiles = {
|
||||||
graphical.enable = mkEnableOption "Graphical interface";
|
graphical.enable = mkEnableOption "Graphical interface";
|
||||||
headless.enable = mkEnableOption "Headless";
|
headless.enable = mkEnableOption "Headless";
|
||||||
workstation.enable = mkEnableOption "Workstation";
|
docker.enable = mkEnableOption "Docker usage";
|
||||||
server.enable = mkEnableOption "Server";
|
work.enable = mkEnableOption "Work setup";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
./profiles
|
./profiles
|
||||||
./system.nix
|
./system.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
|
./nix-ld.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
lib,
|
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.enable = true;
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
SDL
|
SDL
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./graphical
|
./graphical
|
||||||
|
./work
|
||||||
|
./docker
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf (builtins.elem "docker" config.elements.quirks) {
|
config = lib.mkIf config.bosun.profiles.docker.enable {
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -2,10 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf (builtins.elem "avahi" config.elements.quirks) {
|
config = lib.mkIf config.bosun.profiles.work.enable {
|
||||||
services = {
|
services = {
|
||||||
# Name Server Caching Daemon
|
# Name Server Caching Daemon
|
||||||
nscd = {
|
nscd = {
|
||||||
|
|
@ -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 = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue