From 29f4ab693d39420948a5d45523b9cec2c69a0bc9 Mon Sep 17 00:00:00 2001 From: k Date: Thu, 2 Jan 2025 02:09:07 +0000 Subject: [PATCH] added docker user --- hosts/server/configuration.nix | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 2a532ee..7bf6192 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -18,19 +18,33 @@ trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; }; }; + nixpkgs.config.allowUnfree = true; programs = { nix-ld.enable = true; nix-ld.libraries = with pkgs; [glibc glib]; zsh.enable = true; }; - - users.users.k = { - isNormalUser = true; - description = "k"; - extraGroups = ["networkmanager" "wheel"]; - packages = with pkgs; [zsh]; - shell = pkgs.zsh; + users = { + motd = "Welcome to the Server"; + defaultUserShell = pkgs.zsh; + users = { + k = { + isNormalUser = true; + description = "k"; + extraGroups = ["networkmanager" "wheel"]; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"]; + packages = with pkgs; [zsh]; + shell = pkgs.zsh; + }; + docker = { + isNormalUser = true; + description = "user for runing docker"; + extraGroups = ["docker"]; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"]; + packages = with pkgs; [docker-compose]; + }; + }; }; home-manager = {users = {"k" = import ./home.nix;};}; @@ -48,7 +62,6 @@ vaapiVdpau libvdpau-va-gl vpl-gpu-rt - neovim ]; };