nixos-config/modules/users/alexander.nix

62 lines
1.7 KiB
Nix
Raw Normal View History

{ pkgs, lib, config, ... }:
2021-07-29 20:21:51 +00:00
{
config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
2021-07-29 20:21:51 +00:00
users.users.alexander = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" ];
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC";
shell = pkgs.zsh;
useDefaultShell = false;
uid = 1000;
isSystemUser = false;
};
2021-08-04 17:07:42 +00:00
2021-07-29 20:21:51 +00:00
# Activate gpg
programs.gnupg.agent.enable = true;
2021-08-04 17:07:42 +00:00
# No need to use users."${system.singleUser}" as we already know it
2021-07-29 20:21:51 +00:00
home-manager.users.alexander = {
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
2021-12-02 10:11:54 +00:00
matchBlocks = let
sshPort = (import ../../lib/ports.nix).sshPort;
in {
ayame = {
port = sshPort;
hostname = "78.46.184.48";
user = "alexander";
identityFile = "~/.ssh/polynom.me_ayame";
identitiesOnly = true;
};
"git.polynom.me" = {
port = 2222;
user = "gitea";
hostname = "git.polynom.me";
identityFile = "~/.ssh/gitea_papatutuwawa_ed";
};
"github.com" = {
user = "git";
hostname = "github.com";
identityFile = "~/.ssh/github_polynomdivision";
};
"minecraft" = {
port = sshPort;
user = "alexander";
hostname = "49.12.33.24";
identityFile = "~/.ssh/polynom.me";
};
};
2021-07-29 20:21:51 +00:00
};
# TODO: Maybe move this somewhere else
2021-07-29 20:21:51 +00:00
services.gpg-agent = {
enable = true;
pinentryFlavor = "qt";
2021-07-29 20:21:51 +00:00
};
};
};
}