62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
{
|
|
config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
|
|
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;
|
|
};
|
|
|
|
# Activate gpg
|
|
programs.gnupg.agent.enable = true;
|
|
|
|
# No need to use users."${system.singleUser}" as we already know it
|
|
home-manager.users.alexander = {
|
|
programs.home-manager.enable = true;
|
|
|
|
programs.ssh = {
|
|
enable = true;
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
|
|
# TODO: Maybe move this somewhere else
|
|
services.gpg-agent = {
|
|
enable = true;
|
|
pinentryFlavor = "qt";
|
|
};
|
|
};
|
|
};
|
|
}
|