195 lines
4.1 KiB
Nix
195 lines
4.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
./boot-config.nix
|
|
./hardware-configuration.nix
|
|
./scripts.nix
|
|
./postgres.nix
|
|
../../sets/builder.nix
|
|
../../sets/disc.nix
|
|
../../sets/fpga.nix
|
|
../../sets/hacking.nix
|
|
../../sets/hardware.nix
|
|
../../sets/music.nix
|
|
../../sets/radio.nix
|
|
../../sets/secureBoot.nix
|
|
../../sets/sshd.nix
|
|
../../sets/virtualization.nix
|
|
../../sets/workstation.nix
|
|
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
|
inputs.private.nixosModules.starlight
|
|
];
|
|
|
|
# Network
|
|
networking.hostName = "starlight";
|
|
services.udev.extraRules = ''
|
|
KERNEL=="eth*", ATTR{address}=="00:0f:53:16:15:9c", NAME="lan10g0"
|
|
KERNEL=="eth*", ATTR{address}=="00:0f:53:16:15:9d", NAME="lan10g1"
|
|
KERNEL=="eth*", ATTR{address}=="b4:2e:99:3d:07:66", NAME="lan1g0"
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", GROUP="plugdev"
|
|
'';
|
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.vswitches.vs0 = {
|
|
extraOvsctlCmds = ''
|
|
set Port vs0 tag=1
|
|
'';
|
|
interfaces = {
|
|
lan10g0 = { };
|
|
lan10g1 = { };
|
|
lan1g0 = {
|
|
vlan = 4;
|
|
};
|
|
"vs0.4" = {
|
|
vlan = 4;
|
|
type = "internal";
|
|
};
|
|
};
|
|
};
|
|
networking.interfaces."vs0" = {
|
|
useDHCP = true;
|
|
ipv6.addresses = [
|
|
{
|
|
address = "2001:470:8b04:6900:6969:1454:7749:e591";
|
|
prefixLength = 128;
|
|
}
|
|
];
|
|
ipv4.addresses = [
|
|
{
|
|
address = "10.69.0.2";
|
|
prefixLength = 24;
|
|
}
|
|
];
|
|
};
|
|
systemd.services.lxd.path = [ pkgs.openvswitch ];
|
|
|
|
services.openssh.extraConfig = ''
|
|
HostCertificate ${./starlight-cert.pub}
|
|
'';
|
|
|
|
# Filesystems
|
|
services.btrfs.autoScrub = {
|
|
enable = true;
|
|
fileSystems = [
|
|
"/"
|
|
"/media/data"
|
|
];
|
|
};
|
|
|
|
# Skye user for luna
|
|
users.users.skye = {
|
|
isSystemUser = true;
|
|
uid = 1001;
|
|
group = "users";
|
|
};
|
|
|
|
# Packages
|
|
|
|
hardware.amdgpu = {
|
|
initrd.enable = true;
|
|
opencl.enable = true;
|
|
};
|
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
services.printing.drivers = [
|
|
pkgs.cups-dymo
|
|
(pkgs.brlaser.overrideAttrs (old: {
|
|
version = "unstable-2023-02-20";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "pdewacht";
|
|
repo = "brlaser";
|
|
rev = "2a49e3287c70c254e7e3ac9dabe9d6a07218c3fa";
|
|
sha256 = "sha256-1fvO9F7ifbYQHAy54mOx052XutfKXSK6iT/zj4Mhbww=";
|
|
};
|
|
}))
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
dolphin-emu
|
|
mgba
|
|
pcsx2
|
|
rpcs3
|
|
ryujinx
|
|
|
|
amdgpu_top
|
|
uhk-agent
|
|
];
|
|
|
|
services.udev.packages = with pkgs; [
|
|
rpcs3
|
|
uhk-udev-rules
|
|
];
|
|
|
|
programs.gamemode.enable = true;
|
|
users.users.artemis.extraGroups = [ "gamemode" ];
|
|
|
|
# Home
|
|
home-manager.users.artemis = {
|
|
programs.mangohud = {
|
|
enable = true;
|
|
enableSessionWide = true;
|
|
settings = {
|
|
preset = "0,1,2,3,4";
|
|
battery = false;
|
|
};
|
|
};
|
|
|
|
programs.git.signing.key = lib.mkForce "3D2BB230F9FAF0C5183246DD4FDC96F161E7BA8A";
|
|
programs.mpv.defaultProfiles = [ "high-quality" ];
|
|
wayland.windowManager.sway.config.output = {
|
|
"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";
|
|
};
|
|
};
|
|
# 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]]
|
|
type = "internet_time"
|
|
[[tile]]
|
|
type = "local_time"
|
|
format = "%a %b %e %H:%M %Z"
|
|
geoip_path = "${config.artemist.geoip}"
|
|
fallback_zone = "America/New_York"
|
|
[[tile]]
|
|
type = "utc_time"
|
|
format = "%FT%TZ (%s)"
|
|
'';
|
|
xdg.userDirs = {
|
|
music = "/media/data/Musik";
|
|
pictures = "/media/luna/photos";
|
|
};
|
|
};
|
|
|
|
# NixOS
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
system.stateVersion = "21.11";
|
|
}
|