2021-02-02 20:10:25 +01:00
|
|
|
inputs: {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
modules = [
|
|
|
|
../nixos-modules/default.nix
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
2021-08-19 18:14:15 +02:00
|
|
|
({ pkgs, config, secret, ... }: {
|
2021-11-07 23:28:33 +01:00
|
|
|
home-manager.users."main" =
|
2021-04-11 00:25:36 +02:00
|
|
|
{ ... }: {
|
|
|
|
imports = [ ../home-manager/modules/default.nix ];
|
|
|
|
|
|
|
|
magic_rb = {
|
2021-09-07 07:55:53 +02:00
|
|
|
optimisation.march = "skylake";
|
2021-07-03 20:41:04 +02:00
|
|
|
pins = inputs;
|
2021-04-11 00:25:36 +02:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
overlays = inputs.self.overlays;
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
alacritty.enable = true;
|
2021-05-09 23:34:02 +02:00
|
|
|
bash = {
|
|
|
|
enable = true;
|
|
|
|
enableDirenv = true;
|
|
|
|
};
|
2021-04-25 12:21:45 +02:00
|
|
|
ssh.enable = true;
|
2021-04-11 00:25:36 +02:00
|
|
|
emacs.enable = true;
|
|
|
|
xmonad.enable = true;
|
|
|
|
gpg.enable = true;
|
|
|
|
multimc.enable = false;
|
|
|
|
};
|
|
|
|
packageCollections = {
|
|
|
|
"3dPrinting".enable = false;
|
|
|
|
cmdline.enable = true;
|
|
|
|
graphical.enable = true;
|
|
|
|
rust.enable = true;
|
|
|
|
webdev.enable = false;
|
|
|
|
wine.enable = false;
|
|
|
|
};
|
|
|
|
};
|
2021-02-02 20:10:25 +01:00
|
|
|
|
2021-10-21 00:33:17 +02:00
|
|
|
services.syncthing.enable = true;
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
home.stateVersion = "20.09";
|
|
|
|
};
|
2021-02-02 20:10:25 +01:00
|
|
|
|
2021-03-21 15:04:21 +01:00
|
|
|
services.vault-agent = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
vault = {
|
2021-08-19 18:14:15 +02:00
|
|
|
address = "https://${secret.network.ips.vault.dns}:8200";
|
2021-03-21 15:04:21 +01:00
|
|
|
|
|
|
|
client_cert = "/etc/vault-agent/client.crt";
|
|
|
|
client_key = "/etc/vault-agent/client.key";
|
|
|
|
};
|
|
|
|
|
|
|
|
auto_auth = {
|
|
|
|
method = [
|
|
|
|
{
|
|
|
|
"cert" = {
|
|
|
|
name = "system-omen";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
template = [
|
|
|
|
{
|
2021-04-11 00:25:36 +02:00
|
|
|
source = pkgs.writeText "wg0.key.tpl" ''
|
2021-03-21 15:04:21 +01:00
|
|
|
{{ with secret "kv/data/systems/omen/wireguard" }}{{ .Data.data.private_key }}{{ end }}
|
|
|
|
'';
|
|
|
|
destination = "/var/secrets/wg0.key";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-03-14 22:22:45 +01:00
|
|
|
magic_rb = {
|
2021-09-07 07:55:53 +02:00
|
|
|
optimisation.march = "skylake";
|
|
|
|
|
2021-03-14 22:22:45 +01:00
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
efi.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
xserver = {
|
|
|
|
enable = true;
|
|
|
|
gpu = "nvidia";
|
|
|
|
xmonad = true;
|
|
|
|
|
|
|
|
nvidia = {
|
|
|
|
prime = true;
|
|
|
|
|
|
|
|
intelBusId = "PCI:0:2:0";
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
|
|
};
|
|
|
|
|
2021-05-12 23:57:02 +02:00
|
|
|
qwertyNeo2 = true;
|
2021-06-27 18:55:40 +02:00
|
|
|
mimickInTty = true;
|
2021-03-14 22:22:45 +01:00
|
|
|
};
|
|
|
|
|
2021-07-03 20:41:04 +02:00
|
|
|
pins = inputs;
|
2021-04-11 00:25:36 +02:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
overlays = inputs.self.overlays;
|
|
|
|
|
|
|
|
hardware.omen = true;
|
|
|
|
flakes.enable = true;
|
|
|
|
pulseaudio.enable = true;
|
2021-04-25 12:21:45 +02:00
|
|
|
sshdEmacs.enable = true;
|
2021-04-11 00:25:36 +02:00
|
|
|
networking = {
|
|
|
|
bluetooth = true;
|
|
|
|
networkManager = true;
|
2021-03-14 22:22:45 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
programs.steam.enable = true;
|
2021-03-14 22:22:45 +01:00
|
|
|
|
2021-06-15 21:25:16 +02:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-03-14 10:58:29 +01:00
|
|
|
|
2021-02-02 20:10:25 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "omen";
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eno1.useDHCP = true;
|
2021-02-26 10:32:26 +01:00
|
|
|
hostId = "10c7ffc5";
|
2021-03-21 15:04:21 +01:00
|
|
|
|
2021-08-19 18:14:15 +02:00
|
|
|
wireguard.interfaces."wg0" = {
|
2021-03-21 15:04:21 +01:00
|
|
|
|
2021-08-19 18:14:15 +02:00
|
|
|
} // config.magic_rb.secret.wireguard."omen";
|
2021-02-02 20:10:25 +01:00
|
|
|
};
|
|
|
|
|
2021-07-03 20:40:29 +02:00
|
|
|
security.pki.certificates = [ (builtins.readFile ../redalder.org.crt) ];
|
|
|
|
|
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
};
|
|
|
|
|
2021-02-02 20:10:25 +01:00
|
|
|
time.timeZone = "Europe/Bratislava";
|
|
|
|
system.stateVersion = "20.09";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|