{ pkgs, ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; prefix = "/server/current"; in { imports = [ (import "${home-manager}/nixos") ]; systemd.tmpfiles.rules = [ "d /server 0755 root root" "d /server/current 0755 root root" ]; users.users = let user = { zsh ? false, manager ? false, name, passwd }: { isNormalUser = true; home = "${prefix}/${name}"; createHome = true; extraGroups = [ "current" ] ++ (if manager then ["docker" "wheel"] else []); shell = (if zsh then pkgs.zsh else pkgs.bash); password = passwd; }; in { junikim = user { manager = true; name = "junikim"; passwd = "1234"; }; a = user { zsh = true; name = "a"; passwd = "1234"; }; b = user { name = "b"; passwd = "1234"; }; c = user { name = "c"; passwd = "1234"; }; }; home-manager.users = let user = name: { home = { username = name; homeDirectory = "${prefix}/${name}"; stateVersion = "22.05"; }; programs = { home-manager.enable = true; neovim = { enable = true; plugins = with pkgs.vimPlugins; [ neovim-sensible vim-airline vim-airline-themes vim-nix ]; }; git = { enable = true; }; starship.enable = true; }; }; in { junikim = user "junikim"; a = user "a"; b = user "b"; }; }