summaryrefslogtreecommitdiff
path: root/modules/users/defin.nix
blob: 8d476faf65542ddf6e135498cd73e7797d1f996f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{config, pkgs, lib, ... }: {

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users = {

    mutableUsers = false;
    users.defin = {
      isNormalUser = true;
			description = "Devin Finlinson";
      extraGroups = [ "wheel" "builders" "video" "input"]; # Enable ‘sudo’ for the user.
			shell = pkgs.nushell;
      hashedPassword = "$6$UljPNAdxZ22lP3Bc$8VaEAacZxtXM3Zji2IA7Jf5fXs9pFnAVQff1d8IbfFOKCvjibceyopOAjRXa8lXtpOSJgPW1OO1dzOspqhWnz0";

			openssh.authorizedKeys.keyFiles = [
				(builtins.fetchurl {
					url = "https://git.wormcar.gay/devinf.keys";
          sha256 = "1p4gzgvyxzqr1raargq59qn6hs0bh8bd1rfvawn02mnaa4i8ysgg";
				})
			];
    };
  };

	# Allow to run nix
	nix.settings.allowed-users = [ "defin" ];

  # I can't think of a better spot to put this rn.
  services.openssh = {
    ports = [ 22 2200 ]; # needed because isp blocks ssh over 22
    settings.PasswordAuthentication = false;
  };
}