2022-05-10 20:44:45 +00:00
|
|
|
{ config, pkgs, lib, inputs, ... }:
|
2020-08-15 03:27:08 +00:00
|
|
|
|
|
|
|
{
|
2020-08-17 21:37:22 +00:00
|
|
|
imports = [
|
|
|
|
./boot-config.nix
|
|
|
|
./hardware-configuration.nix
|
2021-08-26 18:06:46 +00:00
|
|
|
./scripts.nix
|
2020-12-18 05:36:57 +00:00
|
|
|
../../sets/builder.nix
|
2023-08-06 06:00:45 +00:00
|
|
|
../../sets/disc.nix
|
2020-11-01 20:27:07 +00:00
|
|
|
../../sets/fpga.nix
|
2020-11-17 01:51:13 +00:00
|
|
|
../../sets/hacking.nix
|
|
|
|
../../sets/hardware.nix
|
2023-08-06 06:00:45 +00:00
|
|
|
../../sets/music.nix
|
2021-05-11 01:43:20 +00:00
|
|
|
../../sets/radio.nix
|
2023-08-26 23:32:14 +00:00
|
|
|
../../sets/secureBoot.nix
|
2021-09-18 17:02:03 +00:00
|
|
|
../../sets/sshd.nix
|
2020-11-17 01:51:13 +00:00
|
|
|
../../sets/virtualization.nix
|
2021-01-10 06:27:22 +00:00
|
|
|
../../sets/workstation.nix
|
2022-05-10 20:44:45 +00:00
|
|
|
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
inputs.nixos-hardware.nixosModules.common-gpu-amd
|
2023-11-26 07:30:29 +00:00
|
|
|
inputs.private.nixosModules.starlight
|
2020-08-17 21:37:22 +00:00
|
|
|
];
|
2020-08-15 03:27:08 +00:00
|
|
|
|
2020-11-26 04:17:41 +00:00
|
|
|
# Network
|
2020-08-15 03:27:08 +00:00
|
|
|
networking.hostName = "starlight";
|
2020-10-21 21:04:01 +00:00
|
|
|
services.udev.extraRules = ''
|
2020-11-26 04:17:41 +00:00
|
|
|
KERNEL=="eth*", ATTR{address}=="00:0f:53:16:15:9c", NAME="lan10g0"
|
|
|
|
KERNEL=="eth*", ATTR{address}=="00:0f:53:16:15:9d", NAME="lan10g1"
|
2020-12-10 16:27:06 +00:00
|
|
|
KERNEL=="eth*", ATTR{address}=="b4:2e:99:3d:07:66", NAME="lan1g0"
|
2022-05-03 14:40:21 +00:00
|
|
|
|
|
|
|
SUBSYSTEM=="usb", ATTR{idVendor}=="057e", ATTR{idProduct}=="3000", TAG+="uaccess", TAG+="udev-acl"
|
2020-10-21 21:04:01 +00:00
|
|
|
'';
|
2023-03-08 05:04:56 +00:00
|
|
|
|
|
|
|
networking.useDHCP = false;
|
|
|
|
|
2023-11-14 02:47:25 +00:00
|
|
|
networking.vswitches.vs0 = {
|
|
|
|
extraOvsctlCmds = ''
|
|
|
|
set Port vs0 tag=1
|
|
|
|
'';
|
|
|
|
interfaces = {
|
|
|
|
lan10g0 = { };
|
|
|
|
lan10g1 = { };
|
|
|
|
lan1g0 = { vlan = 4; };
|
|
|
|
"vs0.4" = {
|
|
|
|
vlan = 4;
|
|
|
|
type = "internal";
|
|
|
|
};
|
2023-11-13 23:19:11 +00:00
|
|
|
};
|
2020-11-06 22:00:41 +00:00
|
|
|
};
|
2023-11-14 02:47:25 +00:00
|
|
|
networking.interfaces."vs0" = {
|
2020-11-06 22:00:41 +00:00
|
|
|
useDHCP = true;
|
|
|
|
ipv6.addresses = [{
|
|
|
|
address = "2001:470:8b04:6900:6969:1454:7749:e591";
|
|
|
|
prefixLength = 128;
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2021-09-18 17:44:53 +00:00
|
|
|
services.openssh.extraConfig = ''
|
|
|
|
HostCertificate ${./starlight-cert.pub}
|
|
|
|
'';
|
2020-11-26 04:17:41 +00:00
|
|
|
|
|
|
|
# Filesystems
|
|
|
|
services.btrfs.autoScrub = {
|
|
|
|
enable = true;
|
2021-08-26 23:17:40 +00:00
|
|
|
fileSystems = [ "/" "/media/data" ];
|
2020-11-26 04:17:41 +00:00
|
|
|
};
|
|
|
|
|
2021-04-20 00:12:53 +00:00
|
|
|
# Skye user for luna
|
|
|
|
users.users.skye = {
|
|
|
|
isSystemUser = true;
|
|
|
|
uid = 1001;
|
2021-09-18 17:09:49 +00:00
|
|
|
group = "users";
|
2021-04-20 00:12:53 +00:00
|
|
|
};
|
|
|
|
|
2020-11-26 04:17:41 +00:00
|
|
|
# Packages
|
2023-11-13 23:19:11 +00:00
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
2020-08-15 03:27:08 +00:00
|
|
|
|
2022-12-30 03:23:52 +00:00
|
|
|
services.printing.drivers = [
|
|
|
|
(pkgs.brlaser.overrideAttrs (old: {
|
|
|
|
version = "unstable-2020-04-20";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "pdewacht";
|
|
|
|
repo = "brlaser";
|
|
|
|
rev = "9d7ddda8383bfc4d205b5e1b49de2b8bcd9137f1";
|
|
|
|
sha256 = "sha256-pNkwJKdKhBO8u97GyvfxmyisaqIkzuk5UslWdaYFMLc=";
|
|
|
|
};
|
|
|
|
}))
|
|
|
|
];
|
|
|
|
|
2021-07-08 01:43:45 +00:00
|
|
|
# Home
|
2021-08-26 17:12:58 +00:00
|
|
|
home-manager.users.artemis = {
|
2023-08-26 23:50:44 +00:00
|
|
|
programs.git.signing.key =
|
|
|
|
lib.mkForce "3D2BB230F9FAF0C5183246DD4FDC96F161E7BA8A";
|
2021-08-26 17:12:58 +00:00
|
|
|
programs.mpv.defaultProfiles = [ "gpu-hq" ];
|
|
|
|
wayland.windowManager.sway.config.output = {
|
2023-08-26 23:00:18 +00:00
|
|
|
"DP-1" = {
|
|
|
|
pos = "0 0";
|
|
|
|
mode = "3840x2160@59.997Hz";
|
|
|
|
scale = "2";
|
|
|
|
};
|
|
|
|
"DP-2" = {
|
|
|
|
pos = "1920 0";
|
|
|
|
mode = "3840x2160@59.997Hz";
|
|
|
|
scale = "2";
|
|
|
|
};
|
|
|
|
"DP-3" = {
|
|
|
|
pos = "3840 0";
|
|
|
|
mode = "3840x2160@60Hz";
|
|
|
|
scale = "2";
|
|
|
|
};
|
2021-08-26 17:12:58 +00:00
|
|
|
};
|
|
|
|
# no toTOML generator so I guess we have to do this
|
|
|
|
xdg.configFile."rustybar/config.toml".text = ''
|
|
|
|
[[tile]]
|
|
|
|
type = "load"
|
|
|
|
[[tile]]
|
|
|
|
type = "memory"
|
|
|
|
[[tile]]
|
|
|
|
type = "hostname"
|
|
|
|
[[tile]]
|
2023-12-13 02:03:33 +00:00
|
|
|
type = "internet_time"
|
|
|
|
[[tile]]
|
2023-12-11 06:29:24 +00:00
|
|
|
type = "local_time"
|
2023-12-13 02:03:33 +00:00
|
|
|
format = "%a %b %e %H:%M %Z"
|
2023-12-11 06:29:24 +00:00
|
|
|
geoip_path = "${config.artemist.geoip}"
|
2023-12-13 02:03:33 +00:00
|
|
|
fallback_zone = "America/New_York"
|
2023-12-11 06:29:24 +00:00
|
|
|
[[tile]]
|
|
|
|
type = "utc_time"
|
2023-12-13 02:03:33 +00:00
|
|
|
format = "%FT%TZ (%s)"
|
2021-08-26 17:12:58 +00:00
|
|
|
'';
|
2023-10-19 00:02:04 +00:00
|
|
|
xdg.userDirs = {
|
|
|
|
music = "/media/data/Musik";
|
|
|
|
pictures = "/media/luna/photos";
|
|
|
|
};
|
2021-08-26 17:12:58 +00:00
|
|
|
};
|
2023-12-22 04:13:31 +00:00
|
|
|
|
|
|
|
# oh god
|
|
|
|
system.includeBuildDependencies = true;
|
2021-07-08 01:43:45 +00:00
|
|
|
# NixOS
|
2022-02-19 05:40:37 +00:00
|
|
|
system.stateVersion = "21.11";
|
2020-08-15 03:27:08 +00:00
|
|
|
}
|