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 = {
|
||||
profiles = {
|
||||
graphical.enable = true;
|
||||
docker.enable = true;
|
||||
work.enable = true;
|
||||
};
|
||||
|
||||
#quirks = ["avahi" "docker" "nix-ld"];
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
./profiles
|
||||
./system.nix
|
||||
./users.nix
|
||||
./nix-ld.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./graphical
|
||||
./work
|
||||
./docker
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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 = {
|
||||
|
|
@ -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