podman + removed lima cause its more of a dev tool
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": ["homelab"]
|
||||||
|
}
|
||||||
Generated
+1
-22
@@ -55,32 +55,11 @@
|
|||||||
"type": "indirect"
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs"
|
||||||
"quickshell": "quickshell"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
lima
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,38 +1,51 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
virtualisation.podman = {
|
config,
|
||||||
enable = true;
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.homelab.virtualization;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.podman.enable {
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# For rootless containers
|
# For rootless containers
|
||||||
security.unprivilegedUsernsClone = true;
|
security.unprivilegedUsernsClone = true;
|
||||||
|
|
||||||
users.users.river = {
|
users.users.${cfg.user} = {
|
||||||
subUidRanges = [
|
subUidRanges = [
|
||||||
{
|
{
|
||||||
startUid = 100000;
|
startUid = 100000;
|
||||||
count = 65536;
|
count = 65536;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
subGidRanges = [
|
subGidRanges = [
|
||||||
{
|
{
|
||||||
startGid = 100000;
|
startGid = 100000;
|
||||||
count = 65536;
|
count = 65536;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"podman"
|
"podman"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
(lib.mkIf cfg.podman.packages.enable {
|
||||||
podman
|
environment.systemPackages = with pkgs; [
|
||||||
podman-compose
|
podman
|
||||||
podman-desktop
|
podman-compose
|
||||||
|
podman-desktop
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user