2022-11-19 20:00:54 +01:00
|
|
|
|
{ nixos-hardware, ... }:
|
|
|
|
|
{ pkgs, ... }:
|
2022-05-04 10:46:29 +02:00
|
|
|
|
{
|
2022-10-13 14:14:30 +02:00
|
|
|
|
imports = [
|
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
2022-10-17 22:21:04 +02:00
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
2022-10-13 14:14:30 +02:00
|
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
../../users/erwin
|
|
|
|
|
../../users/root
|
|
|
|
|
../../users/builder
|
|
|
|
|
];
|
2021-11-21 19:07:12 +01:00
|
|
|
|
|
|
|
|
|
eboskma = {
|
2022-08-14 16:38:25 +02:00
|
|
|
|
users = {
|
|
|
|
|
erwin = {
|
2022-08-18 16:37:26 +02:00
|
|
|
|
enable = true;
|
2022-11-11 11:54:21 +01:00
|
|
|
|
home = true;
|
2022-08-14 16:38:25 +02:00
|
|
|
|
};
|
|
|
|
|
builder.enable = true;
|
2022-07-12 08:37:28 +02:00
|
|
|
|
};
|
2022-01-06 12:30:32 +01:00
|
|
|
|
# backscrub.enable = true;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
base = {
|
|
|
|
|
plymouth.enable = true;
|
|
|
|
|
work = false;
|
2022-10-30 21:11:07 +01:00
|
|
|
|
kernel = pkgs.linuxKernel.packages.linux_6_0;
|
2022-09-27 20:39:25 +02:00
|
|
|
|
udev-rules = {
|
|
|
|
|
qmk = true;
|
|
|
|
|
solo2 = true;
|
|
|
|
|
picotool = true;
|
|
|
|
|
blink1 = true;
|
|
|
|
|
probe-rs = true;
|
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
};
|
2021-11-22 08:04:54 +01:00
|
|
|
|
bluetooth.enable = true;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
desktop = {
|
|
|
|
|
enable = true;
|
2022-11-11 11:54:21 +01:00
|
|
|
|
wayland = true;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
home-manager = true;
|
|
|
|
|
};
|
2021-11-27 16:01:21 +01:00
|
|
|
|
docker.enable = true;
|
2022-02-09 08:13:16 +01:00
|
|
|
|
element-web.enable = false;
|
2021-11-27 16:01:21 +01:00
|
|
|
|
fonts.enable = true;
|
|
|
|
|
gnome.enable = true;
|
2022-11-19 20:00:54 +01:00
|
|
|
|
greetd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
sway = true;
|
2022-11-23 19:54:58 +01:00
|
|
|
|
hyprland = true;
|
2022-11-19 20:00:54 +01:00
|
|
|
|
};
|
2021-11-27 16:02:15 +01:00
|
|
|
|
# home-manager = {
|
|
|
|
|
# inherit (users) users;
|
|
|
|
|
# enable = true;
|
|
|
|
|
# };
|
2022-09-21 18:36:31 +02:00
|
|
|
|
libvirtd.enable = true;
|
2022-02-11 11:30:51 +01:00
|
|
|
|
livebook = {
|
|
|
|
|
enable = true;
|
|
|
|
|
dataDir = "/home/erwin/workspace/livebook";
|
|
|
|
|
userMapping = "1000:100";
|
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
networking = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2021-11-27 16:01:21 +01:00
|
|
|
|
nix-common = {
|
|
|
|
|
enable = true;
|
2022-10-10 18:35:50 +02:00
|
|
|
|
cross-systems = [ "aarch64-linux" ];
|
2021-11-27 16:01:21 +01:00
|
|
|
|
};
|
2022-06-24 08:42:58 +02:00
|
|
|
|
tablet.enable = false;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
sound.enable = true;
|
2021-12-06 09:58:39 +01:00
|
|
|
|
systemd.enable = true;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-01-26 14:59:34 +01:00
|
|
|
|
boot.loader = {
|
|
|
|
|
systemd-boot = {
|
|
|
|
|
enable = true;
|
2022-09-27 20:39:25 +02:00
|
|
|
|
configurationLimit = 10;
|
2022-01-26 14:59:34 +01:00
|
|
|
|
};
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "loki";
|
|
|
|
|
useDHCP = false;
|
2022-09-21 18:36:31 +02:00
|
|
|
|
networkmanager.enable = true;
|
|
|
|
|
useNetworkd = true;
|
|
|
|
|
|
|
|
|
|
hosts = {
|
|
|
|
|
"10.0.0.252" = [ "pve.datarift.nl" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
firewall = {
|
|
|
|
|
trustedInterfaces = [ "lo" ];
|
2022-09-27 20:38:45 +02:00
|
|
|
|
# interfaces."enp4s0" = {
|
|
|
|
|
allowedTCPPorts = [
|
|
|
|
|
# NFS
|
2022-10-07 20:42:59 +02:00
|
|
|
|
111
|
|
|
|
|
2049
|
|
|
|
|
4100
|
|
|
|
|
4101
|
|
|
|
|
4102
|
|
|
|
|
20048
|
2022-09-27 20:38:45 +02:00
|
|
|
|
|
|
|
|
|
# Horus System V2
|
2022-10-07 20:42:59 +02:00
|
|
|
|
12345
|
|
|
|
|
5555
|
|
|
|
|
5556
|
|
|
|
|
|
2022-09-27 20:38:45 +02:00
|
|
|
|
# Elixir/Phoenix dev environment
|
|
|
|
|
4000
|
2022-10-07 20:42:59 +02:00
|
|
|
|
|
2022-09-27 20:38:45 +02:00
|
|
|
|
# Sunshine
|
|
|
|
|
48010
|
|
|
|
|
];
|
2022-10-07 20:42:59 +02:00
|
|
|
|
|
2022-09-27 20:38:45 +02:00
|
|
|
|
allowedUDPPorts = [
|
|
|
|
|
# NFS
|
2022-10-07 20:42:59 +02:00
|
|
|
|
111
|
|
|
|
|
2049
|
|
|
|
|
4100
|
|
|
|
|
4101
|
|
|
|
|
4102
|
|
|
|
|
20048
|
2022-09-27 20:38:45 +02:00
|
|
|
|
];
|
2022-10-07 20:42:59 +02:00
|
|
|
|
|
2022-09-27 20:38:45 +02:00
|
|
|
|
allowedTCPPortRanges = [
|
|
|
|
|
# Sunshine
|
|
|
|
|
{ from = 47984; to = 47990; }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
allowedUDPPortRanges = [
|
|
|
|
|
# Sunshine
|
|
|
|
|
{ from = 47998; to = 48000; }
|
|
|
|
|
];
|
|
|
|
|
# };
|
2022-09-21 18:36:31 +02:00
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-09-21 18:36:31 +02:00
|
|
|
|
systemd.network = {
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
|
"40-enp4s0" = {
|
|
|
|
|
DHCP = "yes";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
# nix = {
|
|
|
|
|
# package = pkgs.nixUnstable;
|
|
|
|
|
# extraOptions = ''
|
|
|
|
|
# experimental-features = nix-command flakes
|
|
|
|
|
# '';
|
|
|
|
|
# };
|
|
|
|
|
|
2022-03-22 11:04:22 +01:00
|
|
|
|
services.openssh.enable = true;
|
2022-10-30 21:09:15 +01:00
|
|
|
|
programs.ssh.startAgent = true;
|
2021-11-26 22:21:16 +01:00
|
|
|
|
|
2022-09-27 20:38:45 +02:00
|
|
|
|
services.sunshine = {
|
|
|
|
|
enable = true;
|
|
|
|
|
user = "erwin";
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
};
|
2022-09-21 18:36:31 +02:00
|
|
|
|
|
2022-10-17 22:21:04 +02:00
|
|
|
|
powerManagement.powerUpCommands = ''
|
|
|
|
|
${pkgs.powertop}/bin/powertop --auto-tune
|
2022-11-22 19:59:57 +01:00
|
|
|
|
${pkgs.coreutils}/bin/echo 'on' > /sys/bus/usb/devices/5-4.2/power/control # Logitech G502 HERO SE
|
|
|
|
|
${pkgs.coreutils}/bin/echo 'on' > /sys/bus/usb/devices/5-4.1/power/control # splitkb Kyria rev1
|
2022-10-17 22:21:04 +02:00
|
|
|
|
'';
|
|
|
|
|
|
2022-09-21 18:36:31 +02:00
|
|
|
|
services.nfs.server = {
|
|
|
|
|
enable = true;
|
|
|
|
|
exports = ''
|
|
|
|
|
/home/erwin/proxmox-backup 10.0.0.0/24(rw,sync,no_subtree_check,anonuid=1000,anongid=100,all_squash)
|
|
|
|
|
'';
|
2022-10-03 19:44:17 +02:00
|
|
|
|
lockdPort = 4101;
|
|
|
|
|
mountdPort = 4102;
|
|
|
|
|
statdPort = 4100;
|
2022-09-21 18:36:31 +02:00
|
|
|
|
};
|
|
|
|
|
|
2021-11-26 22:21:16 +01:00
|
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
2021-12-10 20:11:36 +01:00
|
|
|
|
sops.secrets = {
|
|
|
|
|
ha_now_playing_token = {
|
|
|
|
|
owner = "erwin";
|
|
|
|
|
};
|
|
|
|
|
gh_token = {
|
|
|
|
|
owner = "erwin";
|
|
|
|
|
};
|
|
|
|
|
renovate_env = {
|
|
|
|
|
owner = "erwin";
|
|
|
|
|
};
|
2022-06-27 10:10:04 +02:00
|
|
|
|
livebook_cookie = {
|
|
|
|
|
owner = "erwin";
|
|
|
|
|
};
|
2021-11-26 22:21:16 +01:00
|
|
|
|
};
|
|
|
|
|
|
2021-11-21 19:07:12 +01:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
2022-10-25 09:40:08 +02:00
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
2021-11-21 19:07:12 +01:00
|
|
|
|
}
|