dedicated-settings-file #3
|
@ -1,10 +1,14 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./language-server.nix
|
||||
./dotnet.nix
|
||||
./docker-rootless.nix
|
||||
./platformio.nix
|
||||
./qemu.nix
|
||||
./latex.nix
|
||||
];
|
||||
]
|
||||
++ lib.optionals settings.virtualisation.docker-rootless.enable [ ./docker-rootless.nix ]
|
||||
++ lib.optionals settings.virtualisation.qemu.enable [ ./qemu.nix ]
|
||||
++ lib.optionals settings.dev.platformio [ ./platformio.nix ]
|
||||
++ lib.optionals settings.dev.latex [ ./latex.nix ]
|
||||
++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
# enable rootless docker for more security
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# regulary clean unused docker images
|
||||
virtualisation.docker.autoPrune.enable = true;
|
||||
virtualisation.docker.autoPrune.enable = settings.virtualisation.docker-rootless.autoPrune;
|
||||
}
|
||||
|
|
14
dev/qemu.nix
14
dev/qemu.nix
|
@ -1,10 +1,14 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
# KVM
|
||||
virtualisation.libvirtd.enable = true;
|
||||
# programs.virt-manager.enable = true; # after 23.11
|
||||
programs.virt-manager.enable = settings.virtualisation.qemu.virt-manager; # after 23.11
|
||||
|
||||
# only before 23.11
|
||||
environment.systemPackages = (with pkgs; [
|
||||
virt-manager
|
||||
]);
|
||||
# environment.systemPackages = (with pkgs; [
|
||||
# virt-manager
|
||||
# ]);
|
||||
}
|
||||
|
|
16
settings.nix
16
settings.nix
|
@ -14,6 +14,22 @@ with import <nixpkgs> {}; {
|
|||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker-rootless = {
|
||||
enable = true;
|
||||
autoPrune = true;
|
||||
};
|
||||
qemu = {
|
||||
enable = true;
|
||||
virt-manager = true;
|
||||
};
|
||||
};
|
||||
dev = {
|
||||
platformio = true;
|
||||
latex = true;
|
||||
dotnet = false;
|
||||
};
|
||||
|
||||
dvd = true; # enable DVD decryption + ripping via Handbrake
|
||||
bluray = true; # enable Bluray decryption (requires additional setup)
|
||||
printing = {
|
||||
|
|
Loading…
Reference in New Issue