no more rootless docker
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{ pkgs, lib, modulesPath, ... }:
|
||||
let
|
||||
stateVersion = "24.05";
|
||||
userName = "myuser";
|
||||
repoPath = "/srv/nix-docker";
|
||||
unstable = import <nixos-unstable> {};
|
||||
in
|
||||
{
|
||||
@@ -9,7 +11,11 @@ in
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz}/nixos")
|
||||
(fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master")
|
||||
./users.nix
|
||||
(import ./users.nix {
|
||||
inherit stateVersion;
|
||||
inherit userName;
|
||||
inherit repoPath;
|
||||
})
|
||||
# ./mounts.nix
|
||||
];
|
||||
|
||||
@@ -33,10 +39,10 @@ in
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
# https://docs.docker.com/engine/security/rootless/
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# rootless = {
|
||||
# enable = true;
|
||||
# setSocketVariable = true;
|
||||
# };
|
||||
};
|
||||
services.vscode-server.enable = true;
|
||||
|
||||
|
||||
14
users.nix
14
users.nix
@@ -1,13 +1,21 @@
|
||||
{ ... }:
|
||||
{ stateVersion, userName, repoPath, ... }:
|
||||
{
|
||||
users.users.myuser = {
|
||||
users.users.${userName} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # needed for sudo without password
|
||||
# "docker" # needed for docker without sudo
|
||||
"docker" # needed for docker without sudo
|
||||
];
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
"/root/.ssh/authorized_keys" # should already have your public SSH key inside
|
||||
];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users.${userName} = {
|
||||
home.stateVersion = stateVersion;
|
||||
imports = [ (import ./git.nix { inherit repoPath; }) ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user