diff --git a/configuration.nix b/configuration.nix index 6f1069f..cfb6405 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,6 +51,21 @@ enableSSHSupport = true; }; + programs.zsh.enable = true; + programs.zsh.ohMyZsh.enable = true; + programs.zsh.autosuggestions.enable = true; + programs.zsh.shellAliases = { + "gac" = "git add . && git commit"; + "v" = "nvim"; + "c" = "clear"; + "s" = "ls"; + "e" = "exit"; + "sy" = "systemctl"; + "cp" = "cp -r"; + }; + programs.zsh.ohMyZsh.plugins = [ "git" "command-not-found" ]; + programs.zsh.syntaxHighlighting.enable = true; + # List services that you want to enable: # Enable the OpenSSH daemon. diff --git a/users.nix b/users.nix index 918326b..571aaaf 100644 --- a/users.nix +++ b/users.nix @@ -10,26 +10,27 @@ in systemd.tmpfiles.rules = [ "d /server 0755 root root" - "d ${prefix} 0755 root root" + "d /server/current 0755 root root" ]; users.users = let user = - { manager ? false, name, passwd }: { + { zsh ? false, manager ? false, name, passwd }: { isNormalUser = true; home = "${prefix}/${name}"; createHome = true; extraGroups = [ "current" ] ++ (if manager then ["docker" "wheel"] else []); - shell = pkgs.bash; + shell = (if zsh then pkgs.zsh else pkgs.bash); password = passwd; }; in { - junikim = user { name = "junikim"; passwd = "1234"; }; + junikim = user { manager = true; name = "junikim"; passwd = "1234"; }; a = user { name = "a"; passwd = "1234"; }; b = user { name = "b"; passwd = "1234"; }; + c = user { name = "c"; passwd = "1234"; }; }; home-manager.users =