2022-01-06 13:15:28 +00:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
2021-07-29 20:21:51 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
{
|
2022-01-06 13:15:28 +00:00
|
|
|
imports = with inputs.nixos-hardware.nixosModules; [
|
|
|
|
common-cpu-amd common-gpu-amd common-pc-ssd
|
|
|
|
];
|
|
|
|
|
2021-08-31 16:01:29 +00:00
|
|
|
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";
|
2021-08-23 18:28:54 +00:00
|
|
|
};
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2021-10-26 15:30:05 +00:00
|
|
|
gajim-mainwindow
|
2021-11-01 20:33:21 +00:00
|
|
|
virt-manager qemu scream
|
2021-08-31 16:01:29 +00:00
|
|
|
replaysorcery # Custom package
|
2021-10-22 19:40:21 +00:00
|
|
|
#evdev-proxy # Custom package
|
2021-08-31 16:01:29 +00:00
|
|
|
vfio-isolate # Custom Package
|
2021-12-06 12:39:37 +00:00
|
|
|
steam-wrapped discord-wrapped # Custom package
|
2021-08-31 16:01:29 +00:00
|
|
|
mumble
|
|
|
|
piper
|
2021-12-06 12:39:37 +00:00
|
|
|
trackma # Custom package
|
|
|
|
anime-dl # Custom package
|
2021-11-01 20:33:21 +00:00
|
|
|
thunderbird
|
2022-01-06 13:15:28 +00:00
|
|
|
#multimc-wrapped # Custom package
|
|
|
|
#nwg-launchers
|
2021-11-06 19:26:54 +00:00
|
|
|
gnome-podcasts
|
2021-11-09 19:17:34 +00:00
|
|
|
cantata
|
|
|
|
newsflash
|
2021-12-06 12:39:37 +00:00
|
|
|
sublime-music-no-test
|
2021-08-31 16:01:29 +00:00
|
|
|
];
|
2021-10-22 12:58:27 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
ptw = {
|
2021-09-06 16:10:14 +00:00
|
|
|
programs = {
|
2021-11-04 14:11:46 +00:00
|
|
|
mpv = {
|
|
|
|
primaryScreen = "C27F398";
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-12-06 12:39:37 +00:00
|
|
|
#sway.enable = true;
|
2021-11-01 20:33:21 +00:00
|
|
|
alacritty.enable = true;
|
|
|
|
emacs.enable = true;
|
|
|
|
firefox.enable = true;
|
|
|
|
git.enable = true;
|
|
|
|
#gnome-terminal.enable = true;
|
|
|
|
tmux.enable = true;
|
2021-11-05 22:41:19 +00:00
|
|
|
waybar = {
|
|
|
|
enable = true;
|
|
|
|
output = "DP-2";
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
xournalpp.enable = true;
|
|
|
|
zsh.enable = true;
|
2022-01-06 15:47:30 +00:00
|
|
|
office.enable = true;
|
2022-01-06 13:15:28 +00:00
|
|
|
#plasma.enable = true;
|
2021-09-06 16:10:14 +00:00
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
services = {
|
|
|
|
gamemode.enable = true;
|
2022-01-01 21:04:29 +00:00
|
|
|
gnome.enable = true;
|
2021-11-01 20:33:21 +00:00
|
|
|
kanshi = let
|
|
|
|
horizontal = "Samsung Electric Company C27F398 H4ZR101145";
|
|
|
|
vertical = "Goldstar Company Ltd IPS235 305NDPHKN600";
|
2021-07-29 20:52:07 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
helpers = import ../lib/helpers/kanshi.nix;
|
|
|
|
mkProfile = helpers.mkProfile;
|
|
|
|
wallpaperScript = helpers.mkWallpaperScript {
|
|
|
|
inherit pkgs config;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
profiles = {
|
|
|
|
homeMultihead = mkProfile {
|
|
|
|
outputs = [
|
|
|
|
{
|
|
|
|
criteria = vertical;
|
|
|
|
status = "enable";
|
|
|
|
mode = "1920x1080";
|
|
|
|
transform = "90";
|
|
|
|
position = "-1080,0";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = horizontal;
|
|
|
|
status = "enable";
|
|
|
|
mode = "1920x1080";
|
|
|
|
position = "0,0";
|
|
|
|
}
|
|
|
|
];
|
2021-11-07 12:58:22 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
name = "homeMultihead";
|
|
|
|
script = wallpaperScript;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-12-06 12:39:37 +00:00
|
|
|
#swaync.enable = true;
|
2021-11-01 20:33:21 +00:00
|
|
|
key-mapper.enable = true;
|
|
|
|
};
|
|
|
|
system = {
|
|
|
|
i18n.enable = true;
|
|
|
|
singleUser = "alexander";
|
|
|
|
primaryInterface = "enp6s0";
|
|
|
|
hostName = "miku";
|
2021-11-04 20:25:23 +00:00
|
|
|
offloading.builder.enable = true;
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
|
|
|
virtualisation = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
2021-11-05 16:53:43 +00:00
|
|
|
programs = {
|
|
|
|
adb.enable = true;
|
|
|
|
gnupg.agent.pinentryFlavor = "qt";
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
|
2021-11-09 19:17:34 +00:00
|
|
|
virtualisation = {
|
|
|
|
podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
boot = {
|
|
|
|
extraModprobeConfig = ''
|
2021-08-31 16:01:29 +00:00
|
|
|
options kvm_amd nested=1
|
|
|
|
options vfio-pci ids=1002:67df,1002:aaf0
|
2021-10-21 21:42:36 +00:00
|
|
|
options amdgpu dpm=0
|
2021-08-31 16:01:29 +00:00
|
|
|
'';
|
2021-11-01 20:33:21 +00:00
|
|
|
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"
|
2021-10-22 19:40:21 +00:00
|
|
|
];
|
2021-07-29 20:21:51 +00:00
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
kernelParams = [
|
|
|
|
"amd_iommu=on"
|
|
|
|
"iommu=pt"
|
|
|
|
"sysrq_always_enabled=1"
|
|
|
|
"kvm.ignore_msrs=1"
|
|
|
|
"kvm.report_ignored_msrs=N"
|
|
|
|
"fbcon=rotate:3"
|
|
|
|
"quiet"
|
2022-01-06 13:15:28 +00:00
|
|
|
"nopti"
|
|
|
|
"nospectre_v2"
|
|
|
|
"nospec"
|
2022-01-01 21:04:29 +00:00
|
|
|
"clocksource=tsc"
|
|
|
|
"tsc=reliable"
|
2021-11-01 20:33:21 +00:00
|
|
|
];
|
|
|
|
|
2022-01-06 13:15:28 +00:00
|
|
|
extraModulePackages = [ pkgs.linuxPackages_zen.vendor-reset ];
|
2021-11-01 20:33:21 +00:00
|
|
|
|
|
|
|
#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_zen;
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
ratbagd.enable = true;
|
|
|
|
flatpak.enable = true;
|
|
|
|
etesync-dav.enable = true;
|
|
|
|
connman.extraConfig = ''
|
2021-09-11 18:37:49 +00:00
|
|
|
WriteResolvConf=false
|
|
|
|
'';
|
2021-11-01 20:33:21 +00:00
|
|
|
xserver = {
|
|
|
|
enable = true;
|
|
|
|
layout = "de";
|
|
|
|
libinput.enable = true;
|
|
|
|
displayManager.gdm = {
|
|
|
|
wayland = true;
|
2021-12-06 12:39:37 +00:00
|
|
|
enable = true;
|
2021-10-22 19:40:21 +00:00
|
|
|
};
|
2021-08-31 16:01:29 +00:00
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
2021-12-06 12:39:37 +00:00
|
|
|
|
2021-11-04 14:11:46 +00:00
|
|
|
# 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";
|
2021-08-07 15:26:11 +00:00
|
|
|
};
|
2021-11-04 14:11:46 +00:00
|
|
|
};
|
|
|
|
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";
|
2021-08-07 15:26:11 +00:00
|
|
|
};
|
2021-11-04 14:11:46 +00:00
|
|
|
};
|
|
|
|
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";
|
2021-07-29 20:21:51 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|