65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
boot = {
|
|
extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
|
|
kernelModules = [ "amneziawg" ];
|
|
loader.limine.secureBoot.enable = true;
|
|
};
|
|
environment.systemPackages = with pkgs; [
|
|
nixfmt-tree
|
|
openssl
|
|
sops
|
|
];
|
|
fileSystems."/".device = "/dev/mapper/root";
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
imports = [
|
|
../common.nix
|
|
./fs.nix
|
|
./vps-init.nix
|
|
];
|
|
networking = {
|
|
networkmanager.ensureProfiles = {
|
|
environmentFiles = [ config.sops.secrets.wifi-env.path ];
|
|
profiles = {
|
|
dhcp-ethernet.connection = {
|
|
id = "dhcp-ethernet";
|
|
type = "ethernet";
|
|
};
|
|
home-wifi = {
|
|
connection = {
|
|
id = "home-wifi";
|
|
type = "wifi";
|
|
};
|
|
ipv6.method = "disabled";
|
|
wifi-security = {
|
|
key-mgmt = "sae";
|
|
psk = "$BOGALE_5_PSK";
|
|
};
|
|
wifi.ssid = "bogale_5";
|
|
};
|
|
};
|
|
};
|
|
wg-quick.interfaces.awg0.type = "amneziawg";
|
|
};
|
|
sops = {
|
|
age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
defaultSopsFile = ../.secrets.yaml;
|
|
secrets = {
|
|
awg-obf = { };
|
|
root-passwd.neededForUsers = true;
|
|
wifi-env.restartUnits = [ "NetworkManager.service" ];
|
|
};
|
|
};
|
|
systemd.tmpfiles.rules = [
|
|
"L /root/backup/base/nixos - - - - /etc/nixos"
|
|
"L /root/backup/base/sbctl - - - - /var/lib/sbctl"
|
|
"L /root/backup/base/sops-nix - - - - /var/lib/sops-nix"
|
|
"d /root/backup/base"
|
|
];
|
|
users.users.root.hashedPasswordFile = config.sops.secrets.root-passwd.path;
|
|
}
|