blob: 71dcea495aaef2766bdc62c0d384244cb4022a4e [file] [log] [blame]
Skyler Grey4f3e6062023-03-04 01:29:29 +00001{ pkgs, ... }:
2let
3 createUser = { username, realname, founder = false, sudo = false, ... }: {
4 description = realname;
5 extraGroups = (
6 (if founder then [ "founder" ] else [ ]) ++
7 (if founder || sudo then [ "wheel" ] else [ ])
8 );
9 isNormalUser = true;
10 openssh.authorizedKeys.keyFiles = [ "./sshKeys/${username}" ];
11 };
Skyler Grey1e2187f2023-03-03 22:45:10 +000012
Skyler Grey4f3e6062023-03-04 01:29:29 +000013 users = {
14 "coded" = { realname = "Sam"; founder = true; };
15 "minion" = { realname = "Skyler"; founder = true; };
16 "pineapplefan" = { realname = "Ash"; founder = true; };
17 "eek" = { realname = "Nexus"; sudo = true; };
18 };
19in
20{
21 users = {
22 mutableUsers = false;
23 motd = ''
24 Welcome to Clicks! Please make sure to follow all guidelines for using the server, which you can find by typing
25 `guidelines` in your terminal. In particular, please remember to use this server as minimally as possible (e.g.
26 by keeping as much of your work as is possible stateless and by using your personal
27 "${builtins.readFile ./texts/MOTD}"
28 '';
29 defaultUserShell = pkgs.zsh;
30 users = builtins.mapAttrs (name: value: createUser { username = name; } // value) users;
31 groups = { };
32 };
Skyler Grey1e2187f2023-03-03 22:45:10 +000033}