2023-09-12 08:44:05 -06:00
|
|
|
{ config
|
|
|
|
, pkgs
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2023-10-06 06:20:54 -06:00
|
|
|
testingMode = true;
|
|
|
|
syslogPort = 514;
|
2022-08-29 09:48:47 -06:00
|
|
|
pubKeys = [
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBB/V8N5fqlSGgRCtLJMLDJ8Hd3JcJcY8skI0l+byLNRgQLZfTQRxlZ1yymRs36rXj+ASTnyw5ZDv+q2aXP7Lj0= hosts@secretive.plq.local"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7v+/xS8832iMqJHCWsxUZ8zYoMWoZhjj++e26g1fLT europa"
|
2023-02-08 15:36:07 -07:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJrKLKzJQcecdPXUm5xCfinLKDStNP3MawaXy06krcK5 abieber@litr"
|
2022-08-29 09:48:47 -06:00
|
|
|
];
|
|
|
|
|
2022-11-07 11:53:06 -07:00
|
|
|
userBase = {
|
|
|
|
openssh.authorizedKeys.keys = pubKeys ++ config.myconf.managementPubKeys;
|
|
|
|
};
|
2023-07-11 09:12:50 -06:00
|
|
|
peerixUser =
|
|
|
|
if builtins.hasAttr "peerix" config.users.users
|
|
|
|
then config.users.users.peerix.name
|
|
|
|
else "root";
|
2023-09-15 05:57:13 -06:00
|
|
|
#doom-emacs = inputs.nix-doom-emacs.packages.${pkgs.system}.default.override {
|
|
|
|
# doomPrivateDir = ../../configs/doom.d;
|
|
|
|
#};
|
2023-09-12 08:44:05 -06:00
|
|
|
in
|
|
|
|
{
|
2022-08-31 07:54:25 -06:00
|
|
|
_module.args.isUnstable = true;
|
2023-09-12 08:44:05 -06:00
|
|
|
imports = [ ./hardware-configuration.nix ];
|
2022-08-29 09:48:47 -06:00
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
efi.efiSysMountPoint = "/boot/efi";
|
|
|
|
};
|
|
|
|
|
|
|
|
initrd = {
|
2023-07-11 09:12:50 -06:00
|
|
|
luks.devices."luks-23b20980-eb1e-4390-b706-f0f42a623ddf".device = "/dev/disk/by-uuid/23b20980-eb1e-4390-b706-f0f42a623ddf";
|
|
|
|
luks.devices."luks-23b20980-eb1e-4390-b706-f0f42a623ddf".keyFile = "/crypto_keyfile.bin";
|
2023-09-12 08:44:05 -06:00
|
|
|
secrets = { "/crypto_keyfile.bin" = null; };
|
2022-08-29 09:48:47 -06:00
|
|
|
};
|
2023-09-12 08:44:05 -06:00
|
|
|
kernelParams = [ "intel_idle.max_cstate=4" ];
|
2022-09-27 10:38:04 -06:00
|
|
|
kernelPackages = pkgs.linuxPackages;
|
2022-08-29 09:48:47 -06:00
|
|
|
};
|
2023-03-16 12:46:02 -06:00
|
|
|
security.pki.certificates = [
|
|
|
|
''
|
|
|
|
-----BEGIN CERTIFICATE-----
|
|
|
|
MIIDPTCCAiWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDExdPYnNp
|
|
|
|
ZGlhbiBMb2NhbCBSRVNUIEFQSTAeFw0yMzAyMTMxNzQ5MjVaFw0yNDAyMTMxNzQ5
|
|
|
|
MjVaMCIxIDAeBgNVBAMTF09ic2lkaWFuIExvY2FsIFJFU1QgQVBJMIIBIjANBgkq
|
|
|
|
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0yijxG36TcCF7/NzZoBJFqxazwFhMB10
|
|
|
|
D6p4PIx0JZvGaTREEZ+pIrkB4PrQ9WX8Te5trPxMXUYhoZGYPPhMPA60CARzkBFp
|
|
|
|
WcsGmEeqxGrOYM+ixGYPQ26qDyxiBC8Au0EDRoEsH0iE2YnX+5gLpYKVKTBOzpZo
|
|
|
|
w6BDT6zW+LyveVL8qNBWbsPxIV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+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAErodbwo
|
|
|
|
oCdB1x/GbE/Ap5pt0uuVymECgB9DGKmjFYzX9VB8i3Brjhp9UyqcpMKbA9hDhaOU
|
|
|
|
S+BOPL4rI5NMFQpaiRLSBPlQrsdKlXIMln3C2c2oHvcuw0agfkmXRonm7En8T7vC
|
|
|
|
kEWrZEZye9L8PRWRkHDwKb4lvOpnRcOvsV9ICRWEpFKVhP6I/HALfXonvMUNiOSo
|
|
|
|
5+7yxanKMvXNmZ6qLnfHbyUi9bv1jchgNwSatF5RI1tzstJf8hqDIH47NTbRUX+h
|
|
|
|
2hPSEdvfURSdHbvPsv8Ku87sgR+HY1P2j8Qdp63hALfkoMvaHn55MxRVUeVXExsn
|
|
|
|
tRhywtPsIHEmllI=
|
|
|
|
-----END CERTIFICATE-----
|
|
|
|
''
|
|
|
|
];
|
2022-08-29 09:48:47 -06:00
|
|
|
|
|
|
|
preDNS.enable = false;
|
|
|
|
networking = {
|
|
|
|
hostName = "stan";
|
2022-08-29 10:55:28 -06:00
|
|
|
|
|
|
|
hosts = {
|
2023-09-12 08:44:05 -06:00
|
|
|
"172.16.30.253" = [ "proxmox-02.vm.calyptix.local" ];
|
|
|
|
"127.0.0.1" = [ "borg.calyptix.dev" "localhost" ];
|
|
|
|
"192.168.122.249" = [ "arst.arst" "vm" ];
|
|
|
|
"192.168.8.194" = [ "router.arst" "router" ];
|
2022-08-29 10:55:28 -06:00
|
|
|
};
|
|
|
|
|
2022-08-29 09:48:47 -06:00
|
|
|
networkmanager.enable = true;
|
|
|
|
firewall = {
|
2023-11-14 06:49:31 -07:00
|
|
|
allowedTCPPorts = [ 22 ] ++ (if testingMode then [ 8080 ] else [ ]);
|
2023-10-06 06:20:54 -06:00
|
|
|
allowedUDPPorts = if testingMode then [ syslogPort ] else [ ];
|
2023-11-14 06:49:31 -07:00
|
|
|
checkReversePath = "loose";
|
2022-08-29 09:48:47 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-06 06:20:54 -06:00
|
|
|
|
2022-08-29 09:48:47 -06:00
|
|
|
i18n.defaultLocale = "en_US.utf8";
|
|
|
|
|
2022-08-29 09:50:41 -06:00
|
|
|
kde.enable = true;
|
|
|
|
defaultUsers.enable = false;
|
2022-08-30 21:44:20 -06:00
|
|
|
sshFidoAgent.enable = true;
|
2022-08-29 09:48:47 -06:00
|
|
|
|
|
|
|
sops.secrets = {
|
2022-09-12 13:20:43 -06:00
|
|
|
vm_pass = {
|
|
|
|
sopsFile = config.xin-secrets.stan.main;
|
|
|
|
owner = "root";
|
|
|
|
group = "wheel";
|
|
|
|
mode = "400";
|
|
|
|
};
|
2022-08-30 15:56:37 -06:00
|
|
|
peerix_private_key = {
|
|
|
|
sopsFile = config.xin-secrets.stan.peerix;
|
2022-09-01 12:42:47 -06:00
|
|
|
owner = "${peerixUser}";
|
|
|
|
group = "wheel";
|
2022-08-30 15:56:37 -06:00
|
|
|
mode = "400";
|
|
|
|
};
|
2022-08-29 09:48:47 -06:00
|
|
|
};
|
|
|
|
|
2022-08-29 09:50:41 -06:00
|
|
|
users.users.root = userBase;
|
2023-07-11 09:12:50 -06:00
|
|
|
users.users.abieber =
|
|
|
|
{
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Aaron Bieber";
|
|
|
|
shell = pkgs.zsh;
|
2023-09-12 08:44:05 -06:00
|
|
|
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
|
2023-07-11 09:12:50 -06:00
|
|
|
}
|
|
|
|
// userBase;
|
2022-08-29 09:48:47 -06:00
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
barrier
|
2023-03-01 08:50:24 -07:00
|
|
|
bitwarden
|
2023-10-17 07:40:33 -06:00
|
|
|
bruno
|
2022-08-29 09:48:47 -06:00
|
|
|
fzf
|
2023-10-31 06:47:50 -06:00
|
|
|
google-chrome
|
2022-08-29 09:48:47 -06:00
|
|
|
ispell
|
|
|
|
keychain
|
2023-03-06 13:13:58 -07:00
|
|
|
libreoffice
|
2023-01-26 08:46:14 -07:00
|
|
|
mattermost-desktop
|
2022-08-29 09:48:47 -06:00
|
|
|
mosh
|
|
|
|
mupdf
|
|
|
|
nmap
|
2023-10-11 09:44:37 -06:00
|
|
|
oath-toolkit
|
2022-08-29 09:48:47 -06:00
|
|
|
oathToolkit
|
2022-10-18 07:06:44 -06:00
|
|
|
obsidian
|
2022-08-29 09:48:47 -06:00
|
|
|
obs-studio
|
|
|
|
openvpn
|
2022-09-29 11:27:52 -06:00
|
|
|
remmina
|
2023-03-01 08:50:24 -07:00
|
|
|
rex
|
2023-10-11 09:44:37 -06:00
|
|
|
rustdesk
|
2023-10-06 11:56:16 -06:00
|
|
|
snmpcheck
|
2022-08-29 09:48:47 -06:00
|
|
|
sshfs
|
2023-10-31 12:50:58 -06:00
|
|
|
step-cli
|
2022-08-31 08:55:28 -06:00
|
|
|
tcpdump
|
2023-10-11 09:44:37 -06:00
|
|
|
unzip
|
2022-08-29 09:48:47 -06:00
|
|
|
virt-manager
|
|
|
|
wireshark
|
2022-08-31 07:53:26 -06:00
|
|
|
zig
|
2022-08-29 09:48:47 -06:00
|
|
|
];
|
|
|
|
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
|
|
|
|
|
|
programs = {
|
2023-09-12 08:44:05 -06:00
|
|
|
git.config.safe.directory = "/home/abieber/aef100";
|
2022-08-29 09:48:47 -06:00
|
|
|
dconf.enable = true;
|
|
|
|
zsh.enable = true;
|
2023-09-12 08:44:05 -06:00
|
|
|
ssh.knownHosts = {
|
|
|
|
"[192.168.122.249]:7022".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAOzf2Rv6FZYuH758TlNBcq4CXAHTPJxe5qoQTRM3nRc";
|
|
|
|
};
|
2022-08-29 09:48:47 -06:00
|
|
|
};
|
|
|
|
|
2022-08-30 15:56:37 -06:00
|
|
|
tsPeerix = {
|
2022-09-01 12:14:46 -06:00
|
|
|
enable = false;
|
2022-08-30 15:56:37 -06:00
|
|
|
privateKeyFile = "${config.sops.secrets.peerix_private_key.path}";
|
2023-09-12 08:44:05 -06:00
|
|
|
interfaces = [ "wlp170s0" "ztksevmpn3" ];
|
2022-08-30 15:56:37 -06:00
|
|
|
};
|
|
|
|
|
2022-08-29 09:48:47 -06:00
|
|
|
services = {
|
2023-10-06 06:20:54 -06:00
|
|
|
rsyslogd = {
|
|
|
|
enable = testingMode;
|
|
|
|
defaultConfig = ''
|
|
|
|
module(load="imudp")
|
|
|
|
input(type="imudp" port="${toString syslogPort}")
|
|
|
|
|
|
|
|
daemon.* -/var/log/daemon
|
|
|
|
*.warning;*.warn -/var/log/warning
|
|
|
|
'';
|
|
|
|
};
|
2022-08-29 09:48:47 -06:00
|
|
|
printing.enable = true;
|
|
|
|
fwupd.enable = true;
|
2023-02-13 10:42:47 -07:00
|
|
|
unifi.enable = false;
|
2022-08-29 09:48:47 -06:00
|
|
|
openntpd.enable = true;
|
|
|
|
resolved = {
|
|
|
|
enable = true;
|
|
|
|
dnssec = "allow-downgrade";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-15 09:10:54 -06:00
|
|
|
|
2022-11-08 14:54:41 -07:00
|
|
|
system.autoUpgrade.allowReboot = false;
|
2022-08-29 09:48:47 -06:00
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
|
|
|
}
|