mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-24 18:11:54 -05:00
moved homelab virtualization config to apps modules
This commit is contained in:
parent
c0e6d57378
commit
51c74e2b1f
|
@ -23,7 +23,7 @@
|
|||
fwupd.enable = true;
|
||||
fprintd.package = pkgs.fprintd.overrideAttrs {
|
||||
mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemConfig = {
|
||||
|
@ -38,12 +38,13 @@
|
|||
|
||||
apps = {
|
||||
flatpak.enable = true;
|
||||
podman.enable = true;
|
||||
steam.enable = true;
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
|
||||
homeLab.virtualization.enable = true;
|
||||
|
||||
users.users.aly.hashedPassword = "$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C";
|
||||
users.users.aly.hashedPassword =
|
||||
"$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C";
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -81,15 +81,17 @@ in {
|
|||
desktopEnvironments.gnome.enable = true;
|
||||
};
|
||||
|
||||
apps = {
|
||||
flatpak.enable = true;
|
||||
steam.enable = false;
|
||||
systemConfig = {
|
||||
plymouth.enable = true;
|
||||
zramSwap.enable = true;
|
||||
};
|
||||
|
||||
homeLab.virtualization.enable = true;
|
||||
|
||||
systemConfig.plymouth.enable = true;
|
||||
systemConfig.zramSwap.enable = true;
|
||||
apps = {
|
||||
flatpak.enable = true;
|
||||
podman.enable = true;
|
||||
steam.enable = true;
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
powerManagement.cpuFreqGovernor = "ondemand";
|
||||
|
||||
systemConfig = {
|
||||
plymouth.enable = true;
|
||||
zramSwap.enable = true;
|
||||
};
|
||||
|
||||
desktopConfig = {
|
||||
enable = true;
|
||||
windowManagers.hyprland.enable = true;
|
||||
|
@ -27,8 +32,5 @@
|
|||
steam.enable = false;
|
||||
};
|
||||
|
||||
systemConfig.plymouth.enable = true;
|
||||
systemConfig.zramSwap.enable = true;
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
imports = [ ./flatpak ./steam ];
|
||||
imports = [ ./flatpak ./steam ./podman ./virt-manager ];
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
options = {
|
||||
homeLab.virtualization.enable =
|
||||
lib.mkEnableOption "Enables podman and virt-manager virtualization.";
|
||||
apps.podman.enable =
|
||||
lib.mkEnableOption "Enables Podman for OCI container support.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeLab.virtualization.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
config = lib.mkIf config.apps.podman.enable {
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
oci-containers = { backend = "podman"; };
|
||||
podman = {
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
|
@ -17,5 +15,6 @@
|
|||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
15
nixosModules/apps/virt-manager/default.nix
Normal file
15
nixosModules/apps/virt-manager/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
options = {
|
||||
apps.virt-manager.enable =
|
||||
lib.mkEnableOption "Enables virt-manager with TPM and EFI support.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.apps.virt-manager.enable {
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
virtualisation = { libvirtd.enable = true; };
|
||||
|
||||
};
|
||||
}
|
|
@ -1,16 +1,10 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
imports = [
|
||||
./binaryCache
|
||||
./reverseProxy
|
||||
./nixContainers
|
||||
./ociContainers
|
||||
./samba
|
||||
./virtualization
|
||||
];
|
||||
imports =
|
||||
[ ./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba ];
|
||||
|
||||
options = {
|
||||
homeLab.enable = lib.mkEnableOption "Enables fully functional HomeLab.";
|
||||
homeLab.enable = lib.mkEnableOption "Enables fully functional Home Lab.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeLab.enable {
|
||||
|
@ -19,6 +13,5 @@
|
|||
homeLab.ociContainers.enable = lib.mkDefault true;
|
||||
homeLab.reverseProxy.enable = lib.mkDefault true;
|
||||
homeLab.samba.enable = lib.mkDefault true;
|
||||
homeLab.virtualization.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.homeLab.nixContainers.enable {
|
||||
|
||||
containers.navidrome = {
|
||||
autoStart = true;
|
||||
bindMounts."/Music".hostPath = "/mnt/Media/Music";
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.homeLab.ociContainers.enable {
|
||||
|
||||
apps.podman.enable = lib.mkDefault true;
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
audiobookshelf = {
|
||||
ports = [ "0.0.0.0:13378:80" ];
|
||||
|
|
Loading…
Reference in a new issue