nix/packages/hosts/rascal.nix

77 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2023-10-03 11:52:44 -05:00
{
hardware,
2023-10-03 11:52:44 -05:00
config,
...
2025-02-14 13:31:18 -06:00
}:
{
system.stateVersion = "24.05";
networking.hostName = "rascal";
2023-09-05 21:46:55 -05:00
2025-02-14 13:31:18 -06:00
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"ehci_pci"
"usbhid"
"uas"
"sd_mod"
];
boot.kernelModules = [ "kvm-amd" ];
2023-09-05 21:46:55 -05:00
2023-09-05 23:51:32 -05:00
fileSystems."/" = {
device = "/dev/disk/by-uuid/2e2ad73a-6264-4a7b-8439-9c05295d903d";
fsType = "f2fs";
};
2023-09-05 21:46:55 -05:00
2024-05-31 10:18:37 -05:00
fileSystems."/storage" = {
device = "/dev/disk/by-uuid/410fa651-4918-447c-9337-97cc12ff6d2a";
fsType = "ext4";
};
2023-09-05 23:51:32 -05:00
boot.loader.grub = {
enable = true;
device = "/dev/sda";
};
2023-09-05 21:46:55 -05:00
imports = with hardware; [
common-cpu-amd
common-pc-ssd
];
2025-02-14 13:31:18 -06:00
users.groups.beefcake = { };
2024-05-31 10:18:37 -05:00
users.users = {
beefcake = {
2024-09-12 14:47:21 -05:00
isSystemUser = true;
createHome = true;
home = "/storage/backups/beefcake";
2024-09-16 16:38:16 -05:00
group = "beefcake";
2025-02-14 13:31:18 -06:00
extraGroups = [ "sftponly" ];
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7HrojwoyHED+A/FzRjYmIL0hzofwBd9IYHH6yV0oPO root@beefcake"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAOEI82VdbyR1RYqSnFtlffHBtHFdXO0v9RmQH7GkfXo restic@beefcake"
];
2024-05-31 10:18:37 -05:00
};
};
2024-09-12 14:47:21 -05:00
services.openssh.extraConfig = ''
Match Group sftponly
ChrootDirectory /storage/backups/%u
ForceCommand internal-sftp
AllowTcpForwarding no
'';
2023-09-05 23:51:32 -05:00
networking = {
wifi.enable = true;
2024-05-31 10:18:37 -05:00
firewall = {
enable = true;
allowPing = true;
2025-02-14 13:31:18 -06:00
allowedTCPPorts = [ 22 ];
2024-05-31 10:18:37 -05:00
};
2023-09-05 21:46:55 -05:00
};
services.tailscale.useRoutingFeatures = "server";
home-manager.users.daniel = {
lyte.shell.enable = true;
};
2023-09-05 21:46:55 -05:00
}