nixos-config/system/starlight/default.nix

108 lines
2.7 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
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-11-17 01:51:13 +00:00
../../private/starlight.nix
../../sets/builder.nix
2020-11-17 01:51:13 +00:00
../../sets/cpu/amd.nix
2020-11-01 20:27:07 +00:00
../../sets/fpga.nix
2020-11-16 22:47:50 +00:00
../../sets/gpu/amd.nix
2020-11-17 01:51:13 +00:00
../../sets/hacking.nix
../../sets/hardware.nix
2021-02-20 23:32:07 +00:00
../../sets/krb5.nix
2021-05-11 01:43:20 +00:00
../../sets/radio.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
2021-06-10 04:36:46 +00:00
../../sets/1password.nix
2020-08-17 21:37:22 +00:00
];
2020-08-15 03:27:08 +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 = ''
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"
2020-10-21 21:04:01 +00:00
'';
networking.bridges.br0 = {
rstp = true;
2020-12-10 16:27:06 +00:00
interfaces = [ "lan10g0" "lan10g1" "lan1g0" ];
};
networking.interfaces.br0 = {
useDHCP = true;
ipv6.addresses = [{
address = "2001:470:8b04:6900:6969:1454:7749:e591";
prefixLength = 128;
}];
};
networking.dhcpcd.allowInterfaces = [ "br0" ];
2021-10-01 23:32:37 +00:00
networking.vlans."br0.5" = {
id = 5;
interface = "br0";
};
networking.bridges.brvm = {
rstp = false;
interfaces = [ "br0.5" ];
};
2021-09-18 17:44:53 +00:00
services.openssh.extraConfig = ''
HostCertificate ${./starlight-cert.pub}
'';
# Filesystems
services.btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" "/media/data" ];
};
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
};
# Packages
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
2020-08-15 03:27:08 +00:00
environment.systemPackages = with pkgs; [
2021-05-30 15:43:20 +00:00
(weechat.override {
configure = { availablePlugins, ... }: {
plugins = (builtins.attrValues availablePlugins);
scripts = [ weechatScripts.weechat-matrix ];
2021-05-30 15:43:20 +00:00
};
})
2020-08-15 03:27:08 +00:00
];
2021-08-16 17:38:38 +00:00
boot.extraModulePackages = [ config.boot.kernelPackages.hid-nintendo ];
2021-07-05 03:03:16 +00:00
hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
# Home
2021-08-26 17:12:58 +00:00
home-manager.users.artemis = {
programs.mpv.defaultProfiles = [ "gpu-hq" ];
wayland.windowManager.sway.config.output = {
2021-08-26 18:06:46 +00:00
"DP-1" = { pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"DP-2" = { pos = "1920 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"HDMI-A-1" = { 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]]
type = "time"
format = "%Y-%m-%dT%H:%M:%S"
'';
};
# NixOS
2020-08-15 03:27:08 +00:00
system.stateVersion = "19.09";
}