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.

60 lines
1.3 KiB

{ pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports = [
(import "${home-manager}/nixos")
];
users.users =
let
user =
{ manager ? false, name, passwd }: {
isNormalUser = true;
home = "/server/current/${name}";
createHome = true;
extraGroups = [ "current" ] ++
(if manager then ["docker" "wheel"] else []);
shell = pkgs.bash;
password = passwd;
};
in
{
junikim = user { name = "junikim"; passwd = "1234"; };
a = user { name = "a"; passwd = "1234"; };
b = user { name = "b"; passwd = "1234"; };
};
home-manager.users =
let
user = name: {
home = {
username = name;
homeDirectory = "/server/current/${name}";
stateVersion = "22.05";
};
programs = {
home-manager.enable = true;
neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
coc-nvim
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";
};
}