You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

{ pkgs, ... }:
let
prefix = "/server/project";
in
{
systemd.tmpfiles.rules = [
"d /server 0777 root root"
"d /server/project 0770 root project"
];
users.groups = {
project = {};
};
users.users =
let
user =
{ zsh ? false, manager ? false, name, passwd }: {
isNormalUser = true;
home = "${prefix}/${name}";
createHome = true;
extraGroups = [ "project" ] ++
(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"; };
};
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;
};
};
};
in {
junikim = user "junikim";
a = user "a";
b = user "b";
};
}