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;
|
fwupd.enable = true;
|
||||||
fprintd.package = pkgs.fprintd.overrideAttrs {
|
fprintd.package = pkgs.fprintd.overrideAttrs {
|
||||||
mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ];
|
mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemConfig = {
|
systemConfig = {
|
||||||
|
@ -38,12 +38,13 @@
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
|
podman.enable = true;
|
||||||
steam.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?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,15 +81,17 @@ in {
|
||||||
desktopEnvironments.gnome.enable = true;
|
desktopEnvironments.gnome.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = {
|
systemConfig = {
|
||||||
flatpak.enable = true;
|
plymouth.enable = true;
|
||||||
steam.enable = false;
|
zramSwap.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
homeLab.virtualization.enable = true;
|
apps = {
|
||||||
|
flatpak.enable = true;
|
||||||
systemConfig.plymouth.enable = true;
|
podman.enable = true;
|
||||||
systemConfig.zramSwap.enable = true;
|
steam.enable = true;
|
||||||
|
virt-manager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "ondemand";
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
|
|
||||||
|
systemConfig = {
|
||||||
|
plymouth.enable = true;
|
||||||
|
zramSwap.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
desktopConfig = {
|
desktopConfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
windowManagers.hyprland.enable = true;
|
windowManagers.hyprland.enable = true;
|
||||||
|
@ -27,8 +32,5 @@
|
||||||
steam.enable = false;
|
steam.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemConfig.plymouth.enable = true;
|
|
||||||
systemConfig.zramSwap.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
imports = [ ./flatpak ./steam ];
|
imports = [ ./flatpak ./steam ./podman ./virt-manager ];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
homeLab.virtualization.enable =
|
apps.podman.enable =
|
||||||
lib.mkEnableOption "Enables podman and virt-manager virtualization.";
|
lib.mkEnableOption "Enables Podman for OCI container support.";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.homeLab.virtualization.enable {
|
config = lib.mkIf config.apps.podman.enable {
|
||||||
programs.virt-manager.enable = true;
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd.enable = true;
|
|
||||||
oci-containers = { backend = "podman"; };
|
oci-containers = { backend = "podman"; };
|
||||||
podman = {
|
podman = {
|
||||||
# Required for containers under podman-compose to be able to talk to each other.
|
# Required for containers under podman-compose to be able to talk to each other.
|
||||||
|
@ -17,5 +15,6 @@
|
||||||
enable = true;
|
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, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports =
|
||||||
./binaryCache
|
[ ./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba ];
|
||||||
./reverseProxy
|
|
||||||
./nixContainers
|
|
||||||
./ociContainers
|
|
||||||
./samba
|
|
||||||
./virtualization
|
|
||||||
];
|
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
homeLab.enable = lib.mkEnableOption "Enables fully functional HomeLab.";
|
homeLab.enable = lib.mkEnableOption "Enables fully functional Home Lab.";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.homeLab.enable {
|
config = lib.mkIf config.homeLab.enable {
|
||||||
|
@ -19,6 +13,5 @@
|
||||||
homeLab.ociContainers.enable = lib.mkDefault true;
|
homeLab.ociContainers.enable = lib.mkDefault true;
|
||||||
homeLab.reverseProxy.enable = lib.mkDefault true;
|
homeLab.reverseProxy.enable = lib.mkDefault true;
|
||||||
homeLab.samba.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 {
|
config = lib.mkIf config.homeLab.nixContainers.enable {
|
||||||
|
|
||||||
containers.navidrome = {
|
containers.navidrome = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
bindMounts."/Music".hostPath = "/mnt/Media/Music";
|
bindMounts."/Music".hostPath = "/mnt/Media/Music";
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.homeLab.ociContainers.enable {
|
config = lib.mkIf config.homeLab.ociContainers.enable {
|
||||||
|
|
||||||
|
apps.podman.enable = lib.mkDefault true;
|
||||||
|
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
audiobookshelf = {
|
audiobookshelf = {
|
||||||
ports = [ "0.0.0.0:13378:80" ];
|
ports = [ "0.0.0.0:13378:80" ];
|
||||||
|
|
Loading…
Reference in a new issue