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