169 lines
5.1 KiB
Nix
169 lines
5.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
mkHost = (import ../modules { lib = lib; pkgs = pkgs; }).mkHost;
|
|
in mkHost config {
|
|
userName = "alexander";
|
|
hostName = "miku";
|
|
primaryInterface = "enp6s0";
|
|
overlays = [ "nur" "unstable" "simple" "custom" "emacs" ];
|
|
hardwareImports = [ "amdgpu" "amd" ];
|
|
programImports = [
|
|
"zsh" "git" "mpv" "tmux" "emacs" "firefox" "i18n" "gamemode" "gnome" #"gnome-terminal"
|
|
"alacritty" "sway" "waybar" "kanshi"
|
|
"distributed-build/builder.nix"
|
|
"music"
|
|
];
|
|
extraImports = [ "virtualisation/gaming.nix" "virtualisation" ];
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-label/root";
|
|
fsType = "btrfs";
|
|
};
|
|
"/boot" = {
|
|
device = "/dev/disk/by-label/boot";
|
|
fsType = "vfat";
|
|
};
|
|
"/mnt/Storage" = {
|
|
device = "/dev/disk/by-label/storage";
|
|
fsType = "ext4";
|
|
};
|
|
};
|
|
extraPackages = pkgs: with pkgs; [
|
|
emacsPgtkGcc
|
|
gajim
|
|
virt-manager unstable.qemu scream
|
|
#gamemode # Custom package
|
|
key-mapper # Custom package
|
|
replaysorcery # Custom package
|
|
#evdev-proxy # Custom package
|
|
vfio-isolate # Custom Package
|
|
steam-wrapped
|
|
discord-wrapped # Custom package
|
|
superpaper # Custom package
|
|
mumble
|
|
piper
|
|
anime-dl trackma # Custom package
|
|
unstable.thunderbird
|
|
multimc-wrapped # Custom package
|
|
nwg-launchers
|
|
];
|
|
extraOptions = old: {
|
|
system.autoUpgrade.channel = "https://nixos.org/channels/nixos-unstable";
|
|
|
|
programs = {
|
|
mpv.primaryScreen = "C27F398";
|
|
adb.enable = true;
|
|
sway.enable = true;
|
|
};
|
|
|
|
boot = {
|
|
extraModprobeConfig = ''
|
|
options kvm_amd nested=1
|
|
options vfio-pci ids=1002:67df,1002:aaf0
|
|
options amdgpu dpm=0
|
|
'';
|
|
initrd = {
|
|
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" "vendor-reset" ];
|
|
kernelModules = [
|
|
"amdgpu" # GPU (duh)
|
|
"kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" # Virt
|
|
"uinput" # key-mapper
|
|
"vendor-reset"
|
|
];
|
|
};
|
|
kernelParams = [
|
|
"amd_iommu=on"
|
|
"iommu=pt"
|
|
"sysrq_always_enabled=1"
|
|
"kvm.ignore_msrs=1"
|
|
"kvm.report_ignored_msrs=N"
|
|
"fbcon=rotate:1"
|
|
"quiet"
|
|
"tsc=unstable"
|
|
];
|
|
extraModulePackages = [ pkgs.linuxPackages_xanmod.vendor-reset ];
|
|
|
|
#extraModulePackages = [ pkgs.linuxPackages.vendor-reset ];
|
|
# NOTE: A regression appears to have happend between 5.10 and 5.12
|
|
# which leads to the RX590 to have the fence fallback timer on
|
|
# sdma0 time out (whatever this means). Maybe bisect?
|
|
kernelPackages = pkgs.linuxPackages_xanmod;
|
|
};
|
|
xdg.portal = {
|
|
enable = true;
|
|
extraPortals = [
|
|
pkgs.xdg-desktop-portal-wlr
|
|
];
|
|
};
|
|
services = {
|
|
ratbagd.enable = true;
|
|
flatpak.enable = true;
|
|
etesync-dav.enable = true;
|
|
connman.extraConfig = ''
|
|
WriteResolvConf=false
|
|
'';
|
|
udev = {
|
|
packages = with pkgs; [ key-mapper ];
|
|
extraRules = ''
|
|
KERNEL=="uinput", GROUP="input", MODE="0660"
|
|
'';
|
|
};
|
|
gnome.gnome-keyring.enable = true;
|
|
};
|
|
|
|
# TODO: Move into modules
|
|
systemd.user.services = {
|
|
scream = {
|
|
description = "Audio receiver for the Scream virtual network sound card";
|
|
#wantedBy = [ "default.target" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
replaysorcery-kms = {
|
|
description = "An open-source, instant-replay solution for Linux; KMS service";
|
|
#wantedBy = [ "default.target" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery kms-service";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
key-mapper = {
|
|
description = "A tool to change the mapping of your input device buttons";
|
|
wantedBy = [ "default.target" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.key-mapper}/bin/key-mapper-service";
|
|
Restart = "always";
|
|
# NOTE: The Tartarus may not be connected, so don't fail if we cannot set the preset
|
|
ExecPostStart = "${pkgs.key-mapper}/bin/key-mapper --command start --preset NOOP --device \"Razer Razer Tartarus V2\"; exit 0";
|
|
};
|
|
};
|
|
replaysorcery = {
|
|
description = "An open-source, instant-replay solution for Linux";
|
|
#wantedBy = [ "default.target" ];
|
|
requires = [ "replaysorcery-kms.service" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
#superpaper = {
|
|
# description = "A cross-platform multi monitor wallpaper manager.";
|
|
# wantedBy = [ "default.target" ];
|
|
# path = [ pkgs.glib ];
|
|
# serviceConfig = {
|
|
# Type = "simple";
|
|
# ExecStart = "${pkgs.superpaper}/bin/superpaper";
|
|
# Restart = "always";
|
|
# };
|
|
#};
|
|
};
|
|
};
|
|
}
|