podman + removed lima cause its more of a dev tool

This commit is contained in:
2026-07-05 21:46:01 -05:00
parent a98dd1c2cc
commit b1a872b511
5 changed files with 75 additions and 59 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"cSpell.words": ["homelab"]
}
Generated
+1 -22
View File
@@ -55,32 +55,11 @@
"type": "indirect"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1781847791,
"narHash": "sha256-Mo2YtNEGlcySnbq0YuP3nUKMAQCMAfE+TcCffo5vzD8=",
"ref": "refs/heads/master",
"rev": "68c2c85c33845385f7ab8147b32f1450b1e468e0",
"revCount": 824,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
}
},
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"quickshell": "quickshell"
"nixpkgs": "nixpkgs"
}
}
},
-7
View File
@@ -1,7 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
lima
];
}
+28
View File
@@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.homelab.virtualization;
in
{
options.homelab.virtualization = {
user = lib.mkOption {
type = lib.types.str;
default = "river";
description = "The user to run virtualization services as.";
};
# podman
podman = {
enable = lib.mkEnableOption "Podman support";
packages = lib.mkEnableOption "Install Relevant Podman packages" {
enable = true;
default = false;
};
};
};
}
+43 -30
View File
@@ -1,38 +1,51 @@
{ pkgs, ... }:
{
virtualisation.podman = {
enable = true;
config,
lib,
pkgs,
...
}:
let
cfg = config.homelab.virtualization;
in
{
config = lib.mkMerge [
(lib.mkIf cfg.podman.enable {
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
# For rootless containers
security.unprivilegedUsernsClone = true;
# For rootless containers
security.unprivilegedUsernsClone = true;
users.users.river = {
subUidRanges = [
{
startUid = 100000;
count = 65536;
}
];
subGidRanges = [
{
startGid = 100000;
count = 65536;
}
];
users.users.${cfg.user} = {
subUidRanges = [
{
startUid = 100000;
count = 65536;
}
];
subGidRanges = [
{
startGid = 100000;
count = 65536;
}
];
extraGroups = [
"podman"
];
};
extraGroups = [
"podman"
];
};
})
environment.systemPackages = with pkgs; [
podman
podman-compose
podman-desktop
(lib.mkIf cfg.podman.packages.enable {
environment.systemPackages = with pkgs; [
podman
podman-compose
podman-desktop
];
})
];
}