Compare commits

..

24 Commits

Author SHA1 Message Date
98c27ce238 ssh: Fix issues with trying different keys 2023-12-27 00:54:00 +01:00
86ce0ed9e6 nishimiya: Changes 2023-09-18 13:10:15 +02:00
91910ec46e Commits 2023-09-17 13:35:43 +02:00
d2426b4291 gaming: Allow gamescope to run with CAPSYSNICE 2023-09-17 13:35:25 +02:00
7c1113cd09 flake: Expose the sandboxed prismlauncher 2023-08-11 17:43:15 +02:00
4b6290c3c7 git: Use the GPG key on my Yubikey for signing commits 2023-07-23 21:06:10 +02:00
650d566f8d packages: Remove the patched Gajim 2023-07-21 20:11:38 +02:00
45e93b353c miku: Enable YubiKey 2023-07-21 20:03:01 +02:00
dd43d48900 miku: Remove some packages 2023-07-19 16:23:24 +02:00
5e17268044 lib: Add nerdfonts for nvim 2023-07-19 16:23:24 +02:00
6699d5488a yubikey: New module 2023-07-19 16:23:10 +02:00
e429bdb946 cups: Fix scanning on hplip printers 2023-07-19 14:01:58 +02:00
5d868ad1f8 l 2023-07-19 14:01:24 +02:00
0a36b0acb5 lol 2023-07-19 14:01:24 +02:00
dffafa8973 nishimiya: Changes 2023-07-19 14:01:24 +02:00
d0bd1ca8fa nvim: Configure it with everything needed for LazyVim 2023-07-18 21:46:28 +02:00
1346cb93af retroatch: Add pcsx2 2023-04-30 15:23:18 +02:00
1e24a7d6bc nishimiya: Load aesni-intel 2023-04-30 15:23:04 +02:00
b58d5eb12f miku: Disable keypad lights with gamemode 2023-04-30 15:22:52 +02:00
a193b02ce0 base: Fix renamed option 2023-04-15 19:09:57 +02:00
c252c831b5 Update gajim 2023-04-15 19:09:05 +02:00
30bb872ed9 miku: Update 2023-04-08 17:30:39 +02:00
b716c8a288 Changes 2023-04-01 00:12:40 +02:00
1de2a362d7 base: Re-enable timesyncd 2023-03-01 13:36:16 +01:00
32 changed files with 633 additions and 341 deletions

203
flake.lock generated
View File

@@ -21,14 +21,15 @@
"emacs": { "emacs": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1676628719, "lastModified": 1693879203,
"narHash": "sha256-yZM1hLxPS3OuKNduQSWmiYLAjIZeJ7ExWbCL3A3bi0U=", "narHash": "sha256-0CGMa3MxeG3YsVetUtxg6eZumQIe8FJ+WHVfR2ko9zM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "cd34501a9bcec341533c7131af77572456c100d8", "rev": "3adaef3b1bebdc244a03ee19f705f5a3190a33d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -59,12 +60,15 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1692799911,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -74,12 +78,15 @@
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1676283394, "lastModified": 1692799911,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -165,15 +172,14 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2"
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1676367705, "lastModified": 1693859358,
"narHash": "sha256-un5UbRat9TwruyImtwUGcKF823rCEp4fQxnsaLFL7CM=", "narHash": "sha256-r3Pak/ao3p8weTzR+Ry3qQrfRsmSOwWW5sAe73mrYKs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "da72e6fc6b7dc0c3f94edbd310aae7cd95c678b5", "rev": "886ea1d213efd1082f419d066e89ef37635dc970",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -211,14 +217,14 @@
"ostylk-home", "ostylk-home",
"pkg-stable" "pkg-stable"
], ],
"utils": "utils_3" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1672244468, "lastModified": 1679067101,
"narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=", "narHash": "sha256-tMI1inGT9u4KWQml0w30dhWqQPlth1e9K/68sfDkEQA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706", "rev": "9154cd519a8942728038819682d6b3ff33f321bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -234,14 +240,14 @@
"ostylk-home", "ostylk-home",
"pkg-unstable" "pkg-unstable"
], ],
"utils": "utils_4" "utils": "utils_3"
}, },
"locked": { "locked": {
"lastModified": 1672780900, "lastModified": 1680597706,
"narHash": "sha256-DxuSn6BdkZapIbg76xzYx1KhVPEZeBexMkt1q/sMVPA=", "narHash": "sha256-ZqJ3T+BxzjPH9TnmeUwS4Uu9ZQPeBXAFC9sUWlharT4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "54245e1820caabd8a0b53ce4d47e4d0fefe04cd4", "rev": "ec06f419af79207b33d797064dfb3fc9dbe1df4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -381,11 +387,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1675933606, "lastModified": 1693718952,
"narHash": "sha256-y427VhPQHOKkYvkc9MMsL/2R7M11rQxzsRdRLM3htx8=", "narHash": "sha256-+nGdJlgTk0MPN7NygopipmyylVuAVi7OItIwTlwtGnw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "44ae00e02e8036a66c08f4decdece7e3bbbefee2", "rev": "793de77d9f83418b428e8ba70d1e42c6507d0d35",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -413,11 +419,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1673540789, "lastModified": 1693663421,
"narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", "narHash": "sha256-ImMIlWE/idjcZAfxKK8sQA7A1Gi/O58u5/CJA+mxvl8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", "rev": "e56990880811a451abd32515698c712788be5720",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -427,6 +433,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1693771906,
"narHash": "sha256-32EnPCaVjOiEERZ+o/2Ir7JH9pkfwJZJ27SKHNvt4yk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da5adce0ffaff10f6d0fee72a02a5ed9d01b52fc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1649408932, "lastModified": 1649408932,
@@ -445,15 +467,15 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1675115703, "lastModified": 1693565476,
"narHash": "sha256-4zetAPSyY0D77x+Ww9QBe8RHn1akvIvHJ/kgg8kGDbk=", "narHash": "sha256-ya00zHt7YbPo3ve/wNZ/6nts61xt7wK/APa6aZAfey0=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2caf4ef5005ecc68141ecb4aac271079f7371c44", "rev": "aa8aa7e2ea35ce655297e8322dc82bf77a31d04b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@@ -461,11 +483,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1676481215, "lastModified": 1693663421,
"narHash": "sha256-afma/1RU0EePRyrBPcjBdOt+dV8z1bJH9dtpTN/WXmY=", "narHash": "sha256-ImMIlWE/idjcZAfxKK8sQA7A1Gi/O58u5/CJA+mxvl8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "28319deb5ab05458d9cd5c7d99e1a24ec2e8fc4b", "rev": "e56990880811a451abd32515698c712788be5720",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -567,11 +589,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1676633667, "lastModified": 1693907142,
"narHash": "sha256-Lao/f52stjtuifmNK0aFGUxOhAafSbiN+csI686DsDg=", "narHash": "sha256-U3yzshaxSUAC6Hy5xGmlX1TySHoWjH++Y2cC9ujEmZc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "7eb9eec5cb2a3ef77646cb451ce546c301ecf884", "rev": "283964d2452632c9b0ccc8eff08d242a073b022f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -622,11 +644,11 @@
"rnix-lsp": "rnix-lsp_2" "rnix-lsp": "rnix-lsp_2"
}, },
"locked": { "locked": {
"lastModified": 1673210205, "lastModified": 1683784900,
"narHash": "sha256-3jpfVOwn1FXO6B+nETK0ZGdcCa503nNgEfd9WZPtcWI=", "narHash": "sha256-h+n0rS4nBFBqlMd1ktn+8UypNP3gQ91e+i/e1zHhbTg=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "c96277766b091059468b63f1aaebbc32390b6431", "rev": "3a0f186fca0a88e0a2fd002eabedb418cf9a6f6a",
"revCount": 116, "revCount": 124,
"type": "git", "type": "git",
"url": "https://destiny.ostylk.de/gitea/NixDistro/Home.git" "url": "https://destiny.ostylk.de/gitea/NixDistro/Home.git"
}, },
@@ -653,11 +675,11 @@
}, },
"pkg-stable": { "pkg-stable": {
"locked": { "locked": {
"lastModified": 1672844754, "lastModified": 1679139072,
"narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=", "narHash": "sha256-Gtw2Yj8DfETie3u7iHv1y5Wt+plGRmp6nTQ0EEfaPho=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9ade2c8240e00a4784fac282a502efff2786bdc", "rev": "08ef7dc8334521605a5c8b7086cc248e74ee338b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -669,11 +691,11 @@
}, },
"pkg-unstable": { "pkg-unstable": {
"locked": { "locked": {
"lastModified": 1672791794, "lastModified": 1680487167,
"narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=", "narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d", "rev": "53dad94e874c9586e71decf82d972dfb640ef044",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -690,7 +712,7 @@
"ostylk", "ostylk",
"nixpkgs" "nixpkgs"
], ],
"utils": "utils_2" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1640347520, "lastModified": 1640347520,
@@ -711,7 +733,7 @@
"inputs": { "inputs": {
"naersk": "naersk_2", "naersk": "naersk_2",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"utils": "utils_5" "utils": "utils_4"
}, },
"locked": { "locked": {
"lastModified": 1669555118, "lastModified": 1669555118,
@@ -758,6 +780,36 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tablet-mode": { "tablet-mode": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
@@ -797,21 +849,6 @@
} }
}, },
"utils": { "utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"locked": { "locked": {
"lastModified": 1629481132, "lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
@@ -826,7 +863,7 @@
"type": "github" "type": "github"
} }
}, },
"utils_3": { "utils_2": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
@@ -841,22 +878,22 @@
"type": "github" "type": "github"
} }
}, },
"utils_3": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_4": { "utils_4": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_5": {
"locked": { "locked": {
"lastModified": 1656928814, "lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",

View File

@@ -53,10 +53,12 @@
overlays = [ overlays = [
self.overlay self.overlay
(import ./overlays/sandbox.nix)
]; ];
}; };
in { in {
inherit (pkgs) wayqt dfl-ipc dfl-applications dfl-utils qtgreet; inherit (pkgs) wayqt dfl-ipc dfl-applications dfl-utils qtgreet xwaylandvideobridge obs-cli rgb_keyboard prismlauncher-wrapped anime4k;
}; };
}); });
} }

View File

@@ -28,29 +28,17 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gajim gajim
virt-manager qemu scream virt-manager qemu scream
replaysorcery # Custom package #replaysorcery # Custom package
vfio-isolate # Custom Package #vfio-isolate # Custom Package
mumble mumble
piper trackma # Custom package piper trackma # Custom package
anime-dl # Custom package anime-dl # Custom package
thunderbird thunderbird
#nwg-launchers
gnome-podcasts
cantata
newsflash
sublime-music
anki anki
gnome-podcasts
gimp gimp
xwaylandvideobridge
#psst #psst
evolution
# Proprietary stuff (yikes)
discord-wrapped discord-app-wrapped
spotify-wrapped
zoom-vm
#lapce #lapce
]; ];
@@ -58,38 +46,40 @@
programs = { programs = {
#bluray.enable = true; #bluray.enable = true;
mpv = { mpv = {
primaryScreen = "DP-2"; primaryScreen = "DP-1";
enable = true; enable = true;
}; };
sway.enable = false; sway.enable = false;
alacritty.enable = true; alacritty.enable = true;
emacs.enable = true; #emacs.enable = true;
firefox.enable = true; firefox.enable = true;
git.enable = true; git.enable = true;
gnome-terminal.enable = true; #gnome-terminal.enable = true;
tmux.enable = true; tmux.enable = true;
waybar = { waybar = {
enable = true; enable = true;
output = "DP-2"; output = "DP-2";
}; };
neovim.enable = true;
#xournalpp.enable = true; #xournalpp.enable = true;
zsh.enable = true; zsh.enable = true;
direnv.enable = true; direnv.enable = true;
office.enable = true; office.enable = true;
plasma = { plasma = {
enable = true; enable = true;
sddm = { /*sddm = {
backgroundImage = pkgs.fetchurl { backgroundImage = pkgs.fetchurl {
url = "https://cdn.donmai.us/original/d3/1b/__manjuu_prinz_eugen_roon_bismarck_friedrich_der_grosse_and_3_more_azur_lane_drawn_by_zaphn__d31bf4ac564d60f8787818842c369e7f.jpg"; url = "https://cdn.donmai.us/original/d3/1b/__manjuu_prinz_eugen_roon_bismarck_friedrich_der_grosse_and_3_more_azur_lane_drawn_by_zaphn__d31bf4ac564d60f8787818842c369e7f.jpg";
sha256 = "sha256-likoJuEaGzGH0RqjPsBE9o5ATwgnOo97PREh3oZBax8="; sha256 = "sha256-likoJuEaGzGH0RqjPsBE9o5ATwgnOo97PREh3oZBax8=";
}; };
}; };*/
}; };
gaming.enable = true; gaming.enable = true;
obs.enable = true; obs.enable = true;
android.enable = true; android.enable = true;
}; };
services = { services = {
yubikey.enable = true;
gamemode.enable = true; gamemode.enable = true;
gnome.enable = false; gnome.enable = false;
logiops.enable = true; logiops.enable = true;
@@ -116,10 +106,6 @@
}; };
virtualisation = { virtualisation = {
#podman = {
# enable = true;
# dockerCompat = true;
#};
docker = { docker = {
enable = true; enable = true;
storageDriver = "btrfs"; storageDriver = "btrfs";
@@ -127,19 +113,27 @@
}; };
boot = let boot = let
kernel = pkgs.linuxPackages_zen; kernel = pkgs.linuxPackages_xanmod_latest;
in { in {
extraModprobeConfig = '' extraModprobeConfig = ''
options kvm_amd nested=1 options kvm_amd nested=1
options vfio-pci ids=1002:67df,1002:aaf0
''; '';
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" "vendor-reset" ]; availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
"amdgpu"
"vendor-reset"
"winesync"
];
kernelModules = [ kernelModules = [
"amdgpu" # GPU (duh) "amdgpu" # GPU (duh)
"kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" # Virt "kvm-amd" /*"vfio_virqfd"*/ "vfio_pci" "vfio_iommu_type1" "vfio" # Virt
"uinput" # key-mapper "uinput" # key-mapper
"vendor-reset" "vendor-reset"
"winesync"
]; ];
}; };
kernelParams = [ kernelParams = [
@@ -157,23 +151,28 @@
"mitigations=off" "mitigations=off"
"rhgb" "rhgb"
# Enable ZSwap # Enable ZSwap
"zswap.enabled=1" #"zswap.enabled=1"
# Enable Apparmor # Enable Apparmor
"lsm=landlock,lockdown,yama,integrity,apparmor,bpf" "lsm=landlock,lockdown,yama,integrity,apparmor,bpf"
# Prevent sequential probing # Prevent sequential probing
"libahci.ignore_sss=1" "libahci.ignore_sss=1"
# Make the system less ready to swap
"sysctl.vm.swappiness=0"
]; ];
kernel.sysctl = { kernel.sysctl = {
# League of Legends under Linux # League of Legends under Linux
"abi.vsyscall32" = 0; "abi.vsyscall32" = 0;
# Fedora 39
"vm.max_map_count" = 2147483642;
}; };
extraModulePackages = [ kernel.vendor-reset ]; extraModulePackages = [ kernel.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 = kernel; kernelPackages = kernel;
binfmt = {
emulatedSystems = [ "aarch64-linux" ];
registrations.aarch64-linux.fixBinary = true;
};
}; };
services = { services = {
ratbagd.enable = true; ratbagd.enable = true;
@@ -192,6 +191,24 @@
udev.extraRules = '' udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", ATTR{power/wakeup}="disabled", ATTR{driver/1-7/power/wakeup}="disabled" ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", ATTR{power/wakeup}="disabled", ATTR{driver/1-7/power/wakeup}="disabled"
''; '';
hardware = {
openrgb = {
enable = true;
motherboard = "amd";
};
};
system76-scheduler = {
enable = false;
useStockConfig = true;
};
};
programs = {
cdemu = {
enable = true;
gui = true;
};
}; };
hardware = { hardware = {

View File

@@ -19,10 +19,11 @@
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci"
"aesni-intel"
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix # NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix
#"acpi_call" ]; #"acpi_call" ];
]; ];
kernelModules = [ "dm-snapshot" ]; kernelModules = [ "dm-snapshot" "aesni-intel" ];
luks.devices = { luks.devices = {
cryptroot = { cryptroot = {
device = "/dev/disk/by-uuid/e1011c40-e1a9-4ce6-b89f-f14b046639c1"; device = "/dev/disk/by-uuid/e1011c40-e1a9-4ce6-b89f-f14b046639c1";
@@ -35,12 +36,14 @@
extraModulePackages = [ ]; extraModulePackages = [ ];
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/e495/default.nix#L12 # NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/e495/default.nix#L12
kernelParams = [ "acpi_backlight=native" ]; kernelParams = [ "acpi_backlight=native" ];
binfmt.emulatedSystems = ["aarch64-linux"];
}; };
ptw = { ptw = {
programs = { programs = {
alacritty.enable = true; alacritty.enable = true;
sway.enable = true; sway.enable = false;
emacs.enable = true; emacs.enable = true;
firefox.enable = true; firefox.enable = true;
tmux.enable = true; tmux.enable = true;
@@ -55,8 +58,9 @@
direnv.enable = true; direnv.enable = true;
}; };
services = { services = {
yubikey.enable = true;
cups.enable = true; cups.enable = true;
gnome.enable = true; gnome.enable = false;
kanshi = let kanshi = let
horizontal = "Samsung Electric Company C27F398 H4ZR101145"; horizontal = "Samsung Electric Company C27F398 H4ZR101145";
@@ -122,12 +126,30 @@
}; };
}; };
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ansible ansible
gnumake gnumake
wireguard-tools
(pkgs.callPackage ./wrapper.nix {
inherit (pkgs) retroarch;
cores = with pkgs.libretro; [
mgba mupen64plus melonds desmume dolphin
];
})
]; ];
programs = { programs = {
gnupg.agent.pinentryFlavor = "qt"; gnupg.agent = {
pinentryFlavor = "qt";
};
}; };
} }

37
hosts/wrapper.nix Normal file
View File

@@ -0,0 +1,37 @@
{ stdenv, lib, makeWrapper, retroarch, cores ? [ ] }:
stdenv.mkDerivation {
pname = "retroarch";
version = lib.getVersion retroarch;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/lib
for coreDir in $cores
do
ln -s $coreDir/* $out/lib/.
done
ln -s -t $out ${retroarch}/share
if [ -d ${retroarch}/Applications ]; then
ln -s -t $out ${retroarch}/Applications
fi
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
--suffix-each LD_LIBRARY_PATH ':' "$cores" \
--add-flags "-L $out/lib/" \
'';
cores = map (x: x + x.libretroCore) cores;
preferLocalBuild = true;
meta = with retroarch.meta; {
inherit changelog description homepage license maintainers platforms;
longDescription =
"RetroArch is the reference frontend for the libretro API. The following cores are included: "
+ lib.concatStringsSep ", " (map (x: "${x.name}") cores)
+ ".";
};
}

View File

@@ -8,7 +8,7 @@ let
in { in {
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
ostylk.nftables = { ostylk.nftables = {
enable = true; enable = false;
tables.firewall = { tables.firewall = {
family = "inet"; family = "inet";
@@ -33,7 +33,14 @@ in {
}; };
networking = { networking = {
useDHCP = false; # Done by the network manager useDHCP = false; # Done by the network manager
networkmanager.enable = true; networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-vpnc
networkmanager-openvpn
networkmanager-openconnect
];
};
#interfaces.*.useDHCP = false; #interfaces.*.useDHCP = false;
@@ -98,7 +105,7 @@ in {
# Coding fonts # Coding fonts
source-code-pro source-code-pro
# Icon fonts # Icon fonts
#nerdfonts nerdfonts
]; ];
# For home-manager # For home-manager
@@ -114,7 +121,7 @@ in {
]; ];
services = { services = {
timesyncd.enable = false; timesyncd.enable = true;
# Everyone needs sound # Everyone needs sound
pipewire = { pipewire = {
@@ -237,7 +244,10 @@ in {
}; };
# Don't wait for a network connection # Don't wait for a network connection
systemd.services.NetworkManager-wait-online.enable = false; systemd = {
services.NetworkManager-wait-online.enable = false;
coredump.enable = false;
};
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
Defaults env_keep += "NIXOS_CONFIG" Defaults env_keep += "NIXOS_CONFIG"
@@ -282,7 +292,7 @@ in {
}; };
boot = { boot = {
cleanTmpDir = true; tmp.cleanOnBoot = true;
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -38,6 +38,8 @@ in inputs.nixpkgs.lib.nixosSystem {
# Overlays # Overlays
(util.mkOverlayFromInput "stable" inputs.stable) (util.mkOverlayFromInput "stable" inputs.stable)
(util.mkOverlayFromInput "unstable" inputs.nixpkgs) (util.mkOverlayFromInput "unstable" inputs.nixpkgs)
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
nur.overlay nur.overlay

View File

@@ -13,6 +13,7 @@
./programs/sddm ./programs/sddm
./programs/gnome-terminal ./programs/gnome-terminal
./programs/mpv ./programs/mpv
./programs/neovim
./programs/git ./programs/git
./programs/sway ./programs/sway
./programs/swaync ./programs/swaync
@@ -35,6 +36,7 @@
./services/greetd ./services/greetd
./services/cups ./services/cups
./services/logiops ./services/logiops
./services/yubikey
# User # User
#./users/default.nix #./users/default.nix

View File

@@ -14,7 +14,7 @@ in {
description = "Ignore NixOS 'recommendations' and use the Wayland session by default"; description = "Ignore NixOS 'recommendations' and use the Wayland session by default";
}; };
}; };
sddm = { /*sddm = {
backgroundImage = lib.mkOption { backgroundImage = lib.mkOption {
default = "${pkgs.sddm-sugar-dark}/usr/share/sddm/themes/sugar-dark/Background.jpg"; default = "${pkgs.sddm-sugar-dark}/usr/share/sddm/themes/sugar-dark/Background.jpg";
description = "The background image to use with sddm-sugar-dark"; description = "The background image to use with sddm-sugar-dark";
@@ -27,7 +27,7 @@ in {
default = 1080; default = 1080;
description = "Width of the screen"; description = "Width of the screen";
}; };
}; };*/
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@@ -39,7 +39,6 @@ in {
desktopManager.plasma5 = { desktopManager.plasma5 = {
enable = true; enable = true;
runUsingSystemd = true; runUsingSystemd = true;
supportDDC = true;
mobile.enable = cfg.mobile.enable; mobile.enable = cfg.mobile.enable;
kdeglobals = lib.mkIf cfg.mobile.enable { kdeglobals = lib.mkIf cfg.mobile.enable {
@@ -101,42 +100,17 @@ in {
# See https://github.com/NixOS/nixpkgs/commit/a506f9c79700255c215dddb53455d5e2bed6c1af # See https://github.com/NixOS/nixpkgs/commit/a506f9c79700255c215dddb53455d5e2bed6c1af
displayManager = { displayManager = {
sddm = {
enable = true;
};
defaultSession = lib.mkIf cfg.wayland.enable "plasmawayland"; defaultSession = lib.mkIf cfg.wayland.enable "plasmawayland";
#sessionPackages = lib.mkIf cfg.mobile.enable [ pkgs.libsForQt5.plasma5.plasma-mobile ]; #sessionPackages = lib.mkIf cfg.mobile.enable [ pkgs.libsForQt5.plasma5.plasma-mobile ];
}; };
}; };
users.users.greeter = {
home = "/var/lib/greeter";
createHome = true;
isSystemUser = true;
};
services.greetd = {
enable = true;
settings = let
swayGreeterConfig = pkgs.writeText "sway-config" ''
exec "${pkgs.qtgreet}/bin/qtgreet -d ${config.users.users.greeter.home}/data; ${pkgs.sway}/bin/swaymsg exit"
bindsym Mod4+shift+e exec ${pkgs.sway}/bin/swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
input * {
xkb_layout de
}
'';
in {
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayGreeterConfig}";
};
};
};
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-kde ]; extraPortals = with pkgs; [ xdg-desktop-portal-kde xdg-desktop-portal-gtk ];
}; };
environment = { environment = {

View File

@@ -30,7 +30,7 @@ in {
dynamic_title = true; dynamic_title = true;
decorations = "full"; decorations = "full";
startup_mode = "Windowed"; startup_mode = "Windowed";
opacity = 0.7; #opacity = 0.7;
}; };
scrolling = { scrolling = {
@@ -48,7 +48,6 @@ in {
x = 0; x = 0;
y = 0; y = 0;
}; };
use_thin_strokes = true;
}; };
debug = { debug = {
render_timer = false; render_timer = false;
@@ -111,7 +110,6 @@ in {
live_config_reload = true; live_config_reload = true;
enable_experimental_conpty_backend = false; enable_experimental_conpty_backend = false;
alt_send_esc = true;
key_bindings = [ key_bindings = [
{ {

View File

@@ -8,25 +8,45 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# General wine
wineWowPackages.staging winetricks wineWowPackages.staging winetricks
protontricks protontricks
# Lutris for League
lutris-free-wrapped lutris-free-wrapped
# prismlauncher-wrapped
# retroarch for retro games
(pkgs.callPackage ./wrapper.nix { (pkgs.callPackage ./wrapper.nix {
inherit (pkgs) retroarch; inherit (pkgs) retroarch;
cores = with pkgs.libretro; [ cores = with pkgs.libretro; [
mgba mupen64plus melonds desmume dolphin mgba mupen64plus melonds desmume dolphin pcsx2
]; ];
}) })
#steam-wrapped # Custom package #steam-wrapped # Custom package
gamescope # Gameplay clip recording
(pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [
obs-vaapi obs-vkcapture obs-pipewire-audio-capture
];
})
obs-cli
# Gameplay clip editing
kdenlive
# Performance
corectrl corectrl
]; ];
programs.gamescope = {
enable = true;
capSysNice = true;
args = ["--rt"];
};
# security.wrappers.gamescope = { # security.wrappers.gamescope = {
# owner = "alexander"; # owner = "alexander";
# group = "alexander"; # group = "alexander";

View File

@@ -12,6 +12,9 @@ in {
enable = true; enable = true;
userEmail = "papatutuwawa@polynom.me"; userEmail = "papatutuwawa@polynom.me";
userName = "Alexander \"PapaTutuWawa\""; userName = "Alexander \"PapaTutuWawa\"";
# The key on my Yubikey
signing.key = "B688F70D0EC87D5A8A9D3D7A56C749835F3CE824";
extraConfig = { extraConfig = {
init = { init = {
defaultBranch = "master"; defaultBranch = "master";

View File

@@ -83,7 +83,7 @@ in {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
#extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; #extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
gtkUsePortal = true; #gtkUsePortal = true;
}; };
qt5 = { qt5 = {

View File

@@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
mkAnime4kShader = shader: "${pkgs.anime4k}/usr/share/shaders/${shader}"; #mkAnime4kShader = shader: "${pkgs.anime4k}/usr/share/shaders/${shader}";
mkDefaultShader = shader: "${pkgs.mpv-shader-pack}/usr/share/shaders/${shader}"; mkDefaultShader = shader: "${pkgs.mpv-shader-pack}/usr/share/shaders/${shader}";
makeMpvProfile = { shader, gpuContext ? "waylandvk", additional ? {} }: { makeMpvProfile = { shader ? null, gpuContext ? "waylandvk", additional ? {} }: {
glsl-shaders = shader; glsl-shaders = lib.mkIf (shader != null) shader;
scale = "ewa_lanczossharp"; scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp"; cscale = "ewa_lanczossharp";
gpu-context = gpuContext; gpu-context = gpuContext;
@@ -41,13 +41,13 @@ in {
defaultProfiles = [ "anime" ]; defaultProfiles = [ "anime" ];
profiles = { profiles = {
anime = (makeMpvProfile { anime = (makeMpvProfile {
shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; #shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
additional = { additional = {
fullscreen = ""; fullscreen = "";
}; };
}); });
anime-denoise = (makeMpvProfile { anime-denoise = (makeMpvProfile {
shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; #shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
}); });
non-anime = (makeMpvProfile { non-anime = (makeMpvProfile {
shader = mkDefaultShader "FSRCNNX_x2_8-0-4-1.glsl"; shader = mkDefaultShader "FSRCNNX_x2_8-0-4-1.glsl";

View File

@@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
let
cfg = config.ptw.programs.neovim;
in {
options.ptw.programs.neovim = {
enable = lib.mkEnableOption "Enable and configure neovim using HomeManager";
};
config = lib.mkIf cfg.enable {
home-manager.users."${config.ptw.system.singleUser}" = {
programs.neovim = {
enable = true;
extraPackages = with pkgs; [
# For telescope-nvim
fd
lazygit
fish
tree-sitter gcc
nodejs_20
# Clipboard
wl-clipboard
];
};
};
};
}

View File

@@ -7,7 +7,9 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
libreoffice texlive.combined.scheme-basic /*libreoffice*/
texlive.combined.scheme-basic
thunderbird
]; ];
}; };
} }

View File

@@ -15,6 +15,10 @@ in {
drivers = with pkgs; [ hplip ]; drivers = with pkgs; [ hplip ];
}; };
services.avahi = {
enable = lib.mkForce true;
nssmdns = true;
};
hardware.sane = { hardware.sane = {
enable = true; enable = true;
extraBackends = with pkgs; [ sane-airscan hplip ]; extraBackends = with pkgs; [ sane-airscan hplip ];

View File

@@ -7,7 +7,15 @@ in {
enable = lib.mkEnableOption "Enable and configure gamemode"; enable = lib.mkEnableOption "Enable and configure gamemode";
}; };
config = lib.mkIf cfg.enable { config = let
keyboardBrightnessScript = pkgs.writeShellScript "keyboard-brightness.sh" ''
${pkgs.rgb_keyboard}/bin/rgb_keyboard -l ripple -b "$1"
'';
in lib.mkIf cfg.enable {
security.sudo.extraConfig = ''
${config.ptw.system.singleUser} ALL = (ALL) NOPASSWD: ${keyboardBrightnessScript}
'';
programs.gamemode = { programs.gamemode = {
enable = true; enable = true;
enableRenice = true; enableRenice = true;
@@ -29,14 +37,28 @@ in {
}; };
custom = let custom = let
switchScript = groupName: pkgs.writeShellScript "switch-input-group.sh" '' switchScript = groupName: "${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SwitchInputMethodGroup string:'${groupName}'";
${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SwitchInputMethodGroup string:'${groupName}'
'';
pauseFcitx = switchScript "Group 2"; pauseFcitx = switchScript "Group 2";
resumeFcitx = switchScript "Group 1"; resumeFcitx = switchScript "Group 1";
# The scripts
start = pkgs.writeShellScript "gamemode-start.sh" ''
# Disable Fcitx's IME
${pauseFcitx}
# Turn on the keyboard lights
${config.security.wrapperDir}/sudo ${keyboardBrightnessScript} 1
'';
end = pkgs.writeShellScript "gamemode-end.sh" ''
# Resume Fcitx's IME
${resumeFcitx}
# Turn off the keyboard lights
${config.security.wrapperDir}/sudo ${keyboardBrightnessScript} 0
'';
in { in {
start = ''${pauseFcitx}''; start = "${start}";
end = ''${resumeFcitx}''; end = "${end}";
}; };
}; };
}; };

View File

@@ -16,26 +16,32 @@ in {
}; };
config = lib.mkIf true { config = lib.mkIf true {
environment.etc."logid.cfg".text = '' systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
wantedBy = [ "default.target" ];
serviceConfig = let
logiopsConfig = pkgs.writeText "logiops.cfg" ''
devices: ( devices: (
{ {
name: "Wireless Mouse MX Master 3"; name: "Wireless Mouse MX Master 3";
hiresscroll: { hiresscroll: {
hires: true; hires: true;
target: false;
};
smartshift: {
on: true;
threshold: 30;
default_threshold: 30;
}; };
dpi: 800; dpi: 800;
} }
); );
''; '';
in {
systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple"; Type = "simple";
ExecStart = let ExecStart = let
renice = lib.optionalString cfg.renice "${pkgs.coreutils-full}/bin/nice -n ${builtins.toString cfg.reniceValue}"; renice = lib.optionalString cfg.renice "${pkgs.coreutils-full}/bin/nice -n ${builtins.toString cfg.reniceValue}";
in "${renice} ${pkgs.logiops}/bin/logid"; in "${renice} ${pkgs.logiops}/bin/logid -c ${logiopsConfig}";
}; };
}; };
}; };

View File

@@ -0,0 +1,31 @@
{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.yubikey;
in {
options.ptw.services.yubikey = {
enable = lib.mkEnableOption "Enable everything for using a YubiKey";
};
config = lib.mkIf cfg.enable {
services = {
# Unprivileged access to the YubiKey
udev.packages = [ pkgs.yubikey-personalization ];
# Allow using the YubiKey as a smart card
pcscd.enable = true;
};
environment.systemPackages = with pkgs; [
# Management
yubikey-manager-qt yubikey-manager yubico-piv-tool
];
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}

View File

@@ -4,8 +4,8 @@
config = lib.mkIf (config.ptw.system.singleUser == "alexander") { config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
users.users.alexander = { users.users.alexander = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" "alexander" ]; extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" "alexander" "cdrom" ];
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC"; hashedPassword = "$y$j9T$xhnK648hF0yzDnRy0rTT/.$HbDKvNetiGeY3Xjt6/YPIzoxSmdQ0SzhXengOT1Ga01";
shell = pkgs.zsh; shell = pkgs.zsh;
useDefaultShell = false; useDefaultShell = false;
uid = 1000; uid = 1000;
@@ -23,16 +23,15 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
extraConfig = ''
IdentitiesOnly yes
'';
includes = [
"config.d/*"
];
matchBlocks = let matchBlocks = let
sshPort = 3434; sshPort = 1847;
in { in {
ayame = {
port = sshPort;
hostname = "78.46.184.48";
user = "alexander";
identityFile = "~/.ssh/polynom.me_ayame";
identitiesOnly = true;
};
"git.polynom.me" = { "git.polynom.me" = {
port = 2222; port = 2222;
user = "gitea"; user = "gitea";

View File

@@ -36,39 +36,39 @@ in {
[[device.Simple.selector]] [[device.Simple.selector]]
USBIDClass = {vendor=0x1532, model=0x011a, class="Keyboard"} USBIDClass = {vendor=0x1532, model=0x011a, class="Keyboard"}
''; '';
"libvirt/hooks/qemu".source = let # "libvirt/hooks/qemu".source = let
vfio-isolate-state = "/tmp/vfio-isolate-state"; # vfio-isolate-state = "/tmp/vfio-isolate-state";
in pkgs.writeScript "qemu" '' # in pkgs.writeScript "qemu" ''
#!${pkgs.stdenv.shell} # #!${pkgs.stdenv.shell}
guest=$1 # guest=$1
action=$2 # action=$2
phase=$3 # phase=$3
extra=$4 # extra=$4
echo "called with $1 $2 $3 $4" > /dev/stderr # echo "called with $1 $2 $3 $4" > /dev/stderr
if [[ "$guest" = "win10-gaming" ]]; then # if [[ "$guest" = "win10-gaming" ]]; then
case "$action" in # case "$action" in
prepare) # prepare)
# Only do this while in preparation # # Only do this while in preparation
[[ ! "$phase" = "prepare" ]] && exit 0 # [[ ! "$phase" = "prepare" ]] && exit 0
GUEST_CORES="C1-3,5-7" # GUEST_CORES="C1-3,5-7"
${pkgs.vfio-isolate}/bin/vfio-isolate \ # ${pkgs.vfio-isolate}/bin/vfio-isolate \
-u ${vfio-isolate-state} \ # -u ${vfio-isolate-state} \
cpu-governor performance "$GUEST_CORES" \ # cpu-governor performance "$GUEST_CORES" \
cpuset-create --cpus "$GUEST_CORES" /guest.slice \ # cpuset-create --cpus "$GUEST_CORES" /guest.slice \
cpuset-create --cpus C0,4 /host.slice \ # cpuset-create --cpus C0,4 /host.slice \
move-tasks / /host.slice \ # move-tasks / /host.slice \
irq-affinity mask "$GUEST_CORES" # irq-affinity mask "$GUEST_CORES"
;; # ;;
stopped) # stopped)
# Only run when the VM is fully stopped # # Only run when the VM is fully stopped
[[ ! "$phase" = "end" ]] && exit 0 # [[ ! "$phase" = "end" ]] && exit 0
${pkgs.vfio-isolate}/bin/vfio-isolate \ # ${pkgs.vfio-isolate}/bin/vfio-isolate \
restore ${vfio-isolate-state} # restore ${vfio-isolate-state}
esac # esac
fi # fi
''; # '';
}; };
# NOTE: Workaround for libvirt's SYSCONFDIR being set to /var/lib # NOTE: Workaround for libvirt's SYSCONFDIR being set to /var/lib
@@ -81,7 +81,7 @@ in {
systemd = { systemd = {
services = { services = {
libvirtd.path = with pkgs; [ vfio-isolate systemd bash ]; libvirtd.path = with pkgs; [ /*vfio-isolate*/ systemd bash ];
}; };
user.services.evdev-proxy = { user.services.evdev-proxy = {

View File

@@ -2,6 +2,6 @@
{ {
simple = import ./simple.nix; simple = import ./simple.nix;
surface = import ./surface.nix pkgs; #surface = import ./surface.nix pkgs;
sandbox = import ./sandbox.nix; sandbox = import ./sandbox.nix;
} }

View File

@@ -26,14 +26,22 @@ in {
enableDesktopFile = true; enableDesktopFile = true;
}; };
/*minecraft-wrapped = wrapInSandbox { prismlauncher-wrapped = wrapInSandbox {
name = "minecraft-launcher"; name = "prismlauncher";
package = prev.minecraft; binary = let
binaryName = "minecraft-launcher"; script = prev.writeShellScript "prismlauncher-zink.sh" ''
mountInHome = [ ".local/share/minecraft" ".minecraft" ]; export MESA_LOADER_DRIVER_OVERRIDE=zink
${prev.prismlauncher}/bin/prismlauncher
'';
in "${prev.prismlauncher}/bin/prismlauncher";
launchScriptName = "prismlauncher-wrapped";
mountInHome = [".local/share/PrismLauncher"];
additionalMounts = [
"/etc/profile"
];
additionalBlacklist = [ "/mnt" ]; additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER"; chdirTo = "/home/$USER";
};*/ };
steam-wrapped = wrapInSandbox { steam-wrapped = wrapInSandbox {
name = "steam-wrapped"; name = "steam-wrapped";

View File

@@ -1,11 +1,4 @@
final: prev: final: prev: {
{
gajim = prev.gajim.overrideAttrs (old: {
# Enable notification sounds
propagatedBuildInputs = old.propagatedBuildInputs ++ [ prev.gsound ];
});
animedl = prev.animedl.overrideAttrs (old: { animedl = prev.animedl.overrideAttrs (old: {
extraPkgs = pkgs: with final; [ mpv ]; extraPkgs = pkgs: with final; [ mpv ];
}); });
@@ -70,7 +63,17 @@ final: prev:
discord-app = prev.discord-app.override { chromium = prev.ungoogled-chromium; }; discord-app = prev.discord-app.override { chromium = prev.ungoogled-chromium; };
# Work around https://github.com/NixOS/nixpkgs/issues/216294 # Work around https://github.com/NixOS/nixpkgs/issues/216294
pkgsi686Linux = prev.pkgsi686Linux.extend (pfinal: pprev: { # pkgsi686Linux = prev.pkgsi686Linux.extend (pfinal: pprev: {
directx-shader-compiler = pprev.directx-shader-compiler.override {stdenv = pfinal.gcc11Stdenv;}; # directx-shader-compiler = pprev.directx-shader-compiler.override {stdenv = pfinal.gcc11Stdenv;};
# });
gajim = prev.gajim.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
# Make the tray icon work
prev.libappindicator-gtk3
# Play sounds
prev.gsound
];
}); });
} }

View File

@@ -0,0 +1,30 @@
{
stdenv
, fetchFromGitHub
, gcc, gnumake
, libusb
}:
stdenv.mkDerivation rec {
pname = "rgb_keyboard";
version = "20230430";
src = fetchFromGitHub {
owner = "PapaTutuWawa";
repo = "rgb_keyboard";
rev = "5bbdafea77ef3c3eb47081494f3b58abcd5c4e27";
sha256 = "0m5hvlhqncy1qn5v6gpsz9qd2p4cvcjjnma08vb4b2ybq4kfv7qw";
};
buildInputs = [
libusb
];
buildPhase = ''
${gnumake}/bin/make build
'';
installPhase = ''
mkdir -p $out/bin/
cp rgb_keyboard $out/bin/
'';
}

View File

@@ -0,0 +1,24 @@
{
stdenv
, lib, fetchFromGitLab
, cmake, extra-cmake-modules, pkg-config
, qtbase, qtx11extras, wrapQtAppsHook
, kpipewire, plasma-framework
, xorg
}:
stdenv.mkDerivation rec {
pname = "xwaylandvideobridge";
version = "5.27.3";
src = fetchFromGitLab {
owner = "davidedmundson";
repo = "xwaylandvideobridge";
rev = "b9e0c53570f55f4e8289f72ba78f3945e27e1a1a";
domain = "invent.kde.org";
sha256 = "1ypg2c26r5fy9lr8shif5vqcp06yf7mqqj2ps5g00s7s3ykryxdn";
};
buildInputs = [ qtbase qtx11extras plasma-framework xorg.xcbproto kpipewire cmake pkg-config ];
nativeBuildInputs = [ wrapQtAppsHook extra-cmake-modules ];
}

View File

@@ -44,6 +44,16 @@ let
dfl-applications = prev.libsForQt5.callPackage development/cpp/dfl-app { dfl-applications = prev.libsForQt5.callPackage development/cpp/dfl-app {
inherit dfl-ipc; inherit dfl-ipc;
}; };
kpipewire = prev.libsForQt5.kpipewire.overrideAttrs (old: {
src = prev.fetchFromGitLab {
owner = "plasma";
repo = "kpipewire";
rev = "ed99b94be40bd8c5b7b2a2f17d0622f11b2ab7fb";
domain = "invent.kde.org";
sha256 = "sha256-KhmhlH7gaFGrvPaB3voQ57CKutnw5DlLOz7gy/3Mzms=";
};
});
in { in {
inherit discord-system-electron dfl-ipc dfl-applications dfl-utils wayqt; inherit discord-system-electron dfl-ipc dfl-applications dfl-utils wayqt;
@@ -101,4 +111,14 @@ in {
qtgreet = prev.libsForQt5.callPackage applications/desktop/qtgreet { qtgreet = prev.libsForQt5.callPackage applications/desktop/qtgreet {
inherit dfl-applications dfl-utils dfl-ipc wayqt; inherit dfl-applications dfl-utils dfl-ipc wayqt;
}; };
kpipewire = prev.libsForQt5.callPackage development/cpp/libkpipewire {};
xwaylandvideobridge = prev.libsForQt5.callPackage applications/desktop/xwaylandvideobridge {
inherit kpipewire;
};
#obs-websocket = prev.libsForQt5.callPackage obs/obs-websocket {};
obs-cli = prev.callPackage obs/obs-cli {};
rgb_keyboard = prev.callPackage ./applications/desktop/rgb_keyboard/default.nix {};
} }

View File

@@ -0,0 +1,21 @@
{
stdenv
, lib, fetchFromGitLab
, cmake, pkg-config
, qtbase, wrapQtAppsHook
, kwayland, ki18n, kcoreaddons
, pipewire, libepoxy, ffmpeg
}:
stdenv.mkDerivation rec {
pname = "xwaylandvideobridge";
version = "5.27.3";
src = builtins.fetchurl {
url = "https://download.kde.org/stable/plasma/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256:0b95jjkfpkvc2ld3x6p7nw6kn6fkqba9q7x95ywvgag2b00jdb56";
};
buildInputs = [ qtbase kwayland ki18n kcoreaddons pipewire libepoxy ffmpeg cmake pkg-config ];
nativeBuildInputs = [ wrapQtAppsHook ];
}

View File

@@ -0,0 +1,27 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "obs-cli";
version = "0.5.0";
src = fetchFromGitHub {
owner = "muesli";
repo = "obs-cli";
rev = "v${version}";
hash = "sha256-4tjS+PWyP/T0zs4IGE6VQ5c+3tuqxlBwfpPBVEcim6c=";
};
vendorHash = "sha256-RGpkqX97zalZv4aDfihJBKO1l2O8tcxn0I1SPL1WIg8=";
ldflags = [ "-s" "-w" ];
meta = with lib; {
description = "OBS-cli is a command-line remote control for OBS";
homepage = "https://github.com/muesli/obs-cli";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View File

@@ -0,0 +1,39 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake, ninja, pkg-config
, qtbase, wrapQtAppsHook
, nlohmann_json, asio, websocketpp
, obs-studio
}:
stdenv.mkDerivation rec {
pname = "obs-websocket";
version = "4.9.1-compat";
src = fetchFromGitHub {
owner = "obsproject";
repo = pname;
rev = "${version}";
sha256 = "14xhk6d7j2q5swfj0b7jdgmswjdkqjnj3q11qs5vbh93hk30jyvh";
};
nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook ];
buildInputs = [ obs-studio qtbase nlohmann_json asio websocketpp ];
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio.src}/libobs"
"-Wno-dev"
];
preConfigure = ''
cp ${obs-studio.src}/cmake/external/ObsPluginHelpers.cmake cmake/FindLibObs.cmake
'';
meta = with lib; {
description = "Remote-control of OBS Studio through WebSocket";
homepage = "https://github.com/obsproject/obs-websocket";
license = licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
};
}

View File

@@ -1,96 +0,0 @@
# From https://github.com/Jovian-Experiments/Jovian-NixOS/blob/d27526e7917671ad3a64f823f4b95b761f96807d/pkgs/gamescope/default.nix
{ stdenv
, fetchFromGitHub
, meson
, pkg-config
, cmake
, ninja
, xorg
, libdrm
, vulkan-loader
, wayland
, wayland-protocols
, libxkbcommon
, libcap
, SDL2
, pipewire
, mesa
, udev
, pixman
, libinput
, libseat
, xwayland
, glslang
, stb
, wlroots
, libliftoff
}:
let
in
stdenv.mkDerivation {
pname = "gamescope";
version = "3.11.28-beta4";
src = fetchFromGitHub {
owner = "Plagman";
repo = "gamescope";
rev = "refs/tags/3.11.28-beta4";
hash = "sha256-3L3bQIPPfScvtN1dduh10dQu/AuTmD4dHNp3JjBIBLA=";
};
buildInputs = [
xorg.libX11
xorg.libXdamage
xorg.libXcomposite
xorg.libXrender
xorg.libXext
xorg.libXxf86vm
xorg.libXtst
xorg.libXres
libdrm
vulkan-loader
wayland
wayland-protocols
libxkbcommon
libcap
SDL2
pipewire
mesa
udev
pixman
libinput
libseat
xwayland
xorg.xcbutilwm
xorg.xcbutilerrors
glslang
xorg.libXi
];
prePatch = ''
echo ":: Copying stb"
cp -vr "${stb.src}" subprojects/stb
chmod -R +w subprojects/stb
cp "subprojects/packagefiles/stb/meson.build" "subprojects/stb/"
echo ":: Copying wlroots"
rmdir subprojects/wlroots
cp -vr "${wlroots.src}" subprojects/wlroots
chmod -R +w subprojects/wlroots
echo ":: Copying libliftoff"
rmdir subprojects/libliftoff
cp -vr "${libliftoff.src}" subprojects/libliftoff
chmod -R +w subprojects/libliftoff
'';
nativeBuildInputs = [
cmake
meson
pkg-config
ninja
];
dontUseCmakeConfigure = true;
}