diff --git a/hosts/artemis/homebrew.nix b/hosts/artemis/homebrew.nix index 5d19871..83172c0 100644 --- a/hosts/artemis/homebrew.nix +++ b/hosts/artemis/homebrew.nix @@ -44,6 +44,7 @@ casks = [ "steam" "discord" + "discord@canary" "Sikarugir-App/sikarugir/sikarugir" "zen" "python" diff --git a/modules/k3s/default.nix b/modules/k3s/default.nix index c0fc618..c1e60ed 100644 --- a/modules/k3s/default.nix +++ b/modules/k3s/default.nix @@ -22,6 +22,25 @@ in boot.kernelModules = [ "fuse" ]; programs.fuse.userAllowOther = true; + environment.etc."cdi/fuse.json".text = builtins.toJSON { + cdiVersion = "1.1.0"; + kind = "cdi.nyxerinys.dev/fuse"; + devices = [ + { + name = "rw"; + containerEdits = { + deviceNodes = [ + { + path = "/dev/fuse"; + type = "c"; + fileMode = 438; + permissions = "rw"; + } + ]; + }; + } + ]; + }; networking.firewall.allowedTCPPorts = [ 6443 # k3s, api server diff --git a/modules/k3s/deployments/storage-combo.nix b/modules/k3s/deployments/storage-combo.nix index 4f32bca..5a3051f 100644 --- a/modules/k3s/deployments/storage-combo.nix +++ b/modules/k3s/deployments/storage-combo.nix @@ -26,29 +26,30 @@ containerPort = 2222; } ]; - volumeMounts = [ - { - name = "fuse-device"; - mountPath = "/dev/fuse"; - } - ]; + # volumeMounts = [ + # { + # name = "fuse-device"; + # mountPath = "/dev/fuse"; + # } + # ]; + resources.requests."cdi.k8s.io/cdi.nyxerinys.dev_fuse" = "1"; securityContext = { capabilities.add = ["SYS_ADMIN"]; - privileged = false; - runAsUser = 0; - runAsGroup = 0; - }; - } - ]; - volumes = [ - { - name = "fuse-device"; - hostPath = { - path = "/dev/fuse"; - type = "CharDevice"; + # privileged = false; + # runAsUser = 0; + # runAsGroup = 0; }; } ]; + # volumes = [ + # { + # name = "fuse-device"; + # hostPath = { + # path = "/dev/fuse"; + # type = "CharDevice"; + # }; + # } + # ]; }; }; }; diff --git a/modules/k3s/images/rsshfs-server.nix b/modules/k3s/images/rsshfs-server.nix index 26ff1a4..be14d7e 100644 --- a/modules/k3s/images/rsshfs-server.nix +++ b/modules/k3s/images/rsshfs-server.nix @@ -26,8 +26,8 @@ let KbdInteractiveAuthentication no PubkeyAuthentication no - PermitRootLogin yes - AllowUsers root + PermitRootLogin no + AllowUsers dev AllowTcpForwarding yes X11Forwarding no @@ -81,7 +81,7 @@ pkgs.dockerTools.buildLayeredImage { mkdir -p ./var/empty chmod 755 ./var/empty - mkdir -p ./home/dev/.ssh + mkdir -p ./home/dev/ chown -R 1000:1000 ./home/dev mkdir -p ./containers