73 lines
1.7 KiB
Nix
73 lines
1.7 KiB
Nix
{ inputs, outputs, config, pkgs, ... }:
|
|
|
|
{
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./file-systems.nix
|
|
./home-manager.nix
|
|
outputs.nixosModules.common
|
|
outputs.nixosModules.desktop
|
|
];
|
|
|
|
programs.steam.enable = true;
|
|
|
|
environment.etc = {
|
|
ssh-pub-key = {
|
|
target = "ssh/ssh_host_ed25519_key.pub";
|
|
source = ./ssh_host_ed25519_key.pub;
|
|
};
|
|
ssh-pub-key-cert = {
|
|
target = "ssh/ssh_host_ed25519_key-cert.pub";
|
|
source = ./ssh_host_ed25519_key-cert.pub;
|
|
};
|
|
};
|
|
|
|
# todo: target and/or archive
|
|
services.btrbk = {
|
|
sshAccess = [{
|
|
roles = [ "info" "source" "target" "delete" "snapshot" "send" "receive" ];
|
|
key =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJy2lSOeG4iCUlk+W0TK9DnJyHe/0XUU0PD0kokbWKF btrbk";
|
|
}];
|
|
instances.btrbk = {
|
|
onCalendar = "*:0/30"; # every 30 minutes
|
|
settings = {
|
|
snapshot_preserve = "2d";
|
|
snapshot_preserve_min = "latest";
|
|
snapshot_create = "onchange";
|
|
volume."/mnt/btr_user" = {
|
|
snapshot_dir = "btrbk_snapshots";
|
|
subvolume = {
|
|
data = { };
|
|
persist = { };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking = {
|
|
hostName = "trantor";
|
|
interfaces = {
|
|
enp3s0f1.useDHCP = true;
|
|
wlp4s0.useDHCP = true;
|
|
};
|
|
networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F";
|
|
};
|
|
|
|
services.xserver = { videoDrivers = [ "nvidia" ]; };
|
|
hardware.nvidia = {
|
|
nvidiaPersistenced = true;
|
|
modesetting.enable = true;
|
|
prime = {
|
|
sync.enable = true;
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
intelBusId = "PCI:0:2:0";
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.05";
|
|
}
|