2023-10-22 17:12:42 +02:00
|
|
|
{
|
2024-04-11 20:15:47 +02:00
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
extraInfo,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2023-10-22 17:12:42 +02:00
|
|
|
|
2024-07-30 20:42:59 +02:00
|
|
|
imports = [ ./hardware.nix ];
|
2023-10-22 17:12:42 +02:00
|
|
|
|
2024-07-30 20:42:59 +02:00
|
|
|
deployment.targetHost = null;
|
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
2023-10-22 17:12:42 +02:00
|
|
|
|
2024-04-11 20:15:47 +02:00
|
|
|
# Custom udev rules for Nucleo's stlink interface
|
2024-02-18 10:08:50 +01:00
|
|
|
services.udev.extraRules = ''
|
|
|
|
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b",MODE="660",GROUP="dialout",TAG+="uaccess"
|
|
|
|
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748",MODE="660",GROUP="dialout",TAG+="uaccess"
|
|
|
|
'';
|
2023-10-22 17:12:42 +02:00
|
|
|
|
2024-04-11 20:15:47 +02:00
|
|
|
# Nix
|
2024-08-01 21:40:51 +02:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-12-22 23:18:58 +01:00
|
|
|
|
2024-04-11 20:15:47 +02:00
|
|
|
# System secrets
|
2023-10-22 17:12:42 +02:00
|
|
|
sops = {
|
|
|
|
gnupg.sshKeyPaths = [ ];
|
|
|
|
age = {
|
|
|
|
sshKeyPaths = [ ];
|
|
|
|
keyFile = "/var/lib/sops-nix/key.txt";
|
|
|
|
};
|
|
|
|
defaultSopsFile = ./secrets/secrets.yaml;
|
|
|
|
secrets.wg0_private = { };
|
|
|
|
};
|
|
|
|
|
2024-04-11 20:15:47 +02:00
|
|
|
# Wireguard
|
2023-10-22 17:12:42 +02:00
|
|
|
networking.wg-quick.interfaces.wg0 = {
|
2023-12-24 20:41:29 +01:00
|
|
|
address = [ "10.100.0.4/8" ];
|
2023-10-22 17:12:42 +02:00
|
|
|
dns = [ "10.100.0.1" ];
|
|
|
|
|
|
|
|
listenPort = 51820;
|
|
|
|
privateKeyFile = config.sops.secrets.wg0_private.path;
|
|
|
|
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
# Rock Pro 64
|
|
|
|
publicKey = "XVmG3/rNsCqc8KCmOx3+UUn9DJOnJ40Uxid5JGdChR4=";
|
|
|
|
endpoint = "${extraInfo.wireguard.rockProEndpoint}:51820";
|
2023-12-25 21:53:14 +01:00
|
|
|
allowedIPs = [ "10.100.0.1" ];
|
2023-10-22 17:12:42 +02:00
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-04-11 20:15:47 +02:00
|
|
|
# User config
|
2024-08-01 21:40:51 +02:00
|
|
|
my.users = {
|
2023-10-22 17:12:42 +02:00
|
|
|
dala = {
|
|
|
|
description = "Dala";
|
2024-04-11 20:15:47 +02:00
|
|
|
groups = [
|
2024-06-08 08:11:42 +02:00
|
|
|
"docker"
|
2024-04-11 20:15:47 +02:00
|
|
|
"wheel"
|
|
|
|
"video"
|
|
|
|
"audio"
|
|
|
|
"seat"
|
|
|
|
"keys"
|
|
|
|
"lp"
|
|
|
|
"dialout"
|
|
|
|
"network"
|
|
|
|
];
|
2023-10-22 17:12:42 +02:00
|
|
|
uid = 1000;
|
|
|
|
shell = pkgs.fish;
|
2024-08-03 07:09:32 +02:00
|
|
|
hmConfig =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
programs.helix.enable = true;
|
2023-10-22 17:12:42 +02:00
|
|
|
|
2024-08-03 07:09:32 +02:00
|
|
|
my.desktop.sway.monitors = [
|
|
|
|
{
|
|
|
|
name = "Iiyama North America PL2470H 0x0000047B";
|
|
|
|
resolution = "1920x1080@165.003Hz";
|
|
|
|
position = "1920 0";
|
|
|
|
defaultWorkspace = 1;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Iiyama North America PL2530H 1154392601941";
|
|
|
|
resolution = "1920x1080@74.973Hz";
|
|
|
|
position = "0 0";
|
|
|
|
defaultWorkspace = 2;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-08-03 22:17:23 +02:00
|
|
|
my.development.tools.embedded.enable = true;
|
|
|
|
my.development.tools.networking.enable = true;
|
2024-08-03 07:09:32 +02:00
|
|
|
my.games.wine.enable = true;
|
2024-08-14 22:43:28 +02:00
|
|
|
my.games.steam.enable = true;
|
2024-10-26 14:09:59 +02:00
|
|
|
my.games.minecraft.enable = true;
|
2024-08-03 07:09:32 +02:00
|
|
|
};
|
2023-10-22 17:12:42 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|