203 Commits

Author SHA1 Message Date
materus 431fc8f7ae valkyrie: add new materusVM key 2026-01-10 12:23:05 +01:00
materus 2921f8d9cc Updates 2025-10-08 08:42:32 +02:00
materus dba31836a5 Updates 2025-08-19 12:28:58 +02:00
materus a556bc0e8a Updates 2025-08-19 11:59:56 +02:00
materus d99f184f31 valkyrie: add alexa ip 2025-07-27 01:19:38 +02:00
materus 81cd54faa8 valkyrie: remove test ips 2025-07-27 01:10:41 +02:00
materus a3d6fbeb40 flake: update lock; Network updates 2025-07-27 00:57:10 +02:00
materus 65492a133e Old-materusPC: VM 2025-07-27 00:09:09 +02:00
materus 15babc1afd Network update 2025-07-27 00:08:21 +02:00
materus 1091489449 update 2025-07-20 23:49:26 +02:00
materus 834ead36d7 Old-materusPC: vscode update 2025-07-20 15:18:15 +02:00
materus fce385129f Old-materusPC: flake update, minecraft update 2025-07-20 12:49:35 +02:00
materus 9c1b52829b flamaster: update 2025-07-17 07:30:36 +02:00
materus ed47b3a9d3 codium: update JS/TS settings 2025-07-13 13:46:59 +02:00
materus 9884d1a8a3 Merge branch 'master' of github.com:materusPL/nixos-config 2025-07-10 19:40:51 +02:00
materus 1e83c8adf7 update 2025-07-10 19:39:04 +02:00
materus 4f2a9a71a6 update 2025-06-13 20:12:28 +02:00
materus c9eeaca475 update 2025-06-13 16:55:29 +02:00
materus e85eda8035 Merge branch 'master' of github.com:materusPL/nixos-config 2025-06-08 19:24:24 +02:00
materus cf1895a14e 25.05 updates 2025-06-08 19:24:01 +02:00
materus 18012450c0 update to 25.05 2025-06-07 01:03:14 +02:00
materus 81f6d6f06d update 2025-05-23 20:38:05 +02:00
materus 371b1b1432 update 2025-05-23 18:07:26 +02:00
materus fd229ecd76 Update Emacs Config 2025-05-02 19:12:00 +02:00
materus f5d0d4065f emacs changes 2025-04-20 14:07:31 +02:00
materus c53025cdc4 update old pc 2025-04-18 20:59:07 +02:00
materus c8a9b3cf43 update 2025-04-18 11:50:53 +02:00
materus 730482c98b Update 2024-12-05 16:00:58 +01:00
materus a69bbcbf6a update 2024-11-27 13:46:39 +01:00
materus 434aae4ac5 done test 2024-11-22 00:13:27 +01:00
materus 1ac33dd3a4 test 2024-11-22 00:12:27 +01:00
materus 7ddede1bb4 test 2024-11-22 00:11:35 +01:00
materus 1e929fedae test 2024-11-22 00:10:14 +01:00
materus 3a1f46d4e6 test 2024-11-22 00:09:03 +01:00
materus 8b25020998 test 2024-11-22 00:07:31 +01:00
materus 99627a1343 test 2024-11-22 00:06:28 +01:00
materus f7bfded848 test 2024-11-22 00:05:22 +01:00
materus 41b70d8fa4 done test 2024-11-21 23:52:25 +01:00
materus 3146038d53 test 2024-11-21 23:48:51 +01:00
materus 7dc2a4befa test 2024-11-21 22:45:05 +01:00
materus 9a1d03dd96 test 2024-11-21 22:41:34 +01:00
materus 2076d2c16b test 2024-11-21 22:36:35 +01:00
materus 011ae1606b test 2024-11-21 22:34:26 +01:00
materus b81698d1e0 test 2024-11-21 22:33:13 +01:00
materus 1c84c80bfc test 2024-11-21 22:30:12 +01:00
materus 9733c9fee4 test 2024-11-21 22:21:57 +01:00
materus e374cc2f6f test 2024-11-21 22:04:08 +01:00
materus 241d269789 test 2024-11-21 21:57:55 +01:00
materus 30ca0d4dcf test 2024-11-21 21:56:29 +01:00
materus 35380d2465 test 2024-11-21 21:52:35 +01:00
materus 44228e35c9 test 2024-11-21 21:51:37 +01:00
materus 3c1f23b5d4 Change tangle rules 2024-11-21 21:33:57 +01:00
materus 3ee90d9e60 Updates 2024-11-21 20:55:04 +01:00
materus 1d99fb630f Emacs update, fix corfu-mouse 2024-11-20 22:41:58 +01:00
materus 443da9482a update 2024-11-20 00:57:28 +01:00
materus 1e436f0842 update 2024-11-20 00:49:27 +01:00
materus fec28354bd Updates 2024-11-18 00:28:37 +01:00
materus 9e97dc6f65 Lot of changes, ignoring previous commits format 2024-11-15 18:01:13 +01:00
materus 3d1cc80150 configurations: emacs 2024-11-11 01:22:14 +01:00
materus d3d3397c23 configurations: emacs default encoding 2024-11-10 13:48:00 +01:00
materus 20ace25096 configurations: emacs org config, fix new lines 2024-11-10 13:19:45 +01:00
materus 9652b3877f configurations: emacs tests 2024-11-10 13:12:20 +01:00
materus cecc49700e configurations: emacs tests 2024-11-10 13:07:35 +01:00
materus 9a31ce388f configurations: emacs tests 2024-11-10 13:02:42 +01:00
materus 0a20666db2 configurations: emacs tests 2024-11-10 13:00:18 +01:00
materus ff3cd527f6 configurations: emacs tests 2024-11-10 12:48:01 +01:00
materus 3a6e84cb9c configurations: emacs tests 2024-11-10 12:47:16 +01:00
materus c0b1e1fe57 configurations: emacs tests 2024-11-10 12:46:02 +01:00
materus 8affc46e78 configurations: emacs tests 2024-11-10 12:45:20 +01:00
materus 41f8d29038 configurations: emacs tests 2024-11-10 12:41:54 +01:00
materus 2a09e184df configurations: emacs test org rendering 2024-11-10 12:29:28 +01:00
materus 828f5df566 configurations: emacs org test 2024-11-10 11:58:50 +01:00
materus b2c7c75790 materusPC: plasma defaults update 2024-11-10 11:51:15 +01:00
materus ae24e92771 configurations: vscode changes 2024-11-10 11:50:48 +01:00
materus c390ed0977 configurations: emacs, move config to org file 2024-11-10 11:50:21 +01:00
materus 8dbe62606b configurations: update vscode config 2024-11-04 20:15:41 +01:00
materus ec15512b0e configurations: emacs 2024-11-03 14:03:17 +01:00
materus 729dce48c5 Old-materusPC: vscode settings csharp 2024-11-02 09:25:12 +01:00
materus 9761f22f0c Old-materusPC: vscode settings 4 2024-11-01 22:51:06 +01:00
materus b6dbd01553 Old-materusPC: vscode settings 3 2024-11-01 22:26:09 +01:00
materus 8643263568 Old-materusPC: vscode settings 2 2024-11-01 18:25:36 +01:00
materus 5550ce20e7 Old-materusPC: vscode settings 2024-11-01 15:15:20 +01:00
materus 6590f99c8d configurations & Old-materusPC: vscode settings 2024-11-01 00:10:11 +01:00
materus aaf9221f44 configurations: add nix vscode-extensions to registry 2024-10-31 21:19:28 +01:00
materus fde5aa4bda flake: update lock 2024-10-31 21:19:04 +01:00
materus a2cfe918f4 .gitignore 2024-10-31 21:09:53 +01:00
materus 08870222f3 .gitignore 2024-10-31 21:05:37 +01:00
materus 2971dd2dc7 configurations: emacs changes 2 2024-10-30 22:06:16 +01:00
materus eb746b0e7c configurations: emacs changes 2024-10-30 16:37:59 +01:00
materus 868a49fb74 configurations: emacs and plasma-manger changes, crypt.sh formatting 2024-10-30 14:09:43 +01:00
materus 4912a5bc99 configurations: replace nil with nixd 2024-10-29 14:28:17 +01:00
materus cf452a09ed configurations: add micro to terminalApps 2024-10-29 13:32:14 +01:00
materus d9995faa9a materusPC: disable emacs 2024-10-29 13:27:33 +01:00
materus 11987e1f3b configurations: update emacs config 2024-10-29 13:15:12 +01:00
materus 1154c45291 materusPC: plasma-manager and emacs updates 2024-10-28 16:31:39 +01:00
materus a69b24ac89 materusPC: plasma-manager update spectacle 2024-10-28 08:08:27 +01:00
materus 58f86d3b84 materusPC: plasma-manager reset spectacle 2024-10-28 00:27:29 +01:00
materus 4dfcc37c3c materusPC: updates 2024-10-27 22:00:57 +01:00
materus 319f3899ab materusPC: plasma-manager customButtonImage 2024-10-25 23:37:21 +02:00
materus b7c314c6cc materusPC: disable ozone for brave 2024-10-25 23:34:45 +02:00
materus 8425f3547c materusPC: samba follow links for VM 2024-10-25 23:29:33 +02:00
materus d3a1c9260a configurations: add qalculate-qt to desktopPackages 2024-10-24 12:14:16 +02:00
materus a5199290d4 materusPC: mount windows disk to non vfio vm 2024-10-24 11:11:32 +02:00
materus 0113129093 materusPC: plasma-manager video filename 2024-10-23 21:05:47 +02:00
materus 1056568b6c materusPC: plasma-manager disable kwallet 2024-10-23 15:28:13 +02:00
materus c2f4b59d90 homes: move shared modules to hosts 2024-10-23 11:35:54 +02:00
materus 1ab225b553 homes: add plasma-manager as shared home modules for nixos hosts 2024-10-23 11:10:28 +02:00
materus 4737695b57 homes: add plasma-manager as shared home module, remove from hosts 2024-10-23 11:07:05 +02:00
materus 0a163b6dc0 hosts: add plasma-manager as shared home module 2024-10-23 11:06:09 +02:00
materus badbe9c8d2 configurations: fix plasma-manager in registry 2024-10-23 10:59:28 +02:00
materus bb86604348 configurations: add plasma-manager to registry 2024-10-22 09:49:51 +02:00
materus 0ecfadd82c flake: update lock 2024-10-21 23:13:08 +02:00
materus 5b908cb519 flake: update lock 2024-10-21 23:07:28 +02:00
materus 9a209160a9 configurations: disable wezterm 2024-10-21 17:09:26 +02:00
materus 935de5f352 materusPC: remove test user 2024-10-21 16:49:19 +02:00
materus c4fccc6f11 flake: update lock 2024-10-21 16:39:29 +02:00
materus a14063f51d materusPC: move user config 2024-10-21 16:37:27 +02:00
materus a1cf15a3ad materusPC: add test user 2024-10-21 16:36:20 +02:00
materus 6d16c995e2 materusPC: desktop env changes 2024-10-18 17:32:47 +02:00
materus 6ac8524294 materusPC: add nix ld 2024-10-18 17:00:45 +02:00
materus 533691247d materusPC: init archlinux nspawn container 2024-10-15 23:45:46 +02:00
materus a075a51ed4 flake: update lock 2024-10-15 22:48:55 +02:00
materus 55264c7d5e waffentrager: fix spaces count in samba cfg 2024-10-15 21:24:25 +02:00
materus 006250b806 configurations: add vk basalt, add hp drivers, vim changes 2024-10-15 21:22:16 +02:00
materus 8327d4cfd3 materusPC: java settings 2024-09-26 00:04:39 +02:00
materus 710108fd6f profile: mpv 2024-09-25 23:54:01 +02:00
materus 59aaa7f319 waffentrager: updates 2024-09-25 23:53:39 +02:00
materus cba573ed94 flake: update lock 2024-09-25 23:53:21 +02:00
materus fecfdec551 Old-materusPC: use unstable kernel and nvidia, rename fonts.fonts; 2024-09-21 11:08:41 +02:00
materus 6bb1330d70 Old-materusPC & materusPC: wireguard keep-alive 2024-09-21 11:07:57 +02:00
materus 5b84ce4c5d valkyrie: ipv6 config 2024-09-20 11:02:08 +02:00
materus 2e8ee98b26 common: mpv changes 2024-09-18 10:19:30 +02:00
materus 1f822e8211 waffentrager: valkyrie: jellyfin and wireguard related changes 2024-09-15 21:44:06 +02:00
materus f8acddeb2c waffentrager: change nginx to tengine, add default location 2024-09-15 21:43:20 +02:00
materus d4b7c80be6 materusPC: remove lxd group 2024-09-15 21:42:17 +02:00
materus 7135b53f7d materusPC: change rpfilter for wireguard 2024-09-15 21:41:55 +02:00
materus 879c876721 materusPC: change max VTs to 4 2024-09-15 21:41:28 +02:00
materus 79bc6c72df common: add syncplay to home apps 2024-09-15 21:40:59 +02:00
materus c5602cebbf scripts: convert: add nix build to ensure path 2024-09-15 21:40:25 +02:00
materus ed1b629386 flake: update lock 2024-09-15 21:39:51 +02:00
materus 448e1c58ae waffentrager: add maloja and multi-scrobbler, file restructure. valkyrie: reverse proxy (correct commit) 2024-09-12 11:56:18 +02:00
materus e233dc9efa waffentrager: add maloja and multi-scrobbler, file restructure. valkyrie: reverse proxy 2024-09-12 11:55:35 +02:00
materus dd0283e65a configurations: updates to script, moniotoring and dcbot 2024-09-09 11:04:15 +02:00
materus 3406af1780 waffentrager: move prometheus stateDir 2024-09-03 10:43:00 +02:00
materus f892292aa0 waffentrager: monitoring 2024-09-03 10:12:23 +02:00
materus b9f78639c8 flake: update lock 2024-09-02 23:20:21 +02:00
materus f0e03b7e01 waffentrager: samba updates 2024-09-02 23:20:13 +02:00
materus fde2617ea8 waffentrager: add disabled grafana 2024-09-02 23:19:58 +02:00
materus fd5e096b37 waffentrager: upnp ports 2024-08-31 17:41:26 +02:00
materus 4452704de0 valkyrie: wireguard changes 2024-08-30 17:10:33 +02:00
materus 5c9fb14d41 waffentrager: commented out service 2024-08-30 16:57:34 +02:00
materus 7ef15e5f5a materusPC: add jackett 2024-08-30 16:57:16 +02:00
materus 8f2f6b2c37 flake: update lock 2024-08-30 16:56:52 +02:00
materus e7bff66b1e waffentrager: changes to services 2024-08-23 18:48:38 +02:00
materus 04808eb9da flake: update lock 2024-08-23 18:47:57 +02:00
materus b5fa9e6f4c scripts: convert: another change quality 2024-08-23 18:47:47 +02:00
materus 1381df6297 Merge branch 'master' of github.com:materusPL/nixos-config 2024-08-19 20:14:44 +02:00
materus ab0f13a542 materusPC: add some apps 2024-08-19 20:14:01 +02:00
materus 25fffb3879 flake: update lock 2024-08-19 20:13:31 +02:00
materus 9c9d53b976 valkyrie: dcbot disable update alerts 2024-08-19 20:13:13 +02:00
materus bb4b85013c Old-materusPC: syncthing settings 2024-08-19 08:27:50 +02:00
materus c5aeae2cff valkyrie: jellyfin nginx changes 2024-08-11 20:05:30 +02:00
materus 5e96a9fcca materusPC: add kde connect 2024-08-08 20:45:54 +02:00
materus 4fdee87636 waffentrager: add jellyfin 2024-08-08 20:45:42 +02:00
materus 87bdc15245 materusPC: rename windows virtual machine 2024-08-05 00:27:55 +02:00
materus b9ce475a3e Old-materusPC: nvidia settings, renames to new 2024-07-26 21:23:58 +02:00
materus 3dc734957e waffentrager: updates to use ldap and postgres, fix samba characters 2024-07-22 15:31:57 +02:00
materus f833382298 materusPC: use qcow2 again 2024-07-13 23:53:37 +02:00
materus 94db4c8851 waffentrager: lldap changes 2024-07-13 20:11:06 +02:00
materus ffa133d894 waffentrager: lldap use postgresql 2024-07-13 19:02:17 +02:00
materus 7abe845c5a waffentrager: config lldap 2024-07-13 15:44:07 +02:00
materus 6a1700f0b7 waffentrager: samba and syncthing 2024-07-12 15:53:54 +02:00
materus c8cbb1f2f9 scripts: convert: another change of command 2024-07-12 11:51:46 +02:00
materus afbe226504 valkyrie: dcbot changes 2024-07-12 01:54:56 +02:00
materus 3403a4cb3b materusPC: ffmpegthumbs 2024-07-12 01:28:51 +02:00
materus 672349895d waffentrager: nextcloud add formats for thumbnail 2024-07-12 01:28:33 +02:00
materus 30ca179cb2 valkyrie: dcbot change 2024-07-12 01:28:06 +02:00
materus 2c27517ab1 waffentrager: disable samba ad 2024-07-09 23:45:39 +02:00
materus 5de90edd9c flake: update lock 2024-07-09 23:45:21 +02:00
materus e0394f866c scripts: convert: change convert command 2024-07-09 20:49:32 +02:00
materus 3ec62e702a materusPC: move container config, add vulkan headers, add image convert script 2024-07-09 14:10:48 +02:00
materus 026b04add6 materusPC: vscodium env update llvm and add xmake 2024-07-03 15:48:36 +02:00
materus 711b0a7860 configurations: disable default gamescope setcap for steam 2024-07-03 14:43:54 +02:00
materus a3b69adbdd flake: update lock 2024-07-03 14:43:24 +02:00
materus 0040f1d23e materusPC: add vlc, change ffmpeg and obs 2024-06-25 16:28:50 +02:00
materus 33d7f92b92 flake: update lock 2024-06-25 16:28:24 +02:00
materus f122625e71 materusPC: fix tmp.nix 2024-06-17 13:50:07 +02:00
materus d9c5af566b waffentrager: update nextcloud 2024-06-17 13:41:18 +02:00
materus 7d90f5f210 flake: updates to 24.05 2024-06-17 13:09:58 +02:00
materus 636eb2a8e6 flake: update lock, Old-materusPC: brave settings 2024-06-16 13:23:48 +02:00
materus b4cafcfe3a configurations: updates 2024-05-20 15:40:24 +02:00
materus a8fc766902 flake: update lock 2024-05-20 15:40:00 +02:00
materus c04f1f41fd materusPC: fix for reattach performance issue 2024-05-20 15:39:47 +02:00
materus ab43f858ea materusPC: ssh changes, vm changes, steam changes 2024-05-10 18:12:05 +02:00
materus f4dd3ab0ac materusPC: brave desktop file 2024-05-06 13:12:12 +02:00
materus c4beb9542b Old-materusPC: portal settings 2024-05-02 20:20:37 +02:00
materus 143a8ef419 flake: update lock, Old-materusPC: wayland changes 2024-05-02 18:33:26 +02:00
materus 3abec20d7f waffentrager, valkyrie: change wg port 2024-05-02 12:16:55 +02:00
materus 7d42994f21 Old-materusPC: use nvidia gpu for steam and browser 2024-05-02 10:15:29 +02:00
materus cff5051f75 Old-materusPC: network and audio update 2024-05-02 08:50:39 +02:00
materus e901f042fb flake: update lock, update things to new lock 2024-05-01 12:38:15 +02:00
materus 400dadba7f materusPC: more vm tuning 2024-04-22 15:33:31 +02:00
materus c6cdd9d8af materusPC: Window VM changes 2024-04-22 11:33:57 +02:00
95 changed files with 5938 additions and 1375 deletions
+1
View File
@@ -1 +1,2 @@
\#*\# \#*\#
.vscode
-18
View File
@@ -1,18 +0,0 @@
# nixos-config
My NixOS and home-manager configs.
Dotfiles and helper scripts.
Not all config is here, some I keep in private flake.
## Hosts
materusPC - my main PC
Old-materusPC - my old PC, barely used
flamaster - my laptop, used mostly as server for games.
valkyrie - VPS, my website and pleroma instance
waffentrager - raspberry pi4, home server
+21
View File
@@ -0,0 +1,21 @@
#+TITLE: nixos-config
#+AUTHOR: materus
#+DESCRIPTION: NixOS config and dotfiles
#+OPTIONS: \n:t
My NixOS and home-manager configs.
Dotfiles and helper scripts.
Part of it is encrypted by git-crypt, mostly just ips and names. Secrets are managed by sops.
* Hosts
[[./configurations/host/materusPC/][materusPC]] - my main PC
[[./configurations/host/Old-materusPC/][Old-materusPC]] - my old PC, barely used
[[./configurations/host/flamaster/][flamaster]] - my laptop, used mostly as server for games.
[[./configurations/host/valkyrie/][valkyrie]] - VPS, my website and pleroma instance
[[./configurations/host/waffentrager/][waffentrager]] - raspberry pi4, home server
@@ -2,25 +2,43 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, materusArg, ... }:
{ {
imports = config,
[ pkgs,
# Include the results of the hardware scan. materusCfg,
./hardware-configuration.nix materusArg,
]; ...
}:
let
unstable = import materusCfg.materusFlake.inputs.nixpkgs {
system = "x86_64-linux";
config = {
allowUnfree = true;
nvidia.acceptLicense = true;
};
};
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./network.nix
];
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = [ "ntfs" ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.auto-optimise-store = true; nix.settings.auto-optimise-store = true;
nix.settings.substituters = [ nix.settings.substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cache.nixos.org/" "https://cache.nixos.org/"
]; ];
nix.settings.trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; nix.settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.grub = { boot.loader.grub = {
enable = true; enable = true;
@@ -32,21 +50,21 @@
}; };
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = unstable.linuxPackages_zen;
boot.tmpOnTmpfs = true; boot.tmp.useTmpfs = true;
services.flatpak.enable = true; services.flatpak.enable = true;
services.gvfs.enable = true; services.gvfs.enable = true;
programs.kdeconnect.enable = true;
networking.hostName = "Old-materusPC"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
services.syncthing = {
enable = true;
user = "materus";
dataDir = "/home/materus";
};
services.fstrim = { services.fstrim = {
enable = true; enable = true;
interval = "weekly"; interval = "weekly";
@@ -67,22 +85,13 @@
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
hardware.opengl.enable = true; hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
materus.profile.steam.enable = true; materus.profile.steam.enable = false;
# Configure keymap in X11 # Configure keymap in X11
services.xserver.layout = "pl"; services.xserver.xkb.layout = "pl";
# services.xserver.xkbOptions = { # services.xserver.xkbOptions = {
# "eurosign:e"; # "eurosign:e";
# "caps:escape" # map caps to escape. # "caps:escape" # map caps to escape.
@@ -92,19 +101,25 @@
services.printing.enable = true; services.printing.enable = true;
# Enable sound. # Enable sound.
sound.enable = true; #sound.enable = true;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
systemWide = true;
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
jack.enable = true; jack.enable = true;
}; };
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
services.udev = {
extraRules = ''
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
'';
};
virtualisation.podman = { virtualisation.podman = {
enable = true; enable = true;
@@ -112,14 +127,35 @@
dockerSocket.enable = true; dockerSocket.enable = true;
}; };
users.users.materus = { users.users.materus = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "kvm" "input" "libvirt" "libvirtd" "podman" ]; extraGroups = [
"wheel"
"networkmanager"
"kvm"
"input"
"libvirt"
"libvirtd"
"podman"
"audio"
"pipewire"
];
shell = pkgs.zsh; shell = pkgs.zsh;
description = "Mateusz Słodkowicz"; description = "Mateusz Słodkowicz";
}; };
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu.ovmf.enable = true;
qemu.ovmf.packages = [ pkgs.OVMFFull.fd ];
qemu.runAsRoot = true;
qemu.swtpm.enable = true;
qemu.package = pkgs.qemu_full;
};
environment.sessionVariables = rec { environment.sessionVariables = rec {
XDG_CACHE_HOME = "\${HOME}/.cache"; XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config"; XDG_CONFIG_HOME = "\${HOME}/.config";
@@ -131,9 +167,7 @@
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";
PATH = [ PATH = [ "\${XDG_BIN_HOME}" ];
"\${XDG_BIN_HOME}"
];
}; };
environment.shellInit = '' environment.shellInit = ''
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi; if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
@@ -142,13 +176,23 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.libsForQt5.fcitx5-qt ]; i18n.inputMethod.fcitx5.addons = [
pkgs.fcitx5-configtool
pkgs.fcitx5-lua
pkgs.fcitx5-mozc
pkgs.libsForQt5.fcitx5-qt
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(vivaldi.overrideAttrs
(oldAttrs: {
dontWrapQtApps = false;
dontPatchELF = true;
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [pkgs.kdePackages.wrapQtAppsHook];
}))
brave brave
glibc glibc
@@ -163,10 +207,14 @@
curl curl
jdk jdk
nss_latest nss_latest
aspell (aspellWithDicts (
aspellDicts.pl ds: with ds; [
aspellDicts.en en
aspellDicts.en-computers en-computers
en-science
pl
]
))
distrobox distrobox
p7zip p7zip
unrar unrar
@@ -177,6 +225,7 @@
xz xz
zip zip
gzip gzip
sops
tree tree
mc mc
@@ -187,12 +236,9 @@
iptraf-ng iptraf-ng
mprocs mprocs
nix-du nix-du
git-crypt git-crypt
wineWowPackages.stagingFull wineWowPackages.stagingFull
winetricks winetricks
protontricks protontricks
@@ -205,9 +251,6 @@
inkscape inkscape
gimp gimp
virt-manager virt-manager
libguestfs libguestfs
@@ -218,12 +261,11 @@
binutils binutils
]; ];
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
fonts.enableDefaultFonts = true; fonts.enableDefaultPackages = true;
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
dejavu_fonts dejavu_fonts
hack-font hack-font
noto-fonts noto-fonts
@@ -234,27 +276,47 @@
ubuntu_font_family ubuntu_font_family
wqy_zenhei wqy_zenhei
monocraft monocraft
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Meslo" "ProFont" ]; }) nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.meslo-lg
nerd-fonts.profont
]; ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
fonts.fontconfig.cache32Bit = true; fonts.fontconfig.cache32Bit = true;
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ]; fonts.fontconfig.defaultFonts.sansSerif = [
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ]; "Noto Sans"
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ]; "DejaVu Sans"
fonts.fontconfig.defaultFonts.monospace = [ "Hack Nerd Font" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ]; "WenQuanYi Zen Hei"
"Noto Color Emoji"
];
fonts.fontconfig.defaultFonts.serif = [
"Noto Serif"
"DejaVu Serif"
"WenQuanYi Zen Hei"
"Noto Color Emoji"
];
fonts.fontconfig.defaultFonts.emoji = [
"Noto Color Emoji"
"OpenMoji Color"
];
fonts.fontconfig.defaultFonts.monospace = [
"Hack Nerd Font"
"Noto Sans Mono"
"WenQuanYi Zen Hei Mono"
];
environment.enableAllTerminfo = true; environment.enableAllTerminfo = true;
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
environment.shells = with pkgs; [ zsh ]; environment.shells = with pkgs; [ zsh ];
programs = { programs = {
steam = { steam = {
enable = true; enable = false;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
}; };
fish.enable = true; fish.enable = true;
java.enable = true; java.enable = true;
java.package = pkgs.graalvmPackages.graalvm-oracle;
command-not-found.enable = false; command-not-found.enable = false;
dconf.enable = true; dconf.enable = true;
}; };
@@ -263,14 +325,15 @@
# programs.mtr.enable = true; # programs.mtr.enable = true;
services.pcscd.enable = true; services.pcscd.enable = true;
/*systemd.user.services.gpg-agent.serviceConfig.ExecStart = [ /*
systemd.user.services.gpg-agent.serviceConfig.ExecStart = [
"" ""
'' ''
${pkgs.gnupg}/bin/gpg-agent --supervised \ ${pkgs.gnupg}/bin/gpg-agent --supervised \
--pinentry-program ${pkgs.kwalletcli}/bin/pinentry-kwallet --pinentry-program ${pkgs.kwalletcli}/bin/pinentry-kwallet
'' ''
];*/ ];
*/
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
@@ -284,13 +347,6 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 ];
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 ];
# Or disable the firewall altogether.
networking.firewall.enable = true;
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix. # accidentally delete configuration.nix.
@@ -305,4 +361,3 @@
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
} }
@@ -1,82 +1,143 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/installer/scan/not-detected.nix") ];
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; boot.kernelModules = [
"kvm-intel"
"vfio-pci"
];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernel.sysctl = { "vm.swappiness" = 10; }; boot.kernel.sysctl = {
boot.kernelParams = [ "ibt=off" "intel_iommu=on" "iommu=pt" "pcie_acs_override=downstream,multifunction" ]; "vm.swappiness" = 10;
fileSystems."/" = };
boot.kernelParams = [
"ibt=off"
"intel_iommu=on"
"iommu=pt"
"pcie_acs_override=downstream,multifunction"
];
fileSystems."/" = {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [
"subvol=@"
"noatime"
"ssd"
"space_cache=v2"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [
"subvol=@boot"
"ssd"
];
};
fileSystems."/materus" = {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [
"subvol=@materus"
"noatime"
"compress=zstd"
"ssd"
"space_cache=v2"
];
neededForBoot = true;
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [
"subvol=@nix"
"noatime"
"compress=zstd"
"ssd"
"space_cache=v2"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs";
options = [
"subvol=@home"
"nossd"
"noatime"
"compress=zstd"
"space_cache=v2"
"autodefrag"
];
};
fileSystems."/materus/data" = {
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs";
options = [
"subvol=@data"
"nossd"
"noatime"
"compress=zstd"
"space_cache=v2"
"autodefrag"
];
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/A5C2-31D1";
fsType = "vfat";
};
zramSwap = {
enable = true;
memoryPercent = 50;
priority = 10;
};
swapDevices = [
{ {
device = "/dev/disk/by-label/NixOS_Root"; device = "/var/lib/swapfile";
fsType = "btrfs"; size = 32 * 1024;
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ]; priority = 5;
}; }
fileSystems."/boot" =
{ {
device = "/dev/disk/by-label/NixOS_Root"; device = "/dev/disk/by-label/NixOS_Swap";
fsType = "btrfs"; priority = 0;
options = [ "subvol=@boot" "ssd" ]; }
}; ];
fileSystems."/materus" =
{
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
neededForBoot = true;
};
fileSystems."/nix" =
{
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs";
options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
};
fileSystems."/materus/data" =
{
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs";
options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
};
fileSystems."/boot/efi" =
{
device = "/dev/disk/by-uuid/A5C2-31D1";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/NixOS_Swap"; }];
fileSystems."/etc/nixos" =
{
device = "/materus/config/nixos-config";
fsType = "none";
options = [ "bind" ];
depends = [ "/materus" ];
};
fileSystems."/etc/nixos" = {
device = "/materus/config/nixos-config";
fsType = "none";
options = [ "bind" ];
depends = [ "/materus" ];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@@ -1,4 +1,4 @@
{ config, pkgs, materusArg, lib, ... }: { config, pkgs, materusArg, materusCfg, lib, ... }:
{ {
home.stateVersion = "22.11"; home.stateVersion = "22.11";
home.homeDirectory = "/home/materus"; home.homeDirectory = "/home/materus";
@@ -13,6 +13,38 @@
gpg.format = "ssh"; gpg.format = "ssh";
}; };
}; };
programs.vscode.userSettings = {
"vscord.app.name" = "VSCodium";
"window.dialogStyle" = "custom";
"window.titleBarStyle" = "custom";
"editor.fontFamily" = "'Hack Nerd Font', 'monospace', monospace";
"workbench.colorTheme" = "Dracula Theme";
"workbench.productIconTheme" = "material-product-icons";
"workbench.iconTheme" = "material-icon-theme";
"d.aggressiveUpdate" = false;
"d.servedPath" = "${pkgs.serve-d}/bin/serve-d";
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.formatterPath" = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
"C_Cpp.clang_format_path" = "${pkgs.clang-tools}/bin/clang-format";
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
"clang-tidy.executable" = "${pkgs.clang-tools}/bin/clang-tidy";
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
"python.defaultInterpreterPath" = "${pkgs.python3Full}/bin/python";
"[cpp]" = {
"editor.defaultFormatter" = "xaver.clang-format";
};
};
materus.profile = { materus.profile = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
nixpkgs.enable = lib.mkDefault false; nixpkgs.enable = lib.mkDefault false;
@@ -20,7 +52,8 @@
enableTerminal = lib.mkDefault true; enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true; enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true; enableNixDevel = lib.mkDefault true;
editor.code.fhs.enable = true; editor.code.fhs.enable = false;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [ editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
llvmpkgs.clang llvmpkgs.clang
llvmpkgs.llvm llvmpkgs.llvm
@@ -68,12 +101,61 @@
dub dub
]); ]);
editor.emacs.enable = false; editor.emacs.enable = true;
}; };
xdg.desktopEntries.brave-browser =
let
env = lib.concatStringsSep " " [
''__NV_PRIME_RENDER_OFFLOAD="1"''
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
''__VK_LAYER_NV_optimus="NVIDIA_only"''
''NIXOS_OZONE_WL="1"''
];
script = pkgs.writeShellScript "brave" ''
${env} brave "$@"
'';
in
{
name = "Brave Web Browser";
genericName = "Przeglądarka WWW";
comment = "Skorzystaj z internetu";
exec = "${script} %U";
icon = "brave-browser";
terminal = false;
categories = [ "Application" "Network" "WebBrowser" ];
mimeType = [
"application/pdf"
"application/rdf+xml"
"application/rss+xml"
"application/xhtml+xml"
"application/xhtml_xml"
"application/xml"
"image/gif"
"image/jpeg"
"image/png"
"image/webp"
"text/html"
"text/xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/ipfs"
"x-scheme-handler/ipns"
];
actions.new-windows = {
exec = "${script}";
name = "Nowe okno";
};
actions.new-private-windows = {
exec = "${script} --incognito";
name = "Nowe okno incognito";
};
};
home.packages = [ home.packages = [
pkgs.papirus-icon-theme pkgs.papirus-icon-theme
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvmPackages.graalvm-oracle pkgs.graalvmPackages.graalvm-oracle_17]; })
]; ];
} }
@@ -0,0 +1,57 @@
{ config, pkgs, lib, materusArg, ... }:
{
sops.templates."networkmanager.env".content = ''
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wg-key}"
'';
networking.useDHCP = lib.mkDefault true;
networking.hostName = "Old-materusPC";
networking.wireless.iwd.enable = true;
networking.networkmanager.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656
22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
];
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656
22000 21027 # Syncthing
];
# Or disable the firewall altogether.
networking.firewall.enable = true;
networking.networkmanager.settings = {
connectivity = {
uri = "http://nmcheck.gnome.org/check_network_status.txt";
};
};
networking.networkmanager.ensureProfiles.environmentFiles = [
config.sops.templates."networkmanager.env".path
];
networking.networkmanager.ensureProfiles.profiles = {
wg0 = {
connection = {
id = "wg0";
type = "wireguard";
interface-name = "wg0";
};
wireguard = {
private-key = "$WIREGUARD_PRIVATEKEY";
};
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
persistent-keepalive = "20";
};
ipv4 = {
address1 = "${materusArg.ips.wireguard.Old-materusPC}/32";
dns = "${materusArg.ips.wireguard.valkyrie};";
method = "manual";
never-default = "true";
};
ipv6 = {
addr-gen-mode = "stable-privacy";
method = "disabled";
};
proxy = { };
};
};
}
+6 -9
View File
@@ -2,17 +2,10 @@
{ {
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = { hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.latest;
modesetting.enable = true; modesetting.enable = true;
nvidiaSettings = true; nvidiaSettings = true;
prime = { open = true;
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
}; };
hardware.opengl.extraPackages = with pkgs; [ hardware.opengl.extraPackages = with pkgs; [
@@ -28,5 +21,9 @@
]; ];
materus.profile.steam.extraEnv = { materus.profile.steam.extraEnv = {
VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json''; VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json'';
__NV_PRIME_RENDER_OFFLOAD="1";
__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0";
__GLX_VENDOR_LIBRARY_NAME="nvidia";
__VK_LAYER_NV_optimus="NVIDIA_only";
}; };
} }
+7 -3
View File
@@ -1,9 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.xserver.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.wayland.enable = true; services.displayManager.sddm.wayland.enable = true;
services.xserver.displayManager.sddm.settings = { services.displayManager.sddm.settings = {
General = { General = {
InputMethod = ""; InputMethod = "";
}; };
@@ -16,6 +16,10 @@
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ]; QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
XCURSOR_THEME = "breeze_cursors"; XCURSOR_THEME = "breeze_cursors";
}; };
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
xdg.portal.xdgOpenUsePortal = true;
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enableQt5Integration = true; services.desktopManager.plasma6.enableQt5Integration = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ]; environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
+8 -3
View File
@@ -13,6 +13,7 @@ let
inherit host; inherit host;
inherit hm; inherit hm;
inherit hmAsModule; inherit hmAsModule;
inherit arch;
nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus; nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus;
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs; configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
path = materusFlake.selfPath; path = materusFlake.selfPath;
@@ -30,9 +31,13 @@ let
(if hmAsModule then hm.nixosModules.home-manager else { }) (if hmAsModule then hm.nixosModules.home-manager else { })
(if hmAsModule then (if hmAsModule then
{ {
home-manager.backupFileExtension = "hm-backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
materusCfg.configInputs.sops-nix.homeManagerModules.sops
];
home-manager.users = (builtins.foldl' (a: b: a // b) { } (builtins.map home-manager.users = (builtins.foldl' (a: b: a // b) { } (builtins.map
(user: { (user: {
${user} = ({ ... }: ${user} = ({ ... }:
@@ -52,10 +57,10 @@ let
}) // { inherit materusCfg; }; }) // { inherit materusCfg; };
in in
{ {
materusPC = makeSystem { host = "materusPC"; stable = false; }; materusPC = makeSystem { host = "materusPC"; stable = true; };
flamaster = makeSystem { host = "flamaster"; stable = true; }; flamaster = makeSystem { host = "flamaster"; stable = true; };
valkyrie = makeSystem { host = "valkyrie"; stable = true; }; valkyrie = makeSystem { host = "valkyrie"; stable = true; };
waffentrager = makeSystem { host = "waffentrager"; stable = true; arch = "aarch64-linux"; }; waffentrager = makeSystem { host = "waffentrager"; stable = true; arch = "aarch64-linux"; };
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = false; }; Old-materusPC = makeSystem { host = "Old-materusPC"; stable = true; };
} }
+33 -29
View File
@@ -56,11 +56,12 @@
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "pl_PL.utf8"; i18n.defaultLocale = "pl_PL.UTF-8";
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
hardware.nvidia.open = false;
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true; hardware.opengl.enable = true;
hardware.nvidia.prime = { hardware.nvidia.prime = {
@@ -76,7 +77,7 @@
# Enable the KDE Plasma Desktop Environment. # Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma6.enable = true;
# Configure keymap in X11 # Configure keymap in X11
services.xserver = { services.xserver = {
@@ -91,7 +92,7 @@
services.printing.enable = true; services.printing.enable = true;
# Enable sound with pipewire. # Enable sound with pipewire.
sound.enable = true; #sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
@@ -108,7 +109,7 @@
}; };
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.materus = { users.users.materus = {
@@ -117,7 +118,7 @@
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ]; openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
packages = with pkgs; [ packages = with pkgs; [
kate kdePackages.kate
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@@ -138,7 +139,7 @@
distrobox distrobox
config.materus.profile.packages.firefox firefox
config.programs.java.package config.programs.java.package
@@ -156,37 +157,40 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "no";
services.openssh.settings.PasswordAuthentication = false;
services.openssh.openFirewall = true;
programs.ssh.startAgent = true;
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 27015 25565 24454 8123 ]; networking.firewall.allowedTCPPorts = [ 22 27015 25565 25570 8123 8100 24800 ];
networking.firewall.allowedTCPPortRanges = [{ from = 16262; to = 16272; }]; networking.firewall.allowedTCPPortRanges = [{ from = 16262; to = 16272; }];
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 ]; networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 24800 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
networking.firewall.enable = true; networking.firewall.enable = true;
networking.networkmanager.extraConfig = lib.mkDefault '' networking.networkmanager.settings = {
[connectivity] connectivity = { uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; };
uri=http://nmcheck.gnome.org/check_network_status.txt };
'';
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
programs.neovim.enable = true; programs.neovim.enable = true;
programs.neovim.vimAlias = true; programs.neovim.vimAlias = true;
programs.neovim.viAlias = true; programs.neovim.viAlias = true;
services.flatpak.enable = true; services.flatpak.enable = true;
xdg.portal.enable = true; xdg.portal.enable = true;
virtualisation.podman.enable = true; virtualisation.podman.enable = true;
virtualisation.podman.dockerCompat = true; virtualisation.podman.dockerCompat = true;
virtualisation.podman.enableNvidia = true; virtualisation.podman.enableNvidia = true;
virtualisation.podman.dockerSocket.enable = true; virtualisation.podman.dockerSocket.enable = true;
} }
+1 -1
View File
@@ -6,7 +6,7 @@
./configuration.nix ./configuration.nix
]; ];
materus.profile.nix.enable = true; materus.profile.nix.enable = true;
materus.profile.steam.enable = true; #materus.profile.steam.enable = true;
} }
@@ -26,6 +26,12 @@
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
}; };
fileSystems."/data" =
{
device = "/dev/disk/by-label/HDD_DATA";
fsType = "btrfs";
options = [ "noatime" "compress=zstd" "nossd" "autodefrag" ];
};
fileSystems."/boot" = fileSystems."/boot" =
{ {
device = "/dev/disk/by-label/NixOS_Root_Laptop"; device = "/dev/disk/by-label/NixOS_Root_Laptop";
@@ -48,10 +54,15 @@
}; };
swapDevices = [{ swapDevices = [{
device = "/var/.swapfile"; device = "/data/.swapfile";
size = 32 * 1024; size = 32 * 1024;
}]; }];
zramSwap = {
enable = true;
memoryPercent = 50;
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@@ -3,6 +3,10 @@
home.stateVersion = "23.05"; home.stateVersion = "23.05";
home.homeDirectory = "/home/materus"; home.homeDirectory = "/home/materus";
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
materus.profile = { materus.profile = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
nixpkgs.enable = lib.mkDefault false; nixpkgs.enable = lib.mkDefault false;
@@ -11,7 +15,67 @@
enableTerminalExtra = lib.mkDefault true; enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true; enableNixDevel = lib.mkDefault true;
bash.enable = true;
zsh.enable = true; zsh.enable = true;
editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
llvmpkgs.clang
llvmpkgs.llvm
llvmpkgs.bintools
llvmpkgs.lld
llvmpkgs.lldb
llvmpkgs.libllvm
llvmpkgs.libllvm.dev
raylib
gcc
gdb
materusArg.unstable.nixd
nixfmt-rfc-style
nixpkgs-fmt
cmake
gnumake
ninja
binutils
coreutils
util-linux
openssl
openssl.dev
pkg-config
dotnet-sdk_8
mono
mold
python3
lua
gtk4.dev
gtk4
miniaudio
SDL2.dev
SDL2
freeglut.dev
freeglut
boost.dev
boost
glew.dev
libGL.dev
libGLU.dev
vulkan-loader.dev
xorg.xorgproto
xorg.libX11.dev
xorg.libXrandr.dev
xorg.libXrender.dev
rustup
freetype.dev
fpc
openjdk21
bison
flex
ldc
dmd
dub
]);
}; };
+36 -9
View File
@@ -1,7 +1,7 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
#REGION test
sound.enable = true; #sound.enable = true;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@@ -9,20 +9,20 @@
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
systemWide = false; systemWide = true;
jack.enable = true; jack.enable = true;
}; };
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
environment.sessionVariables = environment.sessionVariables =
let let
makePluginPath = format: makePluginPath =
(lib.makeSearchPath format [ format:
"$HOME/.${format}:"
+ (lib.makeSearchPath format [
"$HOME/.nix-profile/lib" "$HOME/.nix-profile/lib"
"/run/current-system/sw/lib" "/run/current-system/sw/lib"
"/etc/profiles/per-user/$USER/lib" "/etc/profiles/per-user/$USER/lib"
]) ]);
+ ":$HOME/.${format}";
in in
{ {
ALSOFT_DRIVERS = "pulse"; ALSOFT_DRIVERS = "pulse";
@@ -36,10 +36,37 @@
}; };
services.udev = { services.udev = let
script = pkgs.writeShellScript "arch-mknod" ''
ACTION=$1
KERNEL=$(basename $2)
MAJOR=$3
MINOR=$4
if (systemctl is-active --quiet systemd-nspawn@archlinux); then
if [[ $ACTION == "add" || "$ACTION" == "change" ]]; then
machinectl shell root@archlinux /bin/bash -c "
if ! [ -f /dev/$KERNEL ]; then
mknod /dev/$KERNEL c $MAJOR $MINOR
chmod 660 /dev/$KERNEL
chown root:input /dev/$KERNEL
fi
"
elif [[ $ACTION == "remove" ]]; then
machinectl shell root@archlinux /bin/rm /dev/$KERNEL
fi
fi
'';
in {
extraRules = '' extraRules = ''
KERNEL=="rtc0", GROUP="audio" KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio" KERNEL=="hpet", GROUP="audio"
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
SUBSYSTEM=="hidraw", KERNEL=="hidraw*", RUN+="${script} ''$env{ACTION} ''$env{DEVNAME} ''$env{MAJOR} ''$env{MINOR}"
''; '';
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -0,0 +1,147 @@
{
config,
pkgs,
lib,
...
}:
let
mainMirror = "https://ftp.icm.edu.pl/pub/Linux/dist/archlinux";
extraMirrors = [ ];
getty = [
6
7
];
ttys = [
6
7
8
] ++ getty;
startPkgs = lib.strings.concatStringsSep " " [
"base"
"base-devel"
"dbus"
"less"
"nano"
"bash-completion"
];
scripts = {
preStart = pkgs.writeShellScript "arch-pre-start" ''
if [ ! -d "/var/lib/machines/archlinux" ]; then
export PATH=''${PATH:+''${PATH}:}${
lib.strings.makeBinPath (
with pkgs;
[
wget
coreutils-full
gnutar
zstd
]
)
}
ARCH_IMAGE=$(mktemp)
trap 'rm $ARCH_IMAGE' EXIT
wget "${mainMirror}/iso/latest/archlinux-bootstrap-x86_64.tar.zst" -O $ARCH_IMAGE
mkdir -p /var/lib/machines/archlinux
trap 'rm -rf /var/lib/machines/archlinux' ERR
tar -xaf $ARCH_IMAGE -C "/var/lib/machines/archlinux" --strip-components=1 --numeric-owner
printf 'Server = %s/$repo/os/$arch\n' "${mainMirror}" > /var/lib/machines/archlinux/etc/pacman.d/mirrorlist
rm "/var/lib/machines/archlinux/etc/resolv.conf"
[ -f "/var/lib/machines/archlinux/etc/securetty" ] && \
printf 'pts/%d\n' $(seq 0 10) >>"/var/lib/machines/archlinux/etc/securetty"
systemd-machine-id-setup --root="/var/lib/machines/archlinux"
systemd-nspawn -q --settings=false --system-call-filter=@sandbox -D "/var/lib/machines/archlinux" /bin/sh -c "
export PATH=/bin
touch /etc/systemd/do-not-udevadm-trigger-on-update
pacman-key --init && pacman-key --populate
pacman -Rs --noconfirm arch-install-scripts
pacman -Sy --noconfirm --needed ${startPkgs}
pacman -Syu --noconfirm
systemctl disable getty@tty1.service
${
lib.strings.concatStringsSep "\n" (
lib.lists.forEach getty (x: "systemctl enable getty@tty${builtins.toString x}.service")
)
}
"
fi
'';
};
in
{
systemd.nspawn."archlinux" = {
enable = true;
execConfig = {
Boot = true;
SystemCallFilter = [ "@known" ];
Timezone = "symlink";
Capability = "all";
PrivateUsers = "no";
ResolvConf = "copy-host";
};
filesConfig = {
BindReadOnly = [
"/nix"
"/run/current-system"
"/run/booted-system"
"/run/opengl-driver"
"/run/opengl-driver-32"
];
Bind = [
"/:/run/host-root"
"/run/udev"
"/run/pipewire"
"/run/pulse"
"/sys/class"
"/sys/devices"
"/dev/fuse"
"/dev/snd"
"/dev/input"
"/dev/uinput"
"/dev/shm"
"/dev/kfd"
"/dev/dri"
"/dev/tty"
"/dev/tty0"
"/var/lib/flatpak"
"/var/lib/containers"
"/tmp/.X11-unix"
/materus
] ++ lib.lists.forEach ttys (x: "/dev/tty${builtins.toString x}");
};
networkConfig = {
Private = false;
};
};
systemd.services."systemd-nspawn@archlinux" = {
enable = true;
preStart = "${scripts.preStart}";
overrideStrategy = "asDropin";
serviceConfig = {
DeviceAllow = [
"char-* rwm"
"block-* rwm"
"/dev/shm rwm"
];
};
};
}
@@ -0,0 +1,17 @@
{...}:
{
imports = [
./arch.nix
./fedora.nix
];
virtualisation.lxc.enable = true;
virtualisation.lxc.lxcfs.enable = true;
virtualisation.lxd.enable = false;
virtualisation.waydroid.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
}
@@ -0,0 +1,75 @@
{
config,
pkgs,
lib,
...
}:
let
ttys = [
9
10
];
in
{
systemd.nspawn."fedora" = {
enable = true;
execConfig = {
Boot = true;
SystemCallFilter = [ "@known" ];
Timezone = "symlink";
Capability = "all";
PrivateUsers = "no";
ResolvConf = "off";
};
filesConfig = {
BindReadOnly = [
"/nix"
"/run/current-system"
"/run/booted-system"
"/run/opengl-driver"
"/run/opengl-driver-32"
];
Bind = [
"/:/run/host-root"
"/run/udev"
"/dev/fuse"
"/dev/snd"
"/dev/input"
"/dev/shm"
"/dev/kfd"
"/dev/dri"
"/dev/tty"
"/dev/tty0"
"/var/lib/flatpak"
"/tmp/.X11-unix"
/materus
] ++ lib.lists.forEach ttys (x: "/dev/tty${builtins.toString x}");
};
networkConfig = {
Bridge="br0";
};
};
systemd.services."systemd-nspawn@fedora" = {
enable = true;
overrideStrategy = "asDropin";
serviceConfig = {
ConditionPathExists="/var/lib/machines/fedora";
DeviceAllow = [
"char-tty rwm"
"char-input rwm"
"char-drm rwm"
];
};
};
}
+8 -4
View File
@@ -6,15 +6,14 @@
./hardware ./hardware
./vm ./vm
./secrets ./secrets
./containers
./other
./scripts.nix ./scripts.nix
./tmp.nix ./tmp.nix
./network.nix ./network.nix
./kde.nix
./audio.nix ./audio.nix
./apps.nix
]; ];
@@ -26,6 +25,11 @@
materus.profile.nix.enable = true; materus.profile.nix.enable = true;
materus.profile.nixpkgs.enable = true; materus.profile.nixpkgs.enable = true;
materus.profile.fonts.enable = true; materus.profile.fonts.enable = true;
materus.profile.steam.enable = true; materus.profile.steam.enable = false;
services.logind.extraConfig = ''
NAutoVTs=4
ReserveVT=4
'';
} }
@@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, materusArg, ... }:
let let
video = [ video = [
@@ -13,26 +13,49 @@ let
]; ];
in in
{ {
#Kernel #Kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelParams = [ "rcu_nocbs=8-15,24-31" "nohz_full=8-15,24-31" "vfio_iommu_type1.allow_unsafe_interrupts=1" "pcie_acs_override=downstream,multifunction" /*"pci-stub.ids=1002:744c"*/ "nox2apic" "nvme_core.default_ps_max_latency_us=0" "nvme_core.io_timeout=255" "nvme_core.max_retries=10" "nvme_core.shutdown_timeout=10" "amd_iommu=on" "iommu=pt" ] ++ video; boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_zen;
boot.kernelModules = [ "pci-stub" "amdgpu" "i2c_dev" "kvm_amd" "vfio" "vfio_iommu_type1" "vfio-pci"];
boot.kernelParams = [
"rcu_nocbs=${materusArg.materusPC.vmCores}"
"nohz_full=${materusArg.materusPC.vmCores}"
"vfio_iommu_type1.allow_unsafe_interrupts=1"
"pcie_acs_override=downstream,multifunction"
#''vfio-pci.ids="1002:744c"''
"nox2apic"
"nvme_core.default_ps_max_latency_us=0"
"nvme_core.io_timeout=255"
"nvme_core.max_retries=10"
"nvme_core.shutdown_timeout=10"
"amd_iommu=on"
"amdgpu.ppfeaturemask=0xffffffff"
#"amdgpu.runpm=0"
"iommu=pt"
"psi=1"
"i915.force_probe=!56a6"
"xe.force_probe=56a6"
] ++ video;
boot.kernelModules = [ "pci-stub" "amdgpu" "i2c_dev" "kvm_amd" "vfio" "vfio_iommu_type1" "vfio-pci" "kvmfr" "xe" ];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options kvm_amd nested=1 avic=1 npt=1 sev=0 options kvm_amd nested=1 avic=1 npt=1 sev=0
options vfio_iommu_type1 allow_unsafe_interrupts=1 options vfio_iommu_type1 allow_unsafe_interrupts=1
options kvmfr static_size_mb=64
''; '';
boot.kernel.sysctl = { boot.kernel.sysctl = {
"vm.max_map_count" = 1000000; "vm.max_map_count" = 1000000;
"vm.swappiness" = 10; "vm.swappiness" = 10;
"net.ipv4.ip_forward"=1;
}; };
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "vfio-pci" "amdgpu" ];
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback kvmfr ];
boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" "exfat" "ext4" ]; boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" "exfat" "ext4" ];
@@ -8,7 +8,7 @@
]; ];
hardware.firmware = with pkgs; [ hardware.firmware = with pkgs; [
materusArg.pkgs.amdgpu-pro-libs.firmware.vcn materusArg.pkgs.amdgpu-pro-libs.firmware.vcn
#materusArg.pkgs.amdgpu-pro-libs.firmware materusArg.pkgs.amdgpu-pro-libs.firmware
linux-firmware linux-firmware
alsa-firmware alsa-firmware
sof-firmware sof-firmware
@@ -16,10 +16,10 @@
environment.variables = { environment.variables = {
DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 = "1"; DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 = "1";
VK_ICD_FILENAMES = "${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json:${pkgs.driversi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json"; #VK_ICD_FILENAMES = "${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json:${pkgs.driversi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json";
AMD_VULKAN_ICD = "RADV"; AMD_VULKAN_ICD = "RADV";
RADV_PERFTEST = "gpl,rt,sam"; RADV_PERFTEST = "gpl,rt,sam";
OCL_ICD_VENDORS = "${pkgs.rocmPackages.clr.icd}/etc/OpenCL/vendors/"; #OCL_ICD_VENDORS = "${pkgs.rocmPackages.clr.icd}/etc/OpenCL/vendors/";
}; };
hardware.cpu.amd.updateMicrocode = lib.mkForce true; hardware.cpu.amd.updateMicrocode = lib.mkForce true;
@@ -31,8 +31,11 @@
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [ hardware.opengl.extraPackages = with pkgs; [
vaapiVdpau vaapiVdpau
vpl-gpu-rt
intel-media-driver
libvdpau-va-gl libvdpau-va-gl
amdvlk amdvlk
vkbasalt
rocmPackages.clr.icd rocmPackages.clr.icd
rocmPackages.clr rocmPackages.clr
materusArg.pkgs.amdgpu-pro-libs.vulkan materusArg.pkgs.amdgpu-pro-libs.vulkan
@@ -40,16 +43,17 @@
]; ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
vaapiVdpau vaapiVdpau
vkbasalt
pkgs.driversi686Linux.amdvlk pkgs.driversi686Linux.amdvlk
materusArg.pkgs.i686Linux.amdgpu-pro-libs.vulkan materusArg.pkgs.i686Linux.amdgpu-pro-libs.vulkan
libvdpau-va-gl libvdpau-va-gl
]; ];
services.udev.extraRules = '' /*services.udev.extraRules = ''
#GPU bar size #GPU bar size
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource0_resize}="15" ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource0_resize}="15"
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource2_resize}="8" ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource2_resize}="8"
''; '';*/
#Trim #Trim
@@ -2,7 +2,7 @@
{ {
zramSwap = { zramSwap = {
enable = true; enable = true;
memoryPercent = 25; memoryPercent = 50;
}; };
swapDevices = [ swapDevices = [
@@ -1,96 +1,188 @@
{ pkgs, materusArg, lib, ... }:
{ {
pkgs,
materusArg,
lib,
config,
...
}:
{
imports = [
./plasma.nix
];
home.stateVersion = "23.05"; home.stateVersion = "23.05";
home.homeDirectory = "/home/materus"; home.homeDirectory = "/home/materus";
materus.profile.wezterm.enable = true;
programs.git.signing.signByDefault = true; programs.git.signing.signByDefault = true;
xdg.userDirs.enable = true; xdg.userDirs.enable = true;
xdg.portal.enable = true;
xdg.portal.xdgOpenUsePortal = true;
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
xdg.portal.configPackages = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
materus.profile = { materus.profile = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
nixpkgs.enable = lib.mkDefault false; nixpkgs.enable = lib.mkDefault false;
enableDesktop = lib.mkDefault true; enableDesktop = lib.mkDefault true;
enableTerminal = lib.mkDefault true; enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true; enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true; enableNixDevel = lib.mkDefault true;
editor.emacs.enable = true;
editor.code.fhs.enable = true; editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [ editor.code.fhs.packages = (
llvmpkgs.clang ps:
llvmpkgs.llvm with ps;
llvmpkgs.bintools let
llvmpkgs.lld llvmpkgs = llvmPackages_18;
llvmpkgs.lldb in
llvmpkgs.libllvm [
llvmpkgs.libllvm.dev llvmpkgs.clang
llvmpkgs.llvm
llvmpkgs.bintools
llvmpkgs.lld
llvmpkgs.lldb
llvmpkgs.libllvm
llvmpkgs.mlir
llvmpkgs.libllvm.dev
raylib fpc
gcc xmake
gdb raylib
nil gcc
nixfmt gdb
nixpkgs-fmt materusArg.unstable.nixd
cmake nixfmt-rfc-style
gnumake nixpkgs-fmt
ninja cmake
binutils gnumake
coreutils ninja
util-linux binutils
openssl coreutils
openssl.dev util-linux
pkg-config openssl
dotnet-sdk_8 openssl.dev
mono pkg-config
mold dotnet-sdk_8
python3 mono
lua mold
gtk4.dev python3
gtk4 lua
miniaudio gtk4.dev
SDL2.dev gtk4
SDL2 glib
freeglut.dev glib.dev
freeglut miniaudio
boost.dev SDL2.dev
boost SDL2
glew.dev freeglut.dev
libGL.dev freeglut
libGLU.dev boost.dev
vulkan-loader.dev boost
xorg.xorgproto glew.dev
xorg.libX11.dev libGL.dev
xorg.libXrandr.dev libGLU.dev
xorg.libXrender.dev vulkan-loader.dev
rustup vulkan-headers
freetype.dev xorg.xorgproto
xorg.libX11.dev
xorg.libXrandr.dev
xorg.libXrender.dev
rustup
freetype.dev
fpc fpc
openjdk21 gradle
bison bison
flex flex
ldc ldc
dmd dmd
dub dub
]); ]
);
editor.emacs.enable = false;
}; };
home.packages = [ home.packages = [
pkgs.papirus-icon-theme (pkgs.ffmpeg-full)
materusArg.pkgs.ffmpeg6-amf-full (materusArg.pkgs.polymc.wrap {
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; extraLibs = [ ]; }) extraJDKs = [ pkgs.graalvm-ce ];
extraLibs = [ ];
})
pkgs.git-crypt pkgs.git-crypt
pkgs.obsidian
]; ];
programs.obs-studio = { programs.obs-studio = {
enable = false; enable = true;
plugins = with pkgs.obs-studio-plugins; [ wlrobs obs-vaapi obs-vkcapture obs-gstreamer input-overlay obs-multi-rtmp obs-pipewire-audio-capture ]; plugins = with pkgs.obs-studio-plugins; [
package = materusArg.pkgs.obs-amf; wlrobs
input-overlay
obs-source-switcher
obs-tuna
obs-vaapi
obs-vkcapture
obs-gstreamer
obs-backgroundremoval
obs-multi-rtmp
obs-pipewire-audio-capture
];
}; };
home.file.".gradle/gradle.properties".text = ''
org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_17_HOME,JAVA_21_HOME
org.gradle.home=${pkgs.jdk21}
'';
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
xdg.desktopEntries.brave-browser =
let
env = lib.concatStringsSep " " [
];
script = pkgs.writeShellScript "brave" ''
${env} brave "$@"
'';
in
{
name = "Brave Web Browser";
genericName = "Przeglądarka WWW";
comment = "Skorzystaj z internetu";
exec = "${script} %U";
icon = "brave-browser";
terminal = false;
categories = [
"Application"
"Network"
"WebBrowser"
];
mimeType = [
"application/pdf"
"application/rdf+xml"
"application/rss+xml"
"application/xhtml+xml"
"application/xhtml_xml"
"application/xml"
"image/gif"
"image/jpeg"
"image/png"
"image/webp"
"text/html"
"text/xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/ipfs"
"x-scheme-handler/ipns"
];
actions.new-windows = {
exec = "${script}";
name = "Nowe okno";
};
actions.new-private-windows = {
exec = "${script} --incognito";
name = "Nowe okno incognito";
};
};
} }
@@ -0,0 +1,139 @@
{ pkgs, materusArg, ... }:
{
home.packages = [
pkgs.papirus-icon-theme
pkgs.nerd-fonts.hack
];
xdg.dataFile."konsole/materus-linux.keytab".source = ("${materusArg.cfg.path}" + "/extraFiles/config/plasma/materus-linux.keytab");
programs.konsole = {
enable = true;
profiles = {
materus = {
colorScheme = "Breeze";
font.name = "Hack Nerd Font";
extraConfig = {
Keyboard = {
KeyBindings="materus-linux";
};
Scrolling = {
HistoryMode = 2;
};
};
};
};
extraConfig = {
KonsoleWindow = {
RememberWindowSize = "false";
};
MainWindow = {
MenuBar = "Enabled";
};
"Desktop Entry" = {
DefaultProfile = "materus.profile";
};
};
};
programs.plasma = {
enable = true;
overrideConfig = false;
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
iconTheme = "Papirus-Dark";
};
shortcuts = {
"kwin"."Grid View" = "Meta+Alt+Tab";
"kwin"."Overview" = "Meta+Tab";
"services/org.kde.kcalc.desktop"."_launch" = [ ];
};
spectacle.shortcuts = {
captureActiveWindow = "Meta+Print";
captureCurrentMonitor = "Print";
captureEntireDesktop = "Shift+Print";
captureRectangularRegion = "Meta+S";
launchWithoutCapturing = "Meta+Shift+S";
launch = "Meta+Alt+S";
};
kwin = {
effects = {
wobblyWindows.enable = true;
};
};
input = {
keyboard = {
options = [ "caps:none" ];
};
};
kscreenlocker = {
autoLock = false;
};
panels = [
{
location = "left";
screen = 0;
widgets = [
{
name = "org.kde.plasma.kickerdash";
config = {
General = {
icon = "nix-snowflake-white";
customButtonImage="nix-snowflake-white";
alphaSort = true;
};
};
}
"org.kde.plasma.icontasks"
"org.kde.plasma.marginsseparator"
"org.kde.plasma.systemtray"
{
name = "org.kde.plasma.digitalclock";
config = {
Appearance = {
showDate = "false";
};
};
}
];
}
];
configFile = {
"kwinrc"."Effect-overview"."BorderActivate" = 9;
"klaunchrc"."BusyCursorSettings"."Timeout" = 1;
"klaunchrc"."FeedbackStyle"."TaskbarButton" = false;
"kcminputrc"."Libinput/9610/46/SINOWEALTH Wired Gaming Mouse"."PointerAccelerationProfile" = 1;
"kcminputrc"."Libinput/9610/47/SINOWEALTH 2.4G Wireless Receiver"."PointerAccelerationProfile" = 1;
"spectaclerc"."ImageSave"."imageFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
"spectaclerc"."VideoSave"."videoFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
"spectaclerc"."ImageSave"."preferredImageFormat" = "WEBP";
"spectaclerc"."ImageSave"."translatedScreenshotsFolder" = "Zrzuty ekranu";
"spectaclerc"."VideoSave"."translatedScreencastsFolder" = "Nagranie ekranu";
"dolphinrc"."General"."RememberOpenedTabs" = false;
"kwalletrc"."Wallet"."Enabled" = true;
};
dataFile = {
"dolphin/view_properties/global/.directory"."Settings"."HiddenFilesShown" = true;
};
resetFiles = [
"spectaclerc"
];
};
}
+40 -9
View File
@@ -4,19 +4,42 @@
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wireguard}" WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wireguard}"
''; '';
networking.firewall = {
logReversePathDrops = false;
# wireguard trips rpfilter up
extraCommands = ''
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN
'';
extraStopCommands = ''
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN || true
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN || true
'';
};
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
networking.hostName = "materusPC"; networking.hostName = "materusPC";
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
#networking.networkmanager.wifi.backend = "iwd"; #networking.networkmanager.wifi.backend = "iwd";
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 8080 9943 9944 ]; networking.firewall.allowedTCPPorts = [
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 6000 9943 9944 ]; 24800 5900 5357 4656 8080 9943 9944
#Fix warning 22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
networking.networkmanager.extraConfig = lib.mkDefault '' 25565 25570 8100 # Minecraft + BlueMap + Velocity
[connectivity] ];
uri=http://nmcheck.gnome.org/check_network_status.txt networking.firewall.allowedUDPPorts = [ (lib.strings.toInt materusArg.wireguard.port)
''; 24800 5900 3702 4656 6000 9943 9944
22000 21027 # Syncthing
17000 17001 # zomboid
24454 # Minecraft Voice Chat
];
networking.networkmanager.settings = {
connectivity = {
uri = "http://nmcheck.gnome.org/check_network_status.txt";
};
};
networking.networkmanager.ensureProfiles.environmentFiles = [ networking.networkmanager.ensureProfiles.environmentFiles = [
config.sops.templates."networkmanager.env".path config.sops.templates."networkmanager.env".path
@@ -33,10 +56,11 @@
}; };
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = { "wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}"; endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
allowed-ips = "${materusArg.ip-masks.wireguard.general};"; allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
persistent-keepalive = "20";
}; };
ipv4 = { ipv4 = {
address1 = "${materusArg.ips.wireguard.materusPC}/23"; address1 = "${materusArg.ips.wireguard.materusPC}/32";
dns = "${materusArg.ips.wireguard.valkyrie};"; dns = "${materusArg.ips.wireguard.valkyrie};";
method = "manual"; method = "manual";
never-default = "true"; never-default = "true";
@@ -48,4 +72,11 @@
proxy = { }; proxy = { };
}; };
}; };
services = {
syncthing = {
enable = true;
user = "materus";
dataDir = "/home/materus";
};
};
} }
@@ -1,10 +1,45 @@
{config, pkgs, materusArg, ...}:
{ {
environment.systemPackages = with pkgs; [ config,
gamescope pkgs,
materusArg,
...
}:
{
#services.jackett.enable = true;
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
];
programs.chromium.enable = true;
programs.chromium.enablePlasmaBrowserIntegration = true;
services.guix.enable = true;
environment.systemPackages = with pkgs; [
vivaldi
#(pkgs.lutris.override { extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; }) #(pkgs.lutris.override { extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; })
materusArg.pkgs.amdgpu-pro-libs.prefixes materusArg.pkgs.amdgpu-pro-libs.prefixes
(pkgs.bottles.override { extraPkgs = pkgs: [ pkgs.libsForQt5.breeze-qt5 pkgs.kdePackages.breeze-gtk pkgs.nss_latest ]; extraLibraries = pkgs: [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; }) (pkgs.bottles.override {
extraPkgs = pkgs: [
pkgs.libsForQt5.breeze-qt5
pkgs.kdePackages.breeze-gtk
pkgs.nss_latest
];
extraLibraries = pkgs: [
pkgs.samba
pkgs.jansson
pkgs.tdb
pkgs.libunwind
pkgs.libusb1
pkgs.gnutls
pkgs.gtk3
pkgs.pango
];
})
glibc glibc
glib glib
gtk3 gtk3
@@ -12,6 +47,8 @@
gsettings-desktop-schemas gsettings-desktop-schemas
kdePackages.dolphin kdePackages.dolphin
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
vlc
vkbasalt-cli
patchelf patchelf
killall killall
@@ -29,10 +66,14 @@
pciutils pciutils
aspell (aspellWithDicts (
aspellDicts.pl ds: with ds; [
aspellDicts.en en
aspellDicts.en-computers en-computers
en-science
pl
]
))
steamtinkerlaunch steamtinkerlaunch
distrobox distrobox
# WebP support # WebP support
@@ -69,8 +110,7 @@
nix-du nix-du
kdePackages.kate
kate
krusader krusader
wineWowPackages.stagingFull wineWowPackages.stagingFull
@@ -84,23 +124,24 @@
monkeysphere monkeysphere
gparted gparted
virt-viewer virt-viewer
inkscape inkscape
gimp gimp
git-crypt git-crypt
bubblewrap bubblewrap
bindfs bindfs
binutils binutils
materusArg.unstable.qbittorrent
mkvtoolnix
nicotine-plus
picard
opusTools
aegisub
audacity
]; ];
} }
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./apps.nix
./java.nix
./users.nix
./desktop
];
}
@@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./kde.nix
./sddm.nix
];
}
@@ -1,12 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
services.displayManager.defaultSession = "gnome";
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ]; services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
@@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
{
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
xdg.portal.xdgOpenUsePortal = true;
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
services.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enableQt5Integration = true;
#programs.gnupg.agent.pinentryPackage = lib.mkForce (pkgs.kwalletcli.overrideAttrs {meta.mainProgram = "pinentry-kwallet";});
#environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
environment.variables = {
# Old fix for black cursor on amdgpu, seems to work fine now
#KWIN_DRM_NO_AMS = "1";
#Fix for amdgpu crashes
KWIN_DRM_USE_MODIFIERS = "0";
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
QT_PLUGIN_PATH = [
"${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}"
"${pkgs.kdePackages.ffmpegthumbs}/${pkgs.qt6.qtbase.qtPluginPrefix}"
];
XCURSOR_THEME = "breeze_cursors";
};
environment.systemPackages = with pkgs; [
kdePackages.ark
kdePackages.kcalc
];
programs.kdeconnect.enable = true;
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin pkgs.vlc pkgs.vkbasalt-cli ];
programs.firefox = {
enable = true;
autoConfig = builtins.readFile(builtins.fetchurl {
url = "https://raw.githubusercontent.com/MrOtherGuy/fx-autoconfig/master/program/config.js";
sha256 = "1mx679fbc4d9x4bnqajqx5a95y1lfasvf90pbqkh9sm3ch945p40";
});
};
}
@@ -1,7 +1,19 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
westonSddm = let xcfg = config.services.xserver; in pkgs.writeText "weston.ini" plasma-materus = pkgs.writeScript "plasma-materus" ''
'' export KWIN_DRM_DEVICES="/dev/dri/by-path/pci-0000\:53\:00.0-card"
${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland
'';
westonSddm =
let
xcfg = config.services.xserver;
in
pkgs.writeText "weston.ini" ''
[core] [core]
xwayland=false xwayland=false
shell=fullscreen-shell.so shell=fullscreen-shell.so
@@ -21,7 +33,7 @@ let
mode=1920x1080@240 mode=1920x1080@240
[output] [output]
name=DP-2 name=DP-4
mode=off mode=off
[output] [output]
@@ -31,7 +43,8 @@ let
''; '';
in in
{ {
services.displayManager.defaultSession = "plasma"; services.displayManager.defaultSession = "plasma-materus";
services.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true; services.displayManager.sddm.wayland.enable = true;
services.displayManager.sddm.wayland.compositor = lib.mkForce "weston"; services.displayManager.sddm.wayland.compositor = lib.mkForce "weston";
@@ -40,6 +53,21 @@ in
"--shell=kiosk" "--shell=kiosk"
"-c ${westonSddm}" "-c ${westonSddm}"
]; ];
services.displayManager.sessionPackages = [
(
(pkgs.writeTextDir "share/wayland-sessions/plasma-materus.desktop" ''
[Desktop Entry]
Name=Plasma (Wayland Materus)
Comment=Plasma Desktop with KWIN_DRM_DEVICES env
Exec=${plasma-materus}
DesktopNames=KDE
Type=Application
'').overrideAttrs
(_: {
passthru.providedSessions = [ "plasma-materus" ];
})
)
];
services.displayManager.sddm.settings = { services.displayManager.sddm.settings = {
General = { General = {
@@ -50,24 +78,4 @@ in
CursorSize = "24"; CursorSize = "24";
}; };
}; };
services.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enableQt5Integration = true;
programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
environment.variables = {
# Old fix for black cursor on amdgpu, seems to work fine now
#KWIN_DRM_NO_AMS = "1";
#Fix for amdgpu crashes
KWIN_DRM_USE_MODIFIERS = "0";
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
XCURSOR_THEME = "breeze_cursors";
};
environment.systemPackages = with pkgs; [
kdePackages.ark
];
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin ];
} }
@@ -0,0 +1,14 @@
{ pkgs, ... }:
{
programs = {
java.enable = true;
java.package = pkgs.jdk;
java.binfmt = true;
};
environment.variables = {
JAVA_8_HOME = "${pkgs.jdk8}/lib/openjdk/";
JAVA_17_HOME = "${pkgs.jdk17}/lib/openjdk/";
JAVA_21_HOME = "${pkgs.jdk21}/lib/openjdk/";
};
}
@@ -0,0 +1,27 @@
{ pkgs, materusArg, config, ... }:
{
users.users.materus = {
isNormalUser = true;
extraGroups = [
"audio"
"video"
"render"
"pipewire"
"wheel"
"networkmanager"
"input"
"kvm"
"libvirt-qemu"
"libvirt"
"libvirtd"
"podman"
"scanner"
"lp"
];
shell = pkgs.zsh;
description = "Mateusz Słodkowicz";
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
#hashedPasswordFile = config.sops.secrets."users/materus".path;
};
}
@@ -10,7 +10,7 @@
sops.gnupg.sshKeyPaths = [ ]; sops.gnupg.sshKeyPaths = [ ];
sops.age.sshKeyPaths = [ "/materus/root/ssh_host_ed25519_key" ]; sops.age.sshKeyPaths = [ "/materus/root/ssh_host_ed25519_key" ];
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml"; sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
sops.secrets."users/materus" = { neededForUsers = true; }; #sops.secrets."users/materus" = { neededForUsers = true; };
sops.secrets.wireguard = { }; sops.secrets.wireguard = { };
services.openssh.hostKeys = [ services.openssh.hostKeys = [
+84 -74
View File
@@ -1,41 +1,47 @@
{ config, pkgs, materusArg, ... }: {
config,
pkgs,
materusArg,
...
}:
{ {
virtualisation.lxc.enable = true;
virtualisation.lxc.lxcfs.enable = true;
virtualisation.lxd.enable = true;
programs.gamemode.enable = true; programs.gamemode.enable = true;
programs.corectrl.enable = true;
services.teamviewer.enable = true; services.teamviewer.enable = true;
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
# Gamepad
services.udev = {
packages = with pkgs; [
game-devices-udev-rules
];
};
hardware.uinput.enable = true;
hardware.steam-hardware.enable = true;
nix.package = pkgs.nixVersions.nix_2_28;
programs.steam = {
enable = false;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
services.flatpak.enable = true; services.flatpak.enable = true;
services.gvfs.enable = true; services.gvfs.enable = true;
services.xserver.xkb.layout = "pl"; services.xserver.xkb.layout = "pl";
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ]; #services.xserver.videoDrivers = [ "amdgpu" "intel" ];
services.dbus.enable = true; services.dbus.enable = true;
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [ pkgs.gcr ];
services.xserver.displayManager.startx.enable = false; services.xserver.displayManager.startx.enable = false;
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
xdg.portal.xdgOpenUsePortal = true;
services.xserver.exportConfiguration = true; services.xserver.exportConfiguration = true;
services.xserver.extraConfig = pkgs.lib.mkDefault '' services.xserver.extraConfig = pkgs.lib.mkDefault ''
Section "OutputClass" Section "OutputClass"
@@ -50,47 +56,9 @@
''; '';
services.printing.enable = true; services.printing.enable = true;
services.libinput.enable = true;
services.xserver.libinput.enable = true;
virtualisation.waydroid.enable = false;
virtualisation.podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
users.users.materus = {
isNormalUser = true;
extraGroups = [
"audio"
"video"
"render"
"pipewire"
"wheel"
"networkmanager"
"input"
"kvm"
"libvirt-qemu"
"libvirt"
"libvirtd"
"podman"
"lxd"
];
shell = pkgs.zsh;
description = "Mateusz Słodkowicz";
};
environment.sessionVariables = { environment.sessionVariables = {
XDG_CACHE_HOME = "\${HOME}/.cache"; XDG_CACHE_HOME = "\${HOME}/.cache";
@@ -103,11 +71,8 @@
XMODIFIERS = "@im=fcitx"; XMODIFIERS = "@im=fcitx";
SDL_IM_MODULE = "fcitx"; SDL_IM_MODULE = "fcitx";
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";
PATH = [ PATH = [ "\${XDG_BIN_HOME}" ];
"\${XDG_BIN_HOME}"
];
}; };
environment.shellInit = '' environment.shellInit = ''
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi; if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
@@ -115,18 +80,50 @@
''; '';
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [ pkgs.kdePackages.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.fcitx5-gtk pkgs.kdePackages.fcitx5-qt ]; i18n.inputMethod.fcitx5.addons = [
pkgs.kdePackages.fcitx5-configtool
pkgs.fcitx5-lua
pkgs.fcitx5-mozc
pkgs.fcitx5-gtk
pkgs.kdePackages.fcitx5-qt
];
services.pcscd.enable = true; services.pcscd.enable = true;
services.samba-wsdd.enable = true;
services.samba-wsdd.enable = true;
services.samba-wsdd.openFirewall = true;
services.samba = { services.samba = {
enable = true; enable = true;
package = pkgs.sambaFull; package = pkgs.sambaFull;
}; securityType = "user";
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = "smbmaterus";
"netbios name " = "smbmaterus";
"security" = "user";
"hosts allow" = "192.168.122. 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
"allow insecure wide links" = "yes";
};
windows = {
"path" = "/materus/data/VM/windows_shared";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "materus";
"force group" = "users";
"follow symlinks" = "yes";
"wide links" = "yes";
};
};
};
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
@@ -136,23 +133,36 @@
}; };
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "no";
services.openssh.settings.PasswordAuthentication = false;
services.openssh.openFirewall = true;
services.sunshine = {
enable = true;
capSysAdmin = true;
openFirewall = true;
autoStart = false;
};
environment.enableAllTerminfo = true; environment.enableAllTerminfo = true;
environment.pathsToLink = [ "/share/zsh" "/share/bash-completion" "/share/fish" ]; environment.pathsToLink = [
environment.shells = with pkgs; [ zsh bashInteractive fish ]; "/share/zsh"
"/share/bash-completion"
"/share/fish"
];
environment.shells = with pkgs; [
zsh
bashInteractive
fish
];
programs = { programs = {
fish.enable = true; fish.enable = true;
java.enable = true;
java.package = pkgs.graalvm-ce;
java.binfmt = true;
command-not-found.enable = false; command-not-found.enable = false;
dconf.enable = true; dconf.enable = true;
}; };
materus.profile.browser.enable = true; materus.profile.browser.enable = true;
services.davfs2.enable = true; services.davfs2.enable = true;
} }
+10 -2
View File
@@ -1,9 +1,16 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ imports = [
./win10 ./win-vfio
]; ];
materus.materusArg.materusPC = {
allCores = "0-31";
allCoresMask = "ffffffff";
hostCores = "0-7,16-23";
hostCoresMask = "00ff00ff";
vmCores = "8-15,24-31";
vmCoresMask = "ff00ff00";
};
systemd.mounts = [ systemd.mounts = [
{ {
where = "/dev/hugepages"; where = "/dev/hugepages";
@@ -69,6 +76,7 @@
bindfs bindfs
qemu-utils qemu-utils
psmisc psmisc
procps
]; ];
}; };
in in
@@ -0,0 +1,187 @@
{ config, pkgs, materusArg, ... }:
let
bar0_guest="15";
bar2_guest="8";
bar0_host="15";
bar2_host="8";
VM_UUID = "ad2632db-0da0-4204-98b3-0592a185ebd0";
startedHook = ''
# Renice QEMU process and threads
QEMU_PID=$(ps aux | grep qemu-system-x86_64 | grep "${VM_UUID}" | tr -s ' ' | cut -d " " -f 2)
for pid in $(ls /proc/$QEMU_PID/task); do
renice -n "-15" -p "$pid";
done
renice -n "-10" -p "$QEMU_PID";
'';
startHook = /*''
# Debugging
exec 19>/home/materus/startlogfile
BASH_XTRACEFD=19
set -x
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>/home/materus/startlogfile.out 2>&1
''
+*/
''
# Service for my shared qcow2 drive, it's mounted to host when VM not running
systemctl stop windows-share-mount.service
systemctl stop systemd-nspawn@archlinux
# Remember non symlink path to card and render, symlink might get deleted
DRI_RENDER=$(readlink -f /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render)
DRI_CARD=$(readlink -f /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card)
# Send "remove" event so wayland compositors can release gpu, sleep because it doesnt work instantly
echo remove > /sys/bus/pci/devices/$VIRSH_GPU_VIDEO/drm/card*/uevent
sleep 3s
# Remove all permissions from DRI nodes so no new processes will attach to it, kill all processes currently using it
chmod 0 $DRI_RENDER
chmod 0 $DRI_CARD
fuser -k $DRI_RENDER
fuser -k $DRI_CARD
# Seems to fix reset bug for 7900 XTX
echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
# Unbind GPU from drivers
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
# Optionally resize bars, it's pointless for me since it's full size here but keeping just in case
echo "${bar0_guest}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "${bar2_guest}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
# Compact memory if possible to make continuous space for transparent huge pages
sync
echo "3" > /proc/sys/vm/drop_caches
sync
echo "1" > /proc/sys/vm/compact_memory
# Set host cgroups and workqueue to use defined cpu cores (I'm using first half of cpu on host, second half on guest)
systemctl set-property --runtime -- user.slice AllowedCPUs=${materusArg.materusPC.hostCores}
systemctl set-property --runtime -- system.slice AllowedCPUs=${materusArg.materusPC.hostCores}
systemctl set-property --runtime -- init.scope AllowedCPUs=${materusArg.materusPC.hostCores}
echo "${materusArg.materusPC.hostCoresMask}" > /sys/bus/workqueue/devices/writeback/cpumask
# Set performance governor if not set
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Reduce interval of memory statistics to 120s from default 1s
sysctl vm.stat_interval=120
'';
stopHook = ''
# Debugging
# exec 19>/home/materus/stoplogfile
# BASH_XTRACEFD=19
# set -x
# exec 3>&1 4>&2
# trap 'exec 2>&4 1>&3' 0 1 2 3
# exec 1>/home/materus/stoplogfile.out 2>&1
# echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
sysctl vm.stat_interval=1
sleep 1s
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
echo "${bar0_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "${bar2_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
systemctl start windows-share-mount.service
systemctl set-property --runtime -- user.slice AllowedCPUs=${materusArg.materusPC.allCores}
systemctl set-property --runtime -- system.slice AllowedCPUs=${materusArg.materusPC.allCores}
systemctl set-property --runtime -- init.scope AllowedCPUs=${materusArg.materusPC.allCores}
echo "${materusArg.materusPC.allCoresMask}" > /sys/bus/workqueue/devices/writeback/cpumask
'';
in
{
virtualisation.libvirtd.qemu.verbatimConfig = ''
cgroup_device_acl = [
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
"/dev/kvmfr0"
]
'';
virtualisation.libvirtd.hooks.qemu = {
"windows-vfio" = pkgs.writeShellScript "windows.sh" ''
VIRSH_GPU_VIDEO="0000:03:00.0"
VIRSH_GPU_AUDIO="0000:03:00.1"
VIRSH_USB1="0000:10:00.0"
if [ ''$1 = "windows-vfio" ]; then
if [ ''$2 = "prepare" ] && [ ''$3 = "begin" ]; then
${startHook}
fi
#if [ ''$2 = "started" ] && [ ''$3 = "begin" ]; then
${startedHook}
#fi
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
${stopHook}
fi
fi
'';
};
systemd.services.windows-share-mount = {
wantedBy = [ "multi-user.target" ];
path = [ config.virtualisation.libvirtd.qemu.package pkgs.util-linux pkgs.kmod pkgs.coreutils ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
script = ''
modprobe nbd max_part=16
sleep 1
qemu-nbd -c /dev/nbd10 /materus/data/VM/data.qcow2 --discard=unmap
sleep 1
mount /dev/nbd10p1 /materus/data/Windows -o uid=1000,gid=100
'';
preStop = ''
umount -r /dev/nbd10p1
qemu-nbd -d /dev/nbd10
'';
};
}
@@ -1,134 +0,0 @@
{ config, pkgs, ... }:
let
startHook = /*''
# Debugging
exec 19>/home/materus/startlogfile
BASH_XTRACEFD=19
set -x
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>/home/materus/startlogfile.out 2>&1
''
+*/
''
# Make sure nothing renders on gpu to prevent "sysfs: cannot create duplicate filename" after rebinding to amdgpu
chmod 0 /dev/dri/renderD128
fuser -k /dev/dri/renderD128
# Seems to fix reset bug for 7900 XTX
echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
systemctl stop mountWin10Share.service
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
sleep 1s
echo "10" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
echo "3" > /proc/sys/vm/drop_caches
echo "1" > /proc/sys/vm/compact_memory
#echo "8192" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
systemctl set-property --runtime -- user.slice AllowedCPUs=0-7,16-23
systemctl set-property --runtime -- system.slice AllowedCPUs=0-7,16-23
systemctl set-property --runtime -- init.scope AllowedCPUs=0-7,16-23
'';
stopHook = ''
# Debugging
# exec 19>/home/materus/stoplogfile
# BASH_XTRACEFD=19
# set -x
# exec 3>&1 4>&2
# trap 'exec 2>&4 1>&3' 0 1 2 3
# exec 1>/home/materus/stoplogfile.out 2>&1
sleep 1s
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
echo "15" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
#echo "0" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
systemctl start mountWin10Share.service
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
'';
in
{
virtualisation.libvirtd.hooks.qemu = {
"win10" = pkgs.writeShellScript "win10.sh" ''
VIRSH_GPU_VIDEO="0000:03:00.0"
VIRSH_GPU_AUDIO="0000:03:00.1"
VIRSH_USB1="0000:10:00.0"
if [ ''$1 = "win10" ] || [ ''$1 = "win11" ]; then
if [ ''$2 = "prepare" ] && [ ''$3 = "begin" ]; then
${startHook}
fi
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
${stopHook}
fi
fi
'';
};
systemd.services.mountWin10Share = {
wantedBy = [ "multi-user.target" ];
path = [ config.virtualisation.libvirtd.qemu.package pkgs.util-linux pkgs.kmod pkgs.coreutils ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
script = ''
modprobe nbd max_part=16
sleep 1
qemu-nbd -c /dev/nbd0 /materus/data/VM/data.qcow2 --cache=unsafe --discard=unmap
sleep 1
mount /dev/nbd0p1 /materus/data/Windows -o uid=1000,gid=100
'';
preStop = ''
umount /materus/data/Windows
qemu-nbd -d /dev/nbd0
'';
};
}
+6 -17
View File
@@ -64,7 +64,7 @@
# hardware.pulseaudio.enable = true; # hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.materus = { users.users.materus = {
@@ -142,6 +142,11 @@
}; };
virtualisation.podman.autoPrune.enable = true;
virtualisation.podman.autoPrune.dates = "daily";
virtualisation.oci-containers.backend = "podman";
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
security.acme.defaults.email = "materus+acme@podkos.pl"; security.acme.defaults.email = "materus+acme@podkos.pl";
security.acme.defaults.credentialsFile = config.sops.secrets.certs.path; security.acme.defaults.credentialsFile = config.sops.secrets.certs.path;
@@ -160,21 +165,5 @@
dnsProvider = "ovh"; dnsProvider = "ovh";
}; };
security.acme.certs."podkos.xyz" = {
domain = "podkos.xyz";
group = "nginx";
extraDomainNames = [ "*.podkos.xyz" ];
dnsProvider = "ovh";
};
security.acme.certs."${materusArg.waffentrager.samba.domain}" = {
domain = materusArg.waffentrager.samba.domain;
extraDomainNames = [
"${materusArg.waffentrager.samba.netbiosName}.${materusArg.waffentrager.samba.domain}"
];
dnsProvider = "ovh";
};
} }
@@ -11,7 +11,7 @@
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ]; boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; }; boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; "net.ipv6.conf.all.forwarding" = 1; };
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
@@ -5,7 +5,7 @@ spotify-client-secret: ENC[AES256_GCM,data:TnR+zLLklTfzMdR4woaZWuMVJQ9VIYsFM588G
youtube-api: ENC[AES256_GCM,data:qmpFlFvudS9rXQfN+Th/UrPWCW0mg5GkpMucS/01AmOnlChqtojC,iv:q3bKwI2I6BNa3L9ezKCE1fWT/vZLiJ8uzug1z2z+TWA=,tag:gKG3HTz8jp2LAFh8e8O6sg==,type:str] youtube-api: ENC[AES256_GCM,data:qmpFlFvudS9rXQfN+Th/UrPWCW0mg5GkpMucS/01AmOnlChqtojC,iv:q3bKwI2I6BNa3L9ezKCE1fWT/vZLiJ8uzug1z2z+TWA=,tag:gKG3HTz8jp2LAFh8e8O6sg==,type:str]
steamladder-api: ENC[AES256_GCM,data:m30o5atqugwqn/WbXGkUq5GvqiIKQT0kSRQCtHc1Gxk/dC3YcbDvMw==,iv:duLKl1NvysD0XMaUOkl/6nclMQB6seXcQYkGMrm7K7Y=,tag:9dw+UH10uAdca5fVdlw1Mg==,type:str] steamladder-api: ENC[AES256_GCM,data:m30o5atqugwqn/WbXGkUq5GvqiIKQT0kSRQCtHc1Gxk/dC3YcbDvMw==,iv:duLKl1NvysD0XMaUOkl/6nclMQB6seXcQYkGMrm7K7Y=,tag:9dw+UH10uAdca5fVdlw1Mg==,type:str]
webarchive-accesskey: ENC[AES256_GCM,data:jdKlHsZq2Dkk1BcBfUVv5g==,iv:BXCgPb/2W57PYXxRktInz1LxSEwlw6m3xnQU4TOPMeY=,tag:kK4+InaH7K4D4n1hyGaR+w==,type:str] webarchive-accesskey: ENC[AES256_GCM,data:jdKlHsZq2Dkk1BcBfUVv5g==,iv:BXCgPb/2W57PYXxRktInz1LxSEwlw6m3xnQU4TOPMeY=,tag:kK4+InaH7K4D4n1hyGaR+w==,type:str]
webarchive-secretkey: ENC[AES256_GCM,data:nuA9G5dNtrNfbcx0G/GUTg==,iv:RRuTm4kZr5dNjBt9Zvk/NVefHCZYODmRvWAqZizKGJY=,tag:J2V0Q3BzXNWifVVvAkwYyg==,type:str] webarchive-secretkey: ENC[AES256_GCM,data:t7lZ1aA72BrBxaE+jXmE3w==,iv:A8PF/MyRTIluqEzzt4uCw7eNCYDXAt4iB29PSrwlVyY=,tag:6HbtcrFeFcpagjzPXOANzA==,type:str]
certs: ENC[AES256_GCM,data:ttmSNTTx51a3L2HTC8RnSphDLHO2OSyIgXQ0YpZGySTdu69mgEyhaiSi+IAXg/1AHKRjpFJgE4fhsLAiW78pNYb+Zg7aDL47YtABO99sTZrZnBxZo6k6itpZ3oClDch2ZALzoXChLroc0tUbZKwsfOwGe3pw9lOJZJT34AhV+BVoXDDLQcpQoxz23Baa8oxklecT6wpJ1u1nW+aAHw33gm41Vw==,iv:b0aNZwaRKBg+ipe5+19BowyFbCjZt52S738om6emYGo=,tag:lUqtcc4vVWKx/fnc19vj7A==,type:str] certs: ENC[AES256_GCM,data:ttmSNTTx51a3L2HTC8RnSphDLHO2OSyIgXQ0YpZGySTdu69mgEyhaiSi+IAXg/1AHKRjpFJgE4fhsLAiW78pNYb+Zg7aDL47YtABO99sTZrZnBxZo6k6itpZ3oClDch2ZALzoXChLroc0tUbZKwsfOwGe3pw9lOJZJT34AhV+BVoXDDLQcpQoxz23Baa8oxklecT6wpJ1u1nW+aAHw33gm41Vw==,iv:b0aNZwaRKBg+ipe5+19BowyFbCjZt52S738om6emYGo=,tag:lUqtcc4vVWKx/fnc19vj7A==,type:str]
sops: sops:
kms: [] kms: []
@@ -22,8 +22,8 @@ sops:
d2dMUUh1RDB3UnpEdFJsNHpQRXFWemMKc41dlOapTsvH91QLNhdPbrzerPFakOiX d2dMUUh1RDB3UnpEdFJsNHpQRXFWemMKc41dlOapTsvH91QLNhdPbrzerPFakOiX
J/uoZDMIhsmQxgQM7Fqxr05NywhI/ZjOtJS2bayp73O57xjjMYcyNQ== J/uoZDMIhsmQxgQM7Fqxr05NywhI/ZjOtJS2bayp73O57xjjMYcyNQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-05T22:42:16Z" lastmodified: "2024-11-18T09:01:39Z"
mac: ENC[AES256_GCM,data:KSRGzHipb58uNYaRYXAy3y+D9cBG53RGxZpNrx2gy+CHbGtkUW1SWc4PPrBwBhb6+TN0vb1zHuOB4HK4Bys/jqmvGgVkO2VKj15MTFMpF5n6w0blFM7d5bCDydHAhvXEZA/PFWq97DTI1Zxb+N/HWJlefKCzYOHHWj7i4leKNjk=,iv:88Ekp0sjEo5UTBLUyYSrkP+MbIFcCmegclJIK3+0jOQ=,tag:H/ESeQhC1PEF00RiDnamyw==,type:str] mac: ENC[AES256_GCM,data:CVsqff1qCcxyQ0e78ewottYKgqA2rG3j1m8X0Sb8If3qibAiBMMblc8T0doB+Fg4dVhPpbJSZdCx4JiV7sHopv2wNdguXd6Xe0L8iJqWtBeHTGTxSLvJ8UIHknak9c+JeQzZz8jAkbHYUXsc7VyeJaXoQptosz1BbE74D48Xjrg=,iv:0e+etjwabJx7PXgDUoh41Ha3aziQxBlH6QJZGG02ME0=,tag:oQIf503tmFlPoLE5d8Y24w==,type:str]
pgp: pgp:
- created_at: "2024-03-21T22:55:36Z" - created_at: "2024-03-21T22:55:36Z"
enc: |- enc: |-
+20 -20
View File
@@ -1,38 +1,38 @@
{ config, pkgs, lib, materusArg, ... }:
{ {
options.valkyrieService.dcbot.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable dcbot"; config,
pkgs,
lib,
materusArg,
...
}:
{
options.valkyrieService.dcbot.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable muse bot";
config = config =
let let
cfg = config.valkyrieService.dcbot; cfg = config.valkyrieService.dcbot;
in in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
sops.templates."dcbot.env".content = '' sops.templates."muse.env".content = ''
TOKEN=${config.sops.placeholder.discord-token} CACHE_LIMIT=512MB
MAX_PLAYLIST_SIZE=100 BOT_STATUS=online
PRUNING=false BOT_ACTIVITY_TYPE=LISTENING
LOCALE=pl BOT_ACTIVITY=Coś
DEFAULT_VOLUME=100 DISCORD_TOKEN=${config.sops.placeholder.discord-token}
STAY_TIME=30 YOUTUBE_API_KEY=${config.sops.placeholder.youtube-api}
SPOTIFY_CLIENT_ID=${config.sops.placeholder.spotify-client-id}
SPOTIFY_CLIENT_SECRET=${config.sops.placeholder.spotify-client-secret}
''; '';
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/muse 0776 root root -" "d /var/lib/muse 0776 root root -"
]; ];
virtualisation.oci-containers.containers.dcbot = { virtualisation.oci-containers.containers.dcbot = {
image = "eritislami/evobot:latest"; image = "ghcr.io/museofficial/muse:latest";
volumes = [ volumes = [ "/var/lib/muse:/data" ];
]; environmentFiles = [ config.sops.templates."muse.env".path ];
environmentFiles = [
config.sops.templates."dcbot.env".path
];
}; };
}; };
} }
@@ -10,7 +10,7 @@
services.adguardhome.enable = true; services.adguardhome.enable = true;
valkyrieService.pihole.enable = false; valkyrieService.pihole.enable = false;
valkyrieService.pleroma.enable = true; valkyrieService.pleroma.enable = false;
valkyrieService.dcbot.enable = true; valkyrieService.dcbot.enable = true;
valkyrieService.secureyoursoul.enable = true; valkyrieService.secureyoursoul.enable = true;
@@ -50,7 +50,7 @@ in
"L+ /var/lib/pleroma/static/frontends/soapbox/${soapbox.version} 0766 pleroma pleroma - ${soapbox}" "L+ /var/lib/pleroma/static/frontends/soapbox/${soapbox.version} 0766 pleroma pleroma - ${soapbox}"
]; ];
services.nginx.virtualHosts."podkos.xyz" = { services.nginx.virtualHosts."podkos.xyz" = {
http2 = true; http2 = true;
useACMEHost = "podkos.xyz"; useACMEHost = "podkos.xyz";
forceSSL = true; forceSSL = true;
@@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`). # and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }: { config, pkgs, materusArg, ... }:
{ {
imports = imports =
@@ -10,7 +10,8 @@
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.firewall.allowedTCPPorts = [ 1900 ];
networking.firewall.allowedUDPPorts = [ 1900 7359];
materus.profile.nixpkgs.enable = true; materus.profile.nixpkgs.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
libraspberrypi libraspberrypi
@@ -27,7 +28,7 @@
gzip gzip
]; ];
sound.enable = false;
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
services.xserver.enable = false; services.xserver.enable = false;
networking.hostName = "waffentrager"; networking.hostName = "waffentrager";
@@ -38,9 +39,7 @@
users.users.materus = { users.users.materus = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl"
];
hashedPasswordFile = config.sops.secrets."users/materus".path; hashedPasswordFile = config.sops.secrets."users/materus".path;
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@@ -48,7 +47,7 @@
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" "repl-flake" "no-url-literals" ]; experimental-features = [ "nix-command" "flakes" "no-url-literals" ];
trusted-users = [ "root" "@wheel" ]; trusted-users = [ "root" "@wheel" ];
substituters = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
@@ -100,7 +99,7 @@
# hardware.pulseaudio.enable = true; # hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
# users.users.alice = { # users.users.alice = {
@@ -7,4 +7,12 @@
./secrets ./secrets
./services ./services
]; ];
virtualisation.podman.autoPrune.enable = true;
virtualisation.podman.autoPrune.dates = "daily";
virtualisation.podman.defaultNetwork.settings = {
default_subnet = "10.88.0.0/16";
};
virtualisation.oci-containers.backend = "podman";
} }
@@ -25,4 +25,14 @@
sops.secrets."users/materus" = { neededForUsers = true; }; sops.secrets."users/materus" = { neededForUsers = true; };
sops.secrets.elements = { }; sops.secrets.elements = { };
sops.secrets.nextcloud-adminpass = { }; sops.secrets.nextcloud-adminpass = { };
sops.secrets.maloja = { };
sops.secrets.maloja-api = { };
sops.secrets.spotify-client-id = {};
sops.secrets.spotify-client-secret = {};
sops.secrets.lastfm-user= {};
sops.secrets.lastfm-pass = {};
sops.secrets.lastfm-api = {};
sops.secrets.lastfm-secret = {};
sops.secrets.lastfm-token = {};
sops.secrets.listenbrainz-api = {};
} }
@@ -1,8 +1,23 @@
wireguard: ENC[AES256_GCM,data:QLngCAtEa6wfRRrZwywbARhsS1oGj9+hGTlC1QV6xnRmlZLorAoftGb8jTg=,iv:rNbE0tfJKTjo0pPwfw3oKxOZmSO9PGgW/xDo9zi8lCU=,tag:ZT4mfXaToiR6SjzOwSz4HA==,type:str] wireguard: ENC[AES256_GCM,data:fFQKj78HGLDmslDST+usAZxWDanHkUORBgIeOb7lQN4EPXdz6mQODHhn1ek=,iv:/BbbiFlfk8fMX4yFgVXuYkxitbRJqai5PHku2wZUFw4=,tag:cutoXkApljbB3bgSvaS1LQ==,type:str]
nextcloud-adminpass: ENC[AES256_GCM,data:5vohRPEcJJ8gIRro38O73ufSYYEp1DXpBgjCPdPnMcg=,iv:STh3k5wUwx3AfSDTPCXhuXbPb3d+Vi1cAaQN2a9eW1w=,tag:Ef/Z2Idvl6575Jvs2GDJ8A==,type:str] nextcloud-adminpass: ENC[AES256_GCM,data:5vohRPEcJJ8gIRro38O73ufSYYEp1DXpBgjCPdPnMcg=,iv:STh3k5wUwx3AfSDTPCXhuXbPb3d+Vi1cAaQN2a9eW1w=,tag:Ef/Z2Idvl6575Jvs2GDJ8A==,type:str]
jwt: ENC[AES256_GCM,data:1Qn7DaBZr8vEa8VZiv2BpwePPOBYRTdHEiDv0asUbvhCtfHvhG4mX5/plyRPlQok6FLEjEzKZTEdnvyyOtFEgA==,iv:kqfHkEr0jkKAro9gQup6CeopQnjfMGhEqbVL81wnDgc=,tag:gP/WACy5cOzzmQOh1v8wsQ==,type:str]
lldap-database: ENC[AES256_GCM,data:rNLS4WwvqRd3TFWDXaf8UmDTRsHZNPPS,iv:URV4Oz4ik2vHb03+Zh7ND+AbozSmoXpxENpvad4yvRI=,tag:6TbuMCnHwtTaG5mMWVN/mQ==,type:str]
authelia-storagekey: ENC[AES256_GCM,data:T5b5QWf6vlGHniuUic0tEFSJNNWaFbvi3emZOWEQz0AhNqDpxJZqO57KdjZ02NVMoxHN54c0ChWlHRCoAj234A==,iv:Rch5RQ0oblTTWXz0it7zZuYQNYhYMa0MsorAx9N4GV0=,tag:+GlwGnPXLukzDnW6BUf6Hg==,type:str]
authelia-database: ENC[AES256_GCM,data:XZYk4clzLaMb3/plELOnEoy4bwu/YSQg,iv:TGDKjLdcdmwEI12XDDNGHTgYnJxB+vV6RaomKU+jwpY=,tag:c/p7X4tzPWWiLvAL7DJmYg==,type:str]
ldap-master: ENC[AES256_GCM,data:jiinK8xzuKiTwB9k44okgj+sWWEgbeay,iv:Slvci3EBylIbP/I6NFIJTd3eitxVApXrORtnXY48eGg=,tag:OwaVYBNxNbQyIHrqOcUGhg==,type:str]
elements: ENC[AES256_GCM,data:Kh6ueReXpj9h5yQ3P0qY8X1ow4RRZD9zyXZLS6DUIIVuthgqgu9dPzBc7ojnz6nXoYTHt1I2LJJKLOGQYZC+iVxXOk+QADJMPwY4NCyeZ3prgvYMghlD,iv:WFA/UQ0XDFjpbgaDEacrBxkteLitXv3CJP54ANVSJHM=,tag:M+tTpTR0alvQxvUiP2MWlA==,type:str] elements: ENC[AES256_GCM,data:Kh6ueReXpj9h5yQ3P0qY8X1ow4RRZD9zyXZLS6DUIIVuthgqgu9dPzBc7ojnz6nXoYTHt1I2LJJKLOGQYZC+iVxXOk+QADJMPwY4NCyeZ3prgvYMghlD,iv:WFA/UQ0XDFjpbgaDEacrBxkteLitXv3CJP54ANVSJHM=,tag:M+tTpTR0alvQxvUiP2MWlA==,type:str]
users: users:
materus: ENC[AES256_GCM,data:MhPrMJ4/0oxEsFZDUKcYb3WMUWLI2ZbRTgnh1fQZG1Ly2J781jcUWtA8vVAdMBedNfWky0mDq5+KEQ/2fJNGU4IkTBvLdAqnWw==,iv:Dpl+M+x1weNIVkEsf3I/uXpG0SM6bDz+d9w7AYwn/MY=,tag:yGc1D2ODp6Te/QAztOj7yA==,type:str] materus: ENC[AES256_GCM,data:MhPrMJ4/0oxEsFZDUKcYb3WMUWLI2ZbRTgnh1fQZG1Ly2J781jcUWtA8vVAdMBedNfWky0mDq5+KEQ/2fJNGU4IkTBvLdAqnWw==,iv:Dpl+M+x1weNIVkEsf3I/uXpG0SM6bDz+d9w7AYwn/MY=,tag:yGc1D2ODp6Te/QAztOj7yA==,type:str]
maloja: ENC[AES256_GCM,data:V/WV0181zupKLiDtf5pinwYFFzL1hg+j,iv:KmGHapsD7thnmgkHwnTYFP/fvBS6dft9ZmmFN4AZEXs=,tag:uEmZaFkvBIQfu+3+0gQFlg==,type:str]
maloja-api: ENC[AES256_GCM,data:8vLC1a5pL8ldS7LWXqA/HOqtnyYFQk7/oisGgOOYH7TtnpBL93I2O3mWQIGCZUwWqMWFLvbOxIAnpoS0Qmg=,iv:swziHFypoh1YZkyEpDhqH2BhqUrWi0J63CqzORyY4s4=,tag:B9kkYHqyWP0KGPMD4S1I1A==,type:str]
spotify-client-id: ENC[AES256_GCM,data:2vC2E7rHBrZ2VHTGqYRJp1fWNWprDaYq4J6gJ7tTfF0=,iv:KQJgzUiD70N2vQeTO9r8ucC96xc9mSW9VlU2IGmKT7Y=,tag:kWR+1Hhb4yGK/AAqxMCd3A==,type:str]
spotify-client-secret: ENC[AES256_GCM,data:MKHo36AF1hHiXERltKdeMiuMhiGyyH8E3TqQfTf1tqc=,iv:/dPWUqjDtxZUOLZRx2lrHuU5Sf2fch2Fvnl+20KZ5dk=,tag:ZgsbCFBNHXSUuHbdSlrm4w==,type:str]
lastfm-user: ENC[AES256_GCM,data:o/FUjIiB9PcFTQ==,iv:UtovNmHISz9jUj+HFZPIduZj6h3ayjA5RyVlh11k8LM=,tag:bS3ReGR2BRcs3lcutt95UQ==,type:str]
lastfm-pass: ENC[AES256_GCM,data:g90kxN+HkSqN+B9XFH6AvbD376bHFPVI,iv:ZRxKxdKXIgKOm7TKKPLR1yLzTBjuCWQk4tTJN5d/0N4=,tag:soIJI75WAhoiXwVYlxkmQA==,type:str]
lastfm-api: ENC[AES256_GCM,data:UxGOqFEsjDb5zBXjm6G+66zlr5M0pk/NdTad3a5MBVE=,iv:3v9Lg0bjmlAhcSOjCW44CN7FezSdNG3KVVLrk1G9Ies=,tag:amgDr25PYiB+E7+D/fVEOw==,type:str]
lastfm-secret: ENC[AES256_GCM,data:z+XqodyRm9qnZwYwdON/KwAQ3E6hSI+mA0Nby0PQVT4=,iv:sY3Eqr7ZCx5lwjZaRFSghx/3OjuWlDQHQywgt7LpoIo=,tag:f7j1PFanHfLdDK+ASusCMA==,type:str]
lastfm-token: ENC[AES256_GCM,data:X877lDOXtou5OF0KbkvuJ4rhJ+3IY5XnyXlqq4LuSb8=,iv:f8t36ut6zlHvBuKGmJabyc9nHViQvUcqNvCVy0YIeB8=,tag:0h9Jm1h2cxegUXXk6UTz9Q==,type:str]
listenbrainz-api: ENC[AES256_GCM,data:eh03MPc5kn7CUDXXnEJTx4DXv9BpyabyRL+ENDFJw+kS66tV,iv:gerOaZ3gqM7ccLursFuCJrW1HcSjlTGk0wOLM8x4/2A=,tag:ZqxYNlgdqV0zRUUHm7VK3Q==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@@ -18,8 +33,8 @@ sops:
eFN4VVdUMkVjcTVWNFdLM0xtbExLdncK6LYUufWzIcd2jFyEeZDypo0xkJQ4z91F eFN4VVdUMkVjcTVWNFdLM0xtbExLdncK6LYUufWzIcd2jFyEeZDypo0xkJQ4z91F
ULyGxJLLWl6/inYXtxHNdxIIPfwW+5yppBAbXaOgvABi1E7tf1JZcA== ULyGxJLLWl6/inYXtxHNdxIIPfwW+5yppBAbXaOgvABi1E7tf1JZcA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-12T11:21:33Z" lastmodified: "2024-09-13T18:29:55Z"
mac: ENC[AES256_GCM,data:TbWjHvrJAB55AjFsbOK/IPb7v4wzqL2JGLvnNTr+ah/c2brdlq6DWeAF2+HA3FpLRt2a0MajwMTCsconoe8hW6Am/WO0FJBoYlneLAl/RlAv7BYfyorTD/Vyp9am7ml5T3f2pdYdsw1k/5RSn1ulUg43vSgi5es5Co8CtzC5hPE=,iv:+V48Azrr9yArwqNi3POYh7QaRMfUreCf7Bmv7kjV9qo=,tag:HDcMMCnyfVQRHTQJZB0R3Q==,type:str] mac: ENC[AES256_GCM,data:djOmSpNrZoFgUK4JlueCUpZtvHldVEsH90ASO+strLJ7wd1MEFdQaYyNonvTaUUzJQkUncyX3cXdO9Aoj9B6CPSKAuSKE7LRScCCXn+OezwUB5d5m/jLy4KmRhtADO0QHap4+/3fXzOupsHyZpVMIjwUw4tJ9MZMT8iMtbaHv2A=,iv:x4RaxRelUOyyTWpTLFRik92TibE+2mFctz/OYHvBoZA=,tag:S9dIzTc7rVBSFXUISuEDAQ==,type:str]
pgp: pgp:
- created_at: "2024-03-21T18:15:00Z" - created_at: "2024-03-21T18:15:00Z"
enc: |- enc: |-
@@ -0,0 +1,80 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.waffentragerService.auth.authelia.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable authelia";
config =
let
cfg = config.waffentragerService.auth.authelia;
port = 9091;
in
lib.mkIf cfg.enable {
sops.secrets."authelia-storagekey" = { owner = "authelia"; };
sops.secrets."authelia-database" = { owner = "authelia"; };
sops.secrets."ldap-master" = { owner = "authelia"; };
users.users.authelia = {
group = "lldap";
isSystemUser = true;
};
services.authelia.instances.main = {
enable = true;
user = "authelia";
environmentVariables = {
AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.sops.secrets."ldap-master".path;
AUTHELIA_STORAGE_POSTGRES_PASSWORD_FILE = config.sops.secrets."authelia-database".path;
};
secrets = {
jwtSecretFile = config.sops.secrets.jwt.path;
storageEncryptionKeyFile = config.sops.secrets."authelia-storagekey".path;
};
settings = {
access_control = {
default_policy = "one_factor";
};
authentication_backend = {
ldap.url = "ldap://127.0.0.1:3890";
ldap.implementation = "custom";
ldap.base_dn = config.services.lldap.settings.ldap_base_dn;
ldap.user = "CN=master,ou=people,DC=podkos,DC=pl";
ldap.additional_users_dn = "OU=people";
ldap.users_filter = "(&({username_attribute}={input})(objectClass=person))";
ldap.additional_groups_dn = "OU=groups";
ldap.groups_filter = "(&(member={dn})(objectClass=groupOfNames))";
};
storage = {
postgres.host = "/var/run/postgresql";
postgres.port = "5432";
postgres.database = "authelia";
postgres.username = "authelia";
};
notifier = {
disable_startup_check = false;
filesystem.filename = "/tmp/test_notification.txt";
};
session = {
name = "materus-session";
domain = "materus.pl";
};
default_redirection_url = "https://materus.pl";
server.port = port;
};
};
services.nginx.virtualHosts."gatekeeper.materus.pl" = {
forceSSL = true;
http3 = true;
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
};
}
@@ -1,63 +1,13 @@
{ config, materusArg, lib, pkgs, ... }: { config, materusArg, lib, pkgs, ... }:
let
cfg = config.waffentragerService.auth;
in
{ {
options.waffentragerService.auth.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable auth";
imports = imports =
[ [
./samba.nix ./lldap.nix
./authelia.nix
]; ];
config = lib.mkIf cfg.enable config =
{ {
waffentragerService.elements.enable = true; waffentragerService.auth.lldap.enable = true;
waffentragerService.nginx.enable = true; waffentragerService.auth.authelia.enable = true;
security.acme.defaults.credentialsFile = config.sops.secrets.certs.path;
systemd.services.resolvconf.enable = false;
networking.hosts = {
"${materusArg.ips.wireguard.waffentrager}" = [
materusArg.waffentrager.samba.domain
"${materusArg.waffentrager.samba.netbiosName}.${materusArg.waffentrager.samba.domain}"
materusArg.waffentrager.samba.netbiosName
];
};
environment.etc = {
resolvconf = {
text = ''
search ${materusArg.waffentrager.samba.domain}
nameserver ${materusArg.waffentrager.samba.dnsIp}
nameserver 9.9.9.9
'';
};
};
systemd.timers.rsync-acme = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1min";
OnUnitActiveSec = "1h";
Unit = "rsync-acme.service";
};
};
systemd.services.rsync-acme = {
description = "Sync acme for samba";
path = [ pkgs.rsync ];
requires = [ "var-lib-mnt_acme.mount" ];
after = [ "var-lib-mnt_acme.mount" ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = false;
script = ''
rsync -avzr --chmod=0600 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/key.pem ${materusArg.waffentrager.samba.servicePath}/tls/
rsync -avzr --chmod=0640 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/chain.pem ${materusArg.waffentrager.samba.servicePath}/tls/
rsync -avzr --chmod=0640 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/fullchain.pem ${materusArg.waffentrager.samba.servicePath}/tls/
'';
};
}; };
} }
@@ -0,0 +1,71 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.waffentragerService.auth.lldap.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable lldap";
config =
let
cfg = config.waffentragerService.auth.lldap;
in
lib.mkIf cfg.enable {
waffentragerService.elements.enable = true;
waffentragerService.nginx.enable = true;
services.nginx.virtualHosts."mamba.podkos.pl" = {
forceSSL = true;
http3 = true;
sslTrustedCertificate = "/var/lib/mnt_acme/mamba.podkos.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/mamba.podkos.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/mamba.podkos.pl/fullchain.pem";
locations."/" = {
proxyPass = "http://127.0.0.1:17170";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
allow ${materusArg.ip-masks.wireguard.main};
allow 192.168.100.0/24;
deny all;
'';
};
};
systemd.services.lldap = {
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
serviceConfig = {
DynamicUser = lib.mkForce false;
WorkingDirectory = lib.mkForce config.waffentragerService.elements.lldapDir;
};
};
users.groups.lldap = { };
users.users.lldap = {
group = "lldap";
isSystemUser = true;
};
sops.secrets.jwt = { owner = "lldap"; group = "lldap"; mode = "0440"; };
sops.secrets."lldap-database" = { owner = "lldap"; group = "lldap"; };
services.lldap.enable = true;
services.lldap.environmentFile = config.sops.templates."lldap.env".path;
sops.templates."lldap.env" = {
content = ''
LLDAP_JWT_SECRET_FILE="${config.sops.secrets.jwt.path}"
LLDAP_DATABASE_URL="postgres://lldap:${config.sops.placeholder."lldap-database"}@%2Fvar%2Frun%2Fpostgresql/lldap"
'';
owner = "lldap";
group = "lldap";
};
services.lldap.settings = {
ldap_base_dn = "dc=podkos,dc=pl";
ldap_host = "127.0.0.1";
http_url = "https://mamba.podkos.pl";
ldap_user_dn = "master";
ldap_user_email = "materus@podkos.pl";
ldap_port = 3890;
key_seed = materusArg.waffentrager.lldap.seed;
};
};
}
@@ -1,91 +0,0 @@
{ materusArg, config, lib, pkgs, ... }:
{
config =
let
cfg = config.waffentragerService.auth;
sambaCfg = config.services.samba;
servicePath = materusArg.waffentrager.samba.servicePath;
smbToString = x:
if builtins.typeOf x == "bool"
then lib.boolToString x
else builtins.toString x;
shareConfig = name:
let share = lib.getAttr name cfg.shares; in
"[${name}]\n " + (smbToString (
map
(key: "${key} = ${smbToString (lib.getAttr key share)}\n")
(lib.attrNames share)
));
in
lib.mkIf cfg.enable {
systemd.services.samba-smbd.enable = false;
systemd.services.samba = {
description = "Samba Service Daemon";
requires = [ "rsync-acme.service" ];
after = [ "rsync-acme.service" ];
requiredBy = [ "samba.target" ];
partOf = [ "samba.target" ];
serviceConfig = {
ExecStart = "${pkgs.samba4Full}/sbin/samba --foreground --no-process-group";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
LimitNOFILE = 16384;
PIDFile = "/run/samba.pid";
Type = "notify";
NotifyAccess = "all";
};
unitConfig.RequiresMountsFor = servicePath;
};
# https://wiki.samba.org/index.php/Samba_AD_DC_Port_Usage
networking.firewall.allowedTCPPorts = [ 139 445 389 88 53 464 636 3268];
networking.firewall.allowedUDPPorts = [ 135 137 138 389 88 53 123 464];
systemd.tmpfiles.rules = [
"d ${servicePath}/tls/ 0600 root 3000000 -"
"d ${servicePath}/private/ 0600 root 3000000 -"
"d ${servicePath}/lock/ 0600 root 3000000 -"
"d ${servicePath}/cache/ 0600 root 3000000 -"
];
services.samba = {
enable = true;
enableNmbd = false;
enableWinbindd = false;
package = pkgs.samba4Full;
configText = ''
# Global parameters
[global]
dns forwarder = ${materusArg.waffentrager.samba.dnsIp}
netbios name = ${materusArg.waffentrager.samba.netbiosName}
realm = ${lib.toUpper materusArg.waffentrager.samba.domain}
server role = active directory domain controller
workgroup = ${materusArg.waffentrager.samba.workgroup}
idmap_ldb:use rfc2307 = yes
ldap server require strong auth = yes
private dir = ${servicePath}/private
lock dir = ${servicePath}/lock
state directory = ${servicePath}/lock
cache directory = ${servicePath}/cache
tls enabled = yes
tls keyfile = ${servicePath}/tls/key.pem
tls certfile = ${servicePath}/tls/fullchain.pem
tls cafile = ${servicePath}/tls/chain.pem
[sysvol]
path = ${servicePath}/sysvol
read only = No
[netlogon]
path = ${servicePath}/sysvol/${materusArg.waffentrager.samba.domain}/scripts
read only = No
${sambaCfg.extraConfig}
${smbToString (map shareConfig (lib.attrNames sambaCfg.shares))}
'';
};
};
}
@@ -2,12 +2,17 @@
{ {
imports = imports =
[ [
./elements.nix ./storage/elements.nix
./postgresql.nix ./storage/mount-acme.nix
./mount-acme.nix ./storage/gitea.nix
./gitea.nix ./storage/nextcloud.nix
./storage/samba.nix
./storage/syncthing.nix
./multimedia/jellyfin.nix
./multimedia/scrobbling.nix
./monitoring.nix
./nginx.nix ./nginx.nix
./nextcloud.nix ./postgresql.nix
./auth ./auth
]; ];
waffentragerService.elements.enable = true; waffentragerService.elements.enable = true;
@@ -16,5 +21,10 @@
waffentragerService.gitea.enable = true; waffentragerService.gitea.enable = true;
waffentragerService.nginx.enable = true; waffentragerService.nginx.enable = true;
waffentragerService.nextcloud.enable = true; waffentragerService.nextcloud.enable = true;
waffentragerService.auth.enable = true; waffentragerService.samba.enable = true;
waffentragerService.jellyfin.enable = true;
waffentragerService.scrobbling.enable = true;
waffentragerService.syncthing.enable = true;
waffentragerService.monitoring.enable = true;
} }
@@ -0,0 +1,57 @@
{ materusArg, config, lib, ... }:
{
options.waffentragerService.monitoring.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable monitoring";
config =
let
cfg = config.waffentragerService.monitoring;
in
lib.mkIf cfg.enable {
services.grafana = {
dataDir = "${config.waffentragerService.elements.path}/services/grafana";
enable = true;
settings = {
server = {
http_addr = "127.0.0.1";
http_port = 3232;
domain = "watchman.materus.pl";
serve_from_sub_path = true;
};
};
};
services.prometheus = {
enable = true;
port = 3233;
globalConfig.scrape_interval = "30s";
stateDir = "elements/services/prometheus";
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
];
};
services.prometheus.exporters.node = {
enable = true;
port = 3234;
enabledCollectors = [ "systemd" ];
extraFlags = [ "--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi" ];
};
services.nginx.virtualHosts."watchman.materus.pl" = {
addSSL = true;
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
http2 = false;
http3 = true;
locations."/" = {
proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
recommendedProxySettings = true;
};
};
};
}
@@ -0,0 +1,150 @@
{ lib, config, materusArg, ... }:
{
options.waffentragerService.jellyfin.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable jellyfin";
config =
let
cfg = config.waffentragerService.jellyfin;
in
lib.mkIf cfg.enable {
services.jellyfin = rec {
enable = true;
openFirewall = true;
user = "materus";
group = "nextcloud";
dataDir = config.waffentragerService.elements.jellyfinDir;
cacheDir = "${dataDir}/cache";
};
/*
services.jellyseerr = {
enable = true;
openFirewall = true;
};*/
services.nginx = {
appendHttpConfig = ''
map $request_uri $h264Level { ~(h264-level=)(.+?)& $2; }
map $request_uri $h264Profile { ~(h264-profile=)(.+?)& $2; }
'';
proxyCachePath."jellyfin" = {
enable = true;
maxSize = "1g";
levels = "1:2";
keysZoneName = "jellyfin";
keysZoneSize = "100m";
inactive = "1d";
useTempPath = false;
};
virtualHosts = {
"noot.materus.pl" = {
extraConfig = ''
client_max_body_size 20M;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "0"; # Do NOT enable. This is obsolete/dangerous
add_header X-Content-Type-Options "nosniff";
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always;
'';
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
addSSL = true;
http2 = false;
http3 = true;
locations."~ /Items/(.*)/Images" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_cache jellyfin;
proxy_cache_revalidate on;
proxy_cache_lock on;
'';
};
locations."~ ^/web/htmlVideoPlayer-plugin.[0-9a-z]+.chunk.js$" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
proxy_set_header Accept-Encoding "";
sub_filter_types *;
sub_filter 'return u=30' 'return u=600';
sub_filter 'return u=6' 'return u=60';
sub_filter 'maxBufferLength:u' 'maxBufferLength:u,maxBufferSize:180000000';
sub_filter_once on;
'';
};
locations."~* ^/Videos/(.*)/(?!live)" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
# Set size of a slice (this amount will be always requested from the backend by nginx)
# Higher value means more latency, lower more overhead
# This size is independent of the size clients/browsers can request
slice 2m;
proxy_cache jellyfin;
proxy_cache_valid 200 206 301 302 30d;
proxy_ignore_headers Expires Cache-Control Set-Cookie X-Accel-Expires;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_connect_timeout 15s;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Transmit slice range to the backend
proxy_set_header Range $slice_range;
# This saves bandwidth between the proxy and jellyfin, as a file is only downloaded one time instead of multiple times when multiple clients want to at the same time
# The first client will trigger the download, the other clients will have to wait until the slice is cached
# Esp. practical during SyncPlay
proxy_cache_lock on;
proxy_cache_lock_age 60s;
proxy_cache_key "jellyvideo$uri?MediaSourceId=$arg_MediaSourceId&VideoCodec=$arg_VideoCodec&AudioCodec=$arg_AudioCodec&AudioStreamIndex=$arg_AudioStreamIndex&VideoBitrate=$arg_VideoBitrate&AudioBitrate=$arg_AudioBitrate&SubtitleMethod=$arg_SubtitleMethod&TranscodingMaxAudioChannels=$arg_TranscodingMaxAudioChannels&RequireAvc=$arg_RequireAvc&SegmentContainer=$arg_SegmentContainer&MinSegments=$arg_MinSegments&BreakOnNonKeyFrames=$arg_BreakOnNonKeyFrames&h264-profile=$h264Profile&h264-level=$h264Level&slicerange=$slice_range";
'';
};
locations."/" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
'';
};
locations."/socket" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
proxy_pass_request_headers on;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
'';
};
};
};
};
};
}
@@ -0,0 +1,240 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.waffentragerService.scrobbling.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable scrobbling";
config =
let
cfg = config.waffentragerService.scrobbling;
in
#### MALOJA --------------------------------------------------------------------
lib.mkIf cfg.enable {
sops.templates."maloja.env".content = ''
MALOJA_DATA_DIRECTORY=/data
MALOJA_DIRECTORY_STATE=/data/state
MALOJA_DIRECTORY_CACHE=/data/cache
MALOJA_SKIP_SETUP=yes
MALOJA_FORCE_PASSWORD=${config.sops.placeholder.maloja}
MALOJA_SPOTIFY_API_ID=${config.sops.placeholder.spotify-client-id}
MALOJA_SPOTIFY_API_SECRET=${config.sops.placeholder.spotify-client-secret}
MALOJA_NAME=Melody
MALOJA_WEEK_OFFSET=1
PUID=${builtins.toString config.users.users.scrobbler.uid}
PGID=${builtins.toString config.users.groups.scrobbler.gid}
TC=Europe/Warsaw
TIMEZONE=Europe/Warsaw
'';
services.nginx.virtualHosts = {
"melody.materus.pl" = {
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
addSSL = true;
http2 = false;
http3 = true;
locations."/" = {
proxyPass = "http://127.0.0.1:42010";
extraConfig = ''
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
};
virtualisation.oci-containers.containers.maloja =
{
image = "krateng/maloja:latest";
ports = [
"42010:42010"
];
volumes = [
"${config.waffentragerService.elements.malojaDir}:/data"
];
environmentFiles = [
config.sops.templates."maloja.env".path
];
};
systemd.services."${config.virtualisation.oci-containers.backend}-maloja" =
let
malojaCfg = pkgs.writeText "settings.ini" ''[MALOJA]
directory_config = /data
lastfm_api_key = False
audiodb_api_key = False
spotify_api_id = False
spotify_api_secret = False
delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"]
delimiters_informal = ["vs.","vs","&","with"]
delimiters_formal = ["; ",";"]
metadata_providers = ["spotify","deezer","lastfm","audiodb","musicbrainz"]
'';
in
{
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
preStart = ''cp --update=none ${malojaCfg} ${config.waffentragerService.elements.malojaDir}/settings.ini'';
};
#### MULTI SCROBBLER --------------------------------------------------------------------
users.groups.scrobbler = { gid = 3000; };
users.users.scrobbler = {
group = "scrobbler";
uid = 3000;
isSystemUser = true;
};
sops.templates."multi-scrobbler.env".content = ''
TC=Europe/Warsaw
CONFIG_DIR=/config
PUID=${builtins.toString config.users.users.scrobbler.uid}
PGID=${builtins.toString config.users.groups.scrobbler.gid}
'';
sops.templates."multi-scrobbler.json".owner = "scrobbler";
sops.templates."multi-scrobbler.json".group = "scrobbler";
sops.templates."multi-scrobbler.json".content = builtins.toJSON {
baseUrl = "https://scrobbler.materus.pl";
disableWeb = false;
debugMode = false;
sources = [
{
name = "materus-spotify";
enable = true;
clients = [ "maloja" ];
data = {
clientId = "${config.sops.placeholder.spotify-client-id}";
clientSecret = "${config.sops.placeholder.spotify-client-secret}";
redirectUri = "https://scrobbler.materus.pl/callback";
interval = 30;
};
type = "spotify";
}
{
name = "materus-jellyfin";
enable = true;
clients = [ "maloja" ];
data = {
users = [
"materus"
];
servers = [
"waffentrager"
];
};
options = {
logPayload = false;
logFilterFailure = "warn";
};
type = "jellyfin";
}
];
clients = [
{
name = "maloja";
enable = true;
data = {
url = "https://melody.materus.pl/";
apiKey = "${config.sops.placeholder.maloja-api}";
};
type = "maloja";
}
{
name = "materus-brainz";
enable = true;
configureAs = "client";
data = {
token = "${config.sops.placeholder.listenbrainz-api}";
username = "materus";
};
type = "listenbrainz";
}
{
name = "materus-lastfm";
enable = true;
configureAs = "client";
data = {
apiKey = "${config.sops.placeholder.lastfm-api}";
secret = "${config.sops.placeholder.lastfm-secret}";
redirectUri = "https://scrobbler.materus.pl/lastfm/callback";
};
type = "lastfm";
}
];
};
services.nginx.virtualHosts = {
"scrobbler.materus.pl" = {
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
addSSL = true;
http2 = false;
http3 = true;
locations."/" = {
proxyPass = "http://127.0.0.1:42011";
extraConfig = ''
allow ${materusArg.ip-masks.wireguard.main};
allow 192.168.100.0/24;
deny all;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
};
systemd.services."${config.virtualisation.oci-containers.backend}-multi-scrobbler" =
{
preStart = ''cp -f ${config.sops.templates."multi-scrobbler.json".path} ${config.waffentragerService.elements.malojaDir}/multi-scrobbler/config.json'';
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
};
virtualisation.oci-containers.containers.multi-scrobbler = {
image = "foxxmd/multi-scrobbler:latest";
ports = [
"127.0.0.1:42011:9078"
];
volumes = [
"${config.waffentragerService.elements.malojaDir}/multi-scrobbler:/config"
];
environmentFiles = [
config.sops.templates."multi-scrobbler.env".path
];
};
};
}
@@ -1,4 +1,4 @@
{ materusArg, config, lib, ... }: { materusArg, config, lib, pkgs, ... }:
{ {
options.waffentragerService.nginx.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable nginx"; options.waffentragerService.nginx.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable nginx";
@@ -14,6 +14,16 @@
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
package = pkgs.tengine;
virtualHosts."default" = {
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
forceSSL = true;
http2 = false;
default = true;
locations."/" = { extraConfig = ''deny all;''; };
};
}; };
systemd.services.nginx = { systemd.services.nginx = {
@@ -17,9 +17,9 @@
services.postgresql.authentication = pkgs.lib.mkOverride 10 '' services.postgresql.authentication = pkgs.lib.mkOverride 10 ''
local all all trust local all all trust
host all all 127.0.0.1/32 scram-sha-256 host all all 127.0.0.1/32 scram-sha-256
host all all ::1/128 scram-sha-256
''; '';
systemd.services.postgresql = { systemd.services.postgresql = {
partOf = [ "elements-mount.service" ];
requires = [ "elements-mount.service" ]; requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ]; after = [ "elements-mount.service" ];
}; };
@@ -5,6 +5,10 @@
options.waffentragerService.elements.uuid = lib.mkOption { default = "e32039c6-e98d-44b0-8e7d-120994bf7be1"; }; options.waffentragerService.elements.uuid = lib.mkOption { default = "e32039c6-e98d-44b0-8e7d-120994bf7be1"; };
options.waffentragerService.elements.postgresqlDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/postgresql"; }; options.waffentragerService.elements.postgresqlDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/postgresql"; };
options.waffentragerService.elements.nextcloudDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/nextcloud"; }; options.waffentragerService.elements.nextcloudDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/nextcloud"; };
options.waffentragerService.elements.lldapDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/lldap"; };
options.waffentragerService.elements.jellyfinDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/jellyfin"; };
options.waffentragerService.elements.malojaDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/maloja"; };
config = config =
let let
cfg = config.waffentragerService.elements; cfg = config.waffentragerService.elements;
@@ -21,12 +25,6 @@
mkdir -p ${cfg.path} mkdir -p ${cfg.path}
cryptsetup luksOpen /dev/disk/by-uuid/${cfg.uuid} elements -d ${config.sops.secrets.elements.path} cryptsetup luksOpen /dev/disk/by-uuid/${cfg.uuid} elements -d ${config.sops.secrets.elements.path}
mount /dev/mapper/elements ${cfg.path} mount /dev/mapper/elements ${cfg.path}
'' + lib.optionalString config.waffentragerService.postgresql.enable ''
mkdir -p ${cfg.postgresqlDir}/${config.waffentragerService.postgresql.version}
chown -R postgres:postgres ${cfg.postgresqlDir}
'' + lib.optionalString config.waffentragerService.nextcloud.enable ''
mkdir -p ${cfg.nextcloudDir}
chown -R nextcloud:nextcloud ${cfg.nextcloudDir}
'' ''
; ;
@@ -36,5 +34,32 @@
''; '';
}; };
systemd.services.elements-dirmake = {
description = "Create dirs in elements drive";
path = [ pkgs.cryptsetup pkgs.coreutils pkgs.util-linux ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = false;
script = lib.optionalString config.waffentragerService.postgresql.enable ''
mkdir -p ${cfg.postgresqlDir}/${config.waffentragerService.postgresql.version}
chown -R postgres:postgres ${cfg.postgresqlDir}
'' + lib.optionalString config.waffentragerService.nextcloud.enable ''
mkdir -p ${cfg.nextcloudDir}
chown -R nextcloud:nextcloud ${cfg.nextcloudDir}
'' + lib.optionalString config.waffentragerService.auth.lldap.enable ''
mkdir -p ${cfg.lldapDir}
chown -R lldap:lldap ${cfg.lldapDir}
'' + lib.optionalString config.waffentragerService.jellyfin.enable ''
mkdir -p ${cfg.jellyfinDir}
chown -R materus:nextcloud ${cfg.jellyfinDir}
'' + lib.optionalString config.waffentragerService.scrobbling.enable ''
mkdir -p ${cfg.malojaDir}/multi-scrobbler
chown -R scrobbler:scrobbler ${cfg.malojaDir}
''
;
};
}; };
} }
@@ -22,16 +22,14 @@
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
notify_push.enable = true; notify_push.enable = true;
package = pkgs.nextcloud28; package = pkgs.nextcloud31;
hostName = "waffentrager.materus.pl"; hostName = "waffentrager.materus.pl";
home = config.waffentragerService.elements.nextcloudDir; home = config.waffentragerService.elements.nextcloudDir;
config.adminuser = "master"; config.adminuser = "nextcloud-master";
config.adminpassFile = config.sops.secrets.nextcloud-adminpass.path; config.adminpassFile = config.sops.secrets.nextcloud-adminpass.path;
config.dbtype = "pgsql"; config.dbtype = "pgsql";
config.defaultPhoneRegion = "PL";
config.trustedProxies = [ materusArg.ips.valkyrie materusArg.ips.wireguard.valkyrie materusArg.ips.wireguard.waffentrager ];
extraAppsEnable = true; extraAppsEnable = true;
maxUploadSize = "4G"; maxUploadSize = "8G";
https = true; https = true;
enableImagemagick = true; enableImagemagick = true;
configureRedis = true; configureRedis = true;
@@ -39,10 +37,14 @@
appstoreEnable = true; appstoreEnable = true;
database.createLocally = true; database.createLocally = true;
nginx.recommendedHttpHeaders = true; nginx.recommendedHttpHeaders = true;
extraApps = with pkgs.nextcloud28Packages.apps; { extraApps = with pkgs.nextcloud31Packages.apps; {
inherit notify_push previewgenerator; inherit notify_push previewgenerator;
}; };
extraOptions = { settings = {
log_type = "file";
"profile.enabled" = true;
default_phone_region = "PL";
trusted_proxies = [ materusArg.ips.valkyrie materusArg.ips.wireguard.valkyrie materusArg.ips.wireguard.waffentrager ];
mail_smtpmode = "sendmail"; mail_smtpmode = "sendmail";
mail_sendmailmode = "pipe"; mail_sendmailmode = "pipe";
enable_previews = true; enable_previews = true;
@@ -55,6 +57,8 @@
''OC\Preview\BMP'' ''OC\Preview\BMP''
''OC\Preview\XBitmap'' ''OC\Preview\XBitmap''
''OC\Preview\MP3'' ''OC\Preview\MP3''
''OC\Preview\OGG''
''OC\Preview\OPUS''
''OC\Preview\MP4'' ''OC\Preview\MP4''
''OC\Preview\TXT'' ''OC\Preview\TXT''
''OC\Preview\MarkDown'' ''OC\Preview\MarkDown''
@@ -66,7 +70,6 @@
]; ];
"overwrite.cli.url" = "https://${config.services.nextcloud.hostName}"; "overwrite.cli.url" = "https://${config.services.nextcloud.hostName}";
}; };
globalProfiles = true;
phpOptions = { phpOptions = {
"opcache.memory_consumption" = "512"; "opcache.memory_consumption" = "512";
@@ -79,7 +82,7 @@
"opcache.fast_shutdown" = "1"; "opcache.fast_shutdown" = "1";
"opcache.save_comments" = "1"; "opcache.save_comments" = "1";
}; };
phpExtraExtensions = ex: [ ex.zip ex.zlib ex.tidy ex.smbclient ]; phpExtraExtensions = ex: [ ex.zip ex.zlib ex.tidy ex.smbclient ex.sodium ];
}; };
services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
forceSSL = true; forceSSL = true;
@@ -89,6 +92,10 @@
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem"; sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
extraConfig = '' extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
create_full_put_path on;
dav_access user:rw group:rw all:r;
''; '';
}; };
}; };
@@ -0,0 +1,57 @@
{ lib, pkgs, materusArg, config, ... }:
{
options.waffentragerService.samba.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable samba";
config =
let
cfg = config.waffentragerService.samba;
in
lib.mkIf cfg.enable {
waffentragerService.elements.enable = true;
systemd.services.samba-nmbd = {
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
};
systemd.services.samba-wsdd = {
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
};
services.samba-wsdd.enable = true;
services.samba-wsdd.openFirewall = true;
services.samba = {
enable = true;
package = pkgs.sambaFull;
securityType = "user";
openFirewall = true;
settings =
{
global = {
"workgroup" = "WORKGROUP";
"server string" = "smbwaffentrager";
"netbios name" = "smbwaffentrager";
"security" = "user";
"hosts allow" = "${materusArg.wireguard.sambaIp} 192.168.100. 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
"mangled names" = "no";
"dos charset" = "CP850";
"unix charset" = "UTF-8";
"display charset" = "UTF-8";
"catia:mappings" = "0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6";
};
materus = {
"path" = "${config.waffentragerService.elements.path}/storage/materus";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0770";
"directory mask" = "0770";
"force user" = "materus";
"force group" = "nextcloud";
};
};
};
};
}
@@ -0,0 +1,26 @@
{ lib, pkgs, materusArg, config, ... }:
{
options.waffentragerService.syncthing.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable syncthing";
config =
let
cfg = config.waffentragerService.syncthing;
in
lib.mkIf cfg.enable {
waffentragerService.elements.enable = true; networking.firewall.allowedTCPPorts = [ 22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port];
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
systemd.services.syncthing = {
requires = [ "elements-mount.service" ];
after = [ "elements-mount.service" ];
};
services = {
syncthing = {
enable = true;
user = "materus";
group = "nextcloud";
dataDir = "${config.waffentragerService.elements.path}/storage/materus";
configDir = "${config.waffentragerService.elements.path}/storage/materus/Inne/Config/Syncthing/waffentrager/";
};
};
};
}
@@ -4,6 +4,8 @@ let
pkgs = (import materusCfg.nixerus { inherit pkgs; }) // pkgs = (import materusCfg.nixerus { inherit pkgs; }) //
(if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); (if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { });
cfg = materusCfg; cfg = materusCfg;
unstable = import materusCfg.materusFlake.inputs.nixpkgs { system = materusCfg.arch; config = { allowUnfree = true; nvidia.acceptLicense = true; }; };
}; };
in in
{ {
+10 -2
View File
@@ -20,7 +20,7 @@ in
}; };
config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [ materusArg.cfg.configInputs.emacs-overlay.overlay ]; config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [ materusArg.cfg.configInputs.emacs-overlay.overlay ];
config.nix.package = lib.mkDefault pkgs.nixUnstable; config.nix.package = lib.mkDefault pkgs.nixVersions.latest;
config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry { config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry {
nixpkgs-stable = { nixpkgs-stable = {
from = { type = "indirect"; id = "nixpkgs-stable"; }; from = { type = "indirect"; id = "nixpkgs-stable"; };
@@ -81,11 +81,19 @@ in
flake = materusCfg.configInputs.git-agecrypt; flake = materusCfg.configInputs.git-agecrypt;
}; };
plasma-manager = {
from = { type = "indirect"; id = "plasma-manager"; };
flake = materusCfg.configInputs.plasma-manager;
};
nur = { nur = {
from = { type = "indirect"; id = "nur"; }; from = { type = "indirect"; id = "nur"; };
flake = materusCfg.configInputs.nur; flake = materusCfg.configInputs.nur;
}; };
nix-vscode-extensions = {
from = { type = "indirect"; id = "nix-vscode-extensions"; };
flake = materusCfg.configInputs.nix-vscode-extensions;
};
}; };
} }
@@ -1,53 +1,76 @@
{ config, pkgs, lib, materusArg, ... }: {
config,
pkgs,
lib,
materusArg,
...
}:
with materusArg.pkgs.lib; with materusArg.pkgs.lib;
{ {
imports = [ imports = [ ./fonts.nix ];
./fonts.nix
];
#Single Packages #Single Packages
options.materus.profile.packages.home-manager = mkPrivateVar materusArg.cfg.configInputs.home-manager.packages.${pkgs.system}.home-manager; options.materus.profile.packages.home-manager =
options.materus.profile.packages.firefox = mkPrivateVar (pkgs.firefox.override { mkPrivateVar
nativeMessagingHosts = [ materusArg.cfg.configInputs.home-manager.packages.${pkgs.system}.home-manager;
pkgs.plasma-browser-integration options.materus.profile.packages.firefox = mkPrivateVar (
]; pkgs.firefox.override { nativeMessagingHosts = [ pkgs.plasma-browser-integration ]; }
}); );
#Package Lists #Package Lists
options.materus.profile.packages.list.nixRelated = mkPrivateVar (with pkgs; [ options.materus.profile.packages.list.nixRelated = mkPrivateVar (
nix-prefetch with pkgs;
nix-prefetch-scripts [
nix-prefetch-github nix-prefetch
nix-prefetch-docker nix-prefetch-scripts
nixfmt nix-prefetch-github
nix-top nix-prefetch-docker
nix-tree nixfmt-rfc-style
nix-diff nix-top
nix-ld nix-tree
nil nix-diff
nixpkgs-fmt nix-ld
nixpkgs-review nixpkgs-fmt
]); nixpkgs-review
]
);
options.materus.profile.packages.list.desktopApps = mkPrivateVar (with pkgs; [ options.materus.profile.packages.list.desktopApps = mkPrivateVar (
(discord.override { nss = nss_latest; withOpenASAR = true; withTTS = true; }) with pkgs;
tdesktop [
mpv (discord.override {
ani-cli nss = nss_latest;
obsidian withOpenASAR = true;
nextcloud-client withTTS = true;
spotify })
thunderbird tdesktop
keepassxc syncplay
(aspellWithDicts (ds: with ds; [ en en-computers en-science pl ])) ani-cli
onlyoffice-bin nextcloud-client
]); spotify
thunderbird
keepassxc
(aspellWithDicts (
ds: with ds; [
en
en-computers
en-science
pl
]
))
onlyoffice-bin
qalculate-qt
]
);
options.materus.profile.packages.list.terminalApps = mkPrivateVar (with pkgs; [ options.materus.profile.packages.list.terminalApps = mkPrivateVar (
neofetch with pkgs;
ripgrep [
fd neofetch
]); ripgrep
fd
micro
]
);
} }
@@ -17,14 +17,17 @@ let
pkgs.wqy_zenhei pkgs.wqy_zenhei
pkgs.corefonts pkgs.corefonts
pkgs.hack-font pkgs.hack-font
(pkgs.nerdfonts.override { fonts = [ "Hack" ]; }) pkgs.nerd-fonts.hack
] ++ defaultFonts; ] ++ defaultFonts;
moreFonts = [ moreFonts = [
pkgs.ubuntu_font_family pkgs.ubuntu_font_family
pkgs.monocraft pkgs.monocraft
(pkgs.nerdfonts.override { fonts = [ "DroidSansMono" "Meslo" "ProFont" "FiraCode"]; }) pkgs.nerd-fonts.droid-sans-mono
pkgs.nerd-fonts.meslo-lg
pkgs.nerd-fonts.profont
pkgs.nerd-fonts.fira-code
]; ];
in in
{ {
Binary file not shown.
+14
View File
@@ -27,6 +27,20 @@ in
(if cfg.enableTerminal then packages.list.terminalApps else [ ]); (if cfg.enableTerminal then packages.list.terminalApps else [ ]);
#Desktop #Desktop
programs.feh.enable = lib.mkDefault cfg.enableDesktop; programs.feh.enable = lib.mkDefault cfg.enableDesktop;
programs.mpv = lib.mkIf cfg.enableDesktop {
enable = true;
config = {
ytdl-format = "bestvideo+bestaudio";
slang="pl,pol,Polish,Polski,en,eng,English";
alang="ja,jp,jpn,Japanese,pl,pol,Polski,en,eng,English";
demuxer-max-bytes="500MiB";
demuxer-max-back-bytes="150MiB";
cache="yes";
cache-pause-wait="10";
cache-pause-initial="yes";
keep-open="yes";
};
};
#Terminal #Terminal
programs.git = { programs.git = {
+150 -8
View File
@@ -1,16 +1,158 @@
{ config, lib, pkgs, materusArg, ... }: { config, lib, pkgs, materusArg, materusCfg, ... }:
let let
cfg = config.materus.profile.editor.code; cfg = config.materus.profile.editor.code;
in ext = let
{ market =
options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg"; (materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}".forVSCodeVersion
options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium"; config.programs.vscode.package.version);
options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: [ ]); }; marketNv =
(materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}");
in with market;
with pkgs; [
#Cpp
open-vsx.twxs.cmake
vscode-extensions.ms-vscode.cpptools
vscode-marketplace.ms-vscode.cmake-tools
vscode-marketplace.cs128.cs128-clang-tidy
#Python
#vscode-marketplace.ms-python.python
#vscode-marketplace.ms-python.vscode-pylance
#vscode-marketplace.ms-python.debugpy
# CSharp
open-vsx.muhammad-sammy.csharp
#Java
vscode-marketplace.redhat.java
vscode-marketplace.vscjava.vscode-java-debug
vscode-marketplace.vscjava.vscode-java-test
vscode-marketplace.vscjava.vscode-gradle
vscode-marketplace.vscjava.vscode-java-dependency
#JS
vscode-marketplace.angular.ng-template
#DLang
open-vsx.webfreak.code-d
#Nix
open-vsx.jnoortheen.nix-ide
#Web
open-vsx.ecmel.vscode-html-css
open-vsx.formulahendry.auto-close-tag
#Lua
open-vsx.sumneko.lua
#YAML, XML
open-vsx.redhat.vscode-yaml
open-vsx.redhat.vscode-xml
#Git
open-vsx.donjayamanne.githistory
#open-vsx.mhutchie.git-graph
open-vsx.eamodio.gitlens
#Other
#open-vsx.asciidoctor.asciidoctor-vscode
open-vsx.ms-azuretools.vscode-docker
open-vsx.webfreak.debug
open-vsx.mkhl.direnv
#vscode-marketplace.ms-vscode-remote.remote-wsl
#vscode-marketplace.ms-vscode-remote.remote-containers
open-vsx.esbenp.prettier-vscode
open-vsx.formulahendry.code-runner
open-vsx.leonardssh.vscord
open-vsx.ms-vscode.hexeditor
open-vsx.alefragnani.project-manager
vscode-marketplace.cantonios.project-templates
vscode-marketplace.betterthantomorrow.joyride
#Icons
open-vsx.pkief.material-icon-theme
open-vsx.pkief.material-product-icons
#Themes
open-vsx.dracula-theme.theme-dracula
open-vsx.ahmadawais.shades-of-purple
#Languages
marketNv.vscode-marketplace.ms-ceintl.vscode-language-pack-pl
];
set = {
"vscord.app.name" = lib.mkDefault "VSCodium";
"window.dialogStyle" = lib.mkDefault "custom";
"window.titleBarStyle" = lib.mkDefault "custom";
"editor.fontFamily" =
lib.mkDefault "'Hack Nerd Font', 'monospace', monospace";
"workbench.colorTheme" = lib.mkDefault "Shades of Purple";
"workbench.productIconTheme" = lib.mkDefault "material-product-icons";
"workbench.iconTheme" = lib.mkDefault "material-icon-theme";
"d.aggressiveUpdate" = lib.mkDefault false;
"d.servedPath" = lib.mkDefault "${pkgs.serve-d}/bin/serve-d";
"direnv.path.executable" = lib.mkDefault "${pkgs.direnv}/bin/direnv";
"nix.enableLanguageServer" = lib.mkDefault true;
"nix.serverPath" = lib.mkDefault "${pkgs.nixd}/bin/nixd";
"nix.formatterPath" = lib.mkDefault "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
"nix.serverSettings" = {
"nixd" = { "formatting" = { "command" = lib.mkDefault [ "nixfmt" ]; }; };
};
"C_Cpp.clang_format_path" =
lib.mkDefault "${pkgs.clang-tools}/bin/clang-format";
"C_Cpp.clang_format_fallbackStyle" = lib.mkDefault "Microsoft";
"clang-tidy.executable" =
lib.mkDefault "${pkgs.clang-tools}/bin/clang-tidy";
"redhat.telemetry.enabled" = lib.mkDefault false;
"python.defaultInterpreterPath" =
lib.mkDefault "${pkgs.python3Full}/bin/python";
"[cpp]" = {
"editor.defaultFormatter" = lib.mkDefault "xaver.clang-format";
};
"[javascript]" = {
"editor.defaultFormatter" = lib.mkDefault "esbenp.prettier-vscode";
};
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
"cmake.showOptionsMovedNotification" = false;
"cmake.pinnedCommands" = [
"workbench.action.tasks.configureTaskRunner"
"workbench.action.tasks.runTask"
];
};
in {
options.materus.profile.editor.code.enable =
materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop
"Enable VSCodium with materus cfg";
options.materus.profile.editor.code.fhs.enable =
materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
options.materus.profile.editor.code.fhs.packages =
lib.mkOption { default = (ps: [ ]); };
options.materus.profile.editor.code.extensions =
lib.mkOption { default = [ ]; };
options.materus.profile.editor.code.settings =
lib.mkOption { default = { }; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
materus.profile.editor.code.extensions = ext;
materus.profile.editor.code.settings = set;
programs.vscode = { programs.vscode = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium); package = lib.mkDefault (if (cfg.fhs.enable) then
mutableExtensionsDir = lib.mkDefault true; (pkgs.vscodium.fhsWithPackages cfg.fhs.packages)
else
pkgs.vscodium);
mutableExtensionsDir =
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
extensions = lib.mkDefault config.materus.profile.editor.code.extensions;
enableExtensionUpdateCheck =
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
enableUpdateCheck = lib.mkDefault false;
userSettings = lib.mkDefault config.materus.profile.editor.code.settings;
}; };
materus.profile.fonts.enable = lib.mkDefault true; materus.profile.fonts.enable = lib.mkDefault true;
}; };
@@ -1,122 +1,296 @@
{ config, lib, pkgs, materusArg, ... }: {
let config,
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/"; lib,
pkgs,
materusArg,
materusCfg,
...
}: let
emacs-pkg = materusCfg.configInputs.emacs-overlay.packages.x86_64-linux.emacs-git;
inits = import ./init.nix { path = configPath; inherit pkgs; }; materus-nix = e:
packages = epkgs: with epkgs; [ e.trivialBuild {
load-relative pname = "materus-nix";
elcord src = pkgs.writeText "materus-nix.el" ''
persp-mode (when (file-exists-p "${config.programs.emacs.package}/opt/emacs/buildtime")
dashboard (setq emacs-build-time (decode-time (seconds-to-time (string-to-number (with-temp-buffer
magit (insert-file-contents "${config.programs.emacs.package}/opt/emacs/buildtime")
helm (buffer-string)))))))
avy
corfu
vterm
centaur-tabs
projectile
company
clipetty
treemacs
treemacs-nerd-icons
treemacs-perspective
treemacs-icons-dired
treemacs-magit
treemacs-projectile
tree-edit
vertico
nerd-icons
nerd-icons-completion
perspective
minions
telephone-line
rainbow-delimiters
use-package
cmake-mode
lsp-mode
lsp-java
lsp-jedi
lsp-haskell
lsp-ui
lsp-treemacs
dap-mode
d-mode
multiple-cursors
org
org-rainbow-tags
org-roam
org-roam-ui
org-review
markdown-mode
json-mode
nix-mode
minimap
moe-theme
doom-themes
];
default-config = '' (defvar lsp-java-configuration-runtimes nil)
(defvar materus/nix-packages t) (setq dap-lldb-debug-program '("${pkgs.llvmPackages.lldb}/bin/lldb-vscode"))
(defvar materus/init-from-home nil) (setq lsp-java-configuration-runtimes '[(:name "JavaSE-1.8"
(unless materus/init-from-home :path "${pkgs.jdk8}/lib/openjdk/")
(message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el") (:name "JavaSE-17"
${setNixInit} :path "${pkgs.jdk17}/lib/openjdk/")
${inits.initText} (:name "JavaSE-21"
) :path "${pkgs.jdk21}/lib/openjdk/"
''; :default t)])
emacsPkgs = with pkgs;[ (setq lsp-nix-nixd-nixos-options-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".options"))
python3 (setenv "JAVA_HOME" "${pkgs.jdk21}/lib/openjdk")
lua (setenv "PATH" (concat "${emacsEnv}/bin:" (getenv "PATH")))
multimarkdown (setq exec-path (append '("${emacsEnv}/bin") exec-path))
git
];
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
(provide 'materus-nix)
'';
version = "1.0.0";
};
packages = epkgs:
with epkgs; [
treesit-grammars.with-all-grammars
use-package
elcord
dashboard
magit
git-timemachine
avy
vterm
direnv
projectile
clipetty
which-key
iedit
hideshowvis
perspective
treemacs
treemacs-perspective
treemacs-nerd-icons
treemacs-icons-dired
treemacs-magit
treemacs-projectile
tree-edit
nerd-icons
nerd-icons-completion
minions
rainbow-delimiters
rainbow-mode
cmake-mode
lsp-mode
lsp-java
lsp-jedi
lsp-haskell
lsp-pascal
lsp-pyright
lsp-ui
lsp-treemacs
dap-mode
flycheck
gradle-mode
groovy-mode
kotlin-mode
d-mode
lua-mode
multiple-cursors
org
org-contrib
org-ql
org-rainbow-tags
org-roam
org-roam-ui
org-review
org-present
org-modern
org-auto-tangle
ox-pandoc
visual-fill-column
csharp-mode
markdown-mode
json-mode
nix-mode
nixfmt
nix-ts-mode
no-littering
right-click-context
dracula-theme
doom-themes
doom-modeline
popper
undo-tree
bash-completion
eldoc-box
yasnippet
yasnippet-capf
async
request
markdown-ts-mode
llvm-ts-mode
treesit-fold
treesit-auto
tree-sitter-langs
eat
vlf
edit-indirect
zones
sudo-edit
toc-org
#empv
volatile-highlights
highlight
elfeed
elfeed-goodies
drag-stuff
dirvish
rg
shfmt
mermaid-mode
ob-mermaid
visual-replace
scroll-restore
highlight-indent-guides
diff-hl
transient
embark
embark-consult
ef-themes
pdf-tools
minimap
geiser-guile
fennel-mode
paredit
# Completions & Minibuffer
corfu
corfu-terminal
kind-icon
cape
orderless
vertico
marginalia
];
emacsEnv = pkgs.buildEnv {
name = "emacs-env";
paths = with pkgs; [
jdk21
luaformatter
pandoc
(luajit.withPackages (p: [
p.fennel
p.lua-lsp
]))
fennel-ls
fnlfmt
sbcl
silver-searcher
guile
plantuml
mermaid-cli
pyright
shfmt
ripgrep
cmake
gnumake
nixfmt-rfc-style
(python3.withPackages (python-pkgs: with python-pkgs; [
matplotlib
pandas
requests
]))
multimarkdown
git
emacs-lsp-booster
llvmPackages.clang-tools
llvmPackages.clang
llvmPackages.lldb
(hiPrio gcc)
gdb
materusArg.unstable.nixd
jdt-language-server
gradle
fpc
nodejs
omnisharp-roslyn
texlive.combined.scheme-full
];
};
cfg = config.materus.profile.editor.emacs; cfg = config.materus.profile.editor.emacs;
in {
options.materus.profile.editor.emacs.enable =
setNixInit = '' materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
(setenv "PATH" (concat (getenv "PATH") ":${lib.makeBinPath emacsPkgs}"))
${builtins.concatStringsSep "\n" (builtins.map (x: "(setq exec-path (append exec-path '(\""+x+"/bin\")))" ) emacsPkgs)}
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
'';
in
{
options.materus.profile.editor.emacs.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] '' home.activation.emacsSetup = lib.hm.dag.entryAfter ["linkGeneration"] '''';
run ${config.programs.emacs.finalPackage}/bin/emacs --batch \
--eval '(setq warning-minimum-log-level :error)' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
'';
xdg.configFile."emacs/init.el".text = ''
(defvar materus/nix-packages nil)
(defvar materus/init-from-home t)
(setq-default materus/init-from-home t)
${setNixInit} #Emacsclient with COLORTERM env variable, without it display in "-nw" client is broken
${inits.initText} xdg.desktopEntries.emacs = {
''; name = "Emacs";
genericName = "Edytor tekstu";
xdg.configFile."emacs/early-init.el".text = '' comment = "Edytuj tekst";
${inits.earlyInitText} exec = ''env COLORTERM=truecolor emacsclient -a "" -r %F'';
''; icon = "emacs";
terminal = false;
type = "Application";
categories = [
"Development"
"TextEditor"
];
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
"x-scheme-handler/org-protocol"
];
actions.new-window = {
exec = ''env COLORTERM=truecolor emacsclient -a "" -c %F'';
name = "Nowe okno";
};
actions.no-daemon = {
exec = "env COLORTERM=truecolor emacs %F";
name = "Instancja samodzielna";
};
};
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = with pkgs; lib.mkDefault materusArg.pkgs.emacs-materus; extraPackages = epkgs: [(materus-nix epkgs) epkgs.vterm epkgs.treesit-grammars.with-all-grammars];
extraPackages = epkgs: ((packages epkgs)); package = lib.mkDefault (
extraConfig = default-config; (emacs-pkg.override {
}; withSQLite3 = true;
withWebP = true;
withX = true;
#withXwidgets = true;
withGTK3 = true;
withAlsaLib = true;
#withGconf = true;
withImageMagick = true;
})
.overrideAttrs
(
f: p: {
#Remove .desktop files, will use my own. Add file with buildtime in case of using elpaca
postInstall =
p.postInstall
+ ''
rm -fr $out/share/applications/*
mkdir -p $out/opt/emacs
date +%s | tr -d '\n' > $out/opt/emacs/buildtime
'';
}
)
);
};
}; };
} }
@@ -1,17 +0,0 @@
{ path, pkgs }:
{
earlyInitText = ''
${builtins.readFile (path + "early-init.el")}
'';
initText = ''
(defvar materus/init-from-home nil)
(when materus/init-from-home
(setq-default inhibit-defaul-init 1)
)
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
${builtins.readFile (path + "packages.el")}
${builtins.readFile (path + "init.el")}
'';
}
@@ -0,0 +1,22 @@
From 75e41ae5bd1c0879b323ed0ddc4bac29badb29ff Mon Sep 17 00:00:00 2001
From: fanshi1028 <jackychany321@gmail.com>
Date: Fri, 1 Nov 2024 14:41:26 +0000
Subject: [PATCH] fix lsp-org breaks with org 9.7 (#4300)
---
lsp-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lsp-mode.el b/lsp-mode.el
index f5c700dbf3..a149d6d2c7 100644
--- a/lsp-mode.el
+++ b/lsp-mode.el
@@ -9668,7 +9668,7 @@ defaults to `progress-bar."
(save-excursion
(funcall goto-buffer)
(funcall f))))))
- ((&plist :begin :end :post-blank :language) (cl-second (org-element-context)))
+ ((begin end post-blank language) (--map (org-element-property it (org-element-context) nil t) '(:begin :end :post-blank :language)))
((&alist :tangle file-name) (cl-third (org-babel-get-src-block-info 'light)))
(file-name (if file-name
@@ -7,24 +7,29 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
package = pkgs.neovim-unwrapped;
coc.enable = true; coc.enable = true;
coc.package = pkgs.vimPlugins.coc-nvim;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
defaultEditor = lib.mkDefault false;
extraConfig = '' extraConfig = ''
set number set number
''; '';
extraLuaConfig = ''
'';
extraPackages = with pkgs;[
];
plugins = with pkgs.vimPlugins;[ plugins = with pkgs.vimPlugins;[
syntastic syntastic
vim-fugitive vim-fugitive
vim-airline vim-airline
vim-nix vim-nix
nvim-fzf nvim-fzf
nvim-treesitter.withAllGrammars nvim-treesitter.withAllGrammars
@@ -9,11 +9,17 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.bash = { programs.bash = {
enable = true; enable = true;
enableCompletion = lib.mkDefault true; enableCompletion = lib.mkDefault true;
enableVteIntegration = lib.mkDefault true; enableVteIntegration = lib.mkDefault true;
historyControl = lib.mkDefault [ "erasedups" "ignorespace" ]; historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ]; shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
initExtra = ''
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/bash";
fi
'';
}; };
}; };
@@ -1,3 +1,4 @@
{config, pkgs, lib, ...}:
{ {
imports = [ imports = [
@@ -6,4 +7,12 @@
./fish.nix ./fish.nix
./starship.nix ./starship.nix
]; ];
home.sessionVariables = {
EDITOR = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
lib.getBin (pkgs.writeShellScript "editor" ''${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c -nw $@'')
else "${pkgs.micro}/bin/micro");
VISUAL = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
lib.getBin (pkgs.writeShellScript "editor-visual" ''exec env COLORTERM=truecolor ${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c $@'')
else "${pkgs.micro}/bin/micro");
};
} }
+94 -81
View File
@@ -1,12 +1,20 @@
{ config, pkgs, lib, materusArg, ... }: {
config,
pkgs,
lib,
materusArg,
...
}:
let let
relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file; relToDotDir =
file:
(lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file;
pluginsDir = pluginsDir =
if config.programs.zsh.dotDir != null then if config.programs.zsh.dotDir != null then
relToDotDir "plugins" else "${config.home.homeDirectory}/.zsh/plugins"; relToDotDir "plugins"
else
"${config.home.homeDirectory}/.zsh/plugins";
p10kcfg = "${zshcfg}/p10kcfg"; p10kcfg = "${zshcfg}/p10kcfg";
zshcfg = "${materusArg.cfg.path}" + "/extraFiles/config/zsh"; zshcfg = "${materusArg.cfg.path}" + "/extraFiles/config/zsh";
@@ -19,11 +27,6 @@ let
fi fi
''; '';
makePlugin = nameArg: fileArg: srcArg: rec { makePlugin = nameArg: fileArg: srcArg: rec {
name = nameArg; name = nameArg;
src = srcArg; src = srcArg;
@@ -33,15 +36,18 @@ let
}; };
extraPlugins = { extraPlugins = {
powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (pkgs.fetchFromGitHub { powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (
owner = "romkatv"; pkgs.fetchFromGitHub {
repo = "powerlevel10k"; owner = "romkatv";
rev = "v1.20.0"; repo = "powerlevel10k";
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E="; rev = "v1.20.0";
}); sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
}
);
sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo"; sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo";
extract = makePlugin "extract" "extract.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/extract"; extract =
makePlugin "extract" "extract.plugin.zsh"
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/extract";
}; };
in in
@@ -58,42 +64,44 @@ in
type = lib.types.lines; type = lib.types.lines;
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = [ home.packages = [ pkgs.ripgrep ];
pkgs.ripgrep
];
home.file = lib.mkMerge [ home.file = lib.mkMerge [
(builtins.foldl' (a: b: a // b) { } (builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins))) (builtins.foldl' (a: b: a // b) { } (
builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins)
))
{ "${relToDotDir ".zshrc"}".text = lib.mkAfter cfg.endConfig; } { "${relToDotDir ".zshrc"}".text = lib.mkAfter cfg.endConfig; }
]; ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; autosuggestion.enable = true;
enableSyntaxHighlighting = true; syntaxHighlighting.enable = true;
enableVteIntegration = true; enableVteIntegration = true;
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
historySubstringSearch.searchUpKey = "$key[Up]"; historySubstringSearch.searchUpKey = "$key[Up]";
historySubstringSearch.searchDownKey = "$key[Down]"; historySubstringSearch.searchDownKey = "$key[Down]";
envExtra = '' envExtra = ''
${makeEnv "__MATERUS_HM_ZSH" "1"} ${makeEnv "__MATERUS_HM_ZSH" "1"}
${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt} ${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt}
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"} ${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
''; '';
initExtraFirst = '' initExtraFirst = ''
bindkey -e
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
fi
${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" '' ${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi fi
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
source "${extraPlugins.powerlevel10k.fullPath}" source "${extraPlugins.powerlevel10k.fullPath}"
fi fi
'' ''}
}
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else __MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}"; __MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}";
@@ -107,12 +115,9 @@ in
path+="${extraPlugins.extract.path}" path+="${extraPlugins.extract.path}"
fpath+="${extraPlugins.extract.path}" fpath+="${extraPlugins.extract.path}"
fi fi
''; '';
plugins = [ ];
plugins = [
];
history = { history = {
extended = true; extended = true;
@@ -125,58 +130,67 @@ in
}; };
completionInit = '' completionInit = ''
ZSH_COMPDUMP="''${ZSH_COMPDUMP:-''${XDG_CACHE_HOME:-${config.home.homeDirectory}/.cache}/.zcompdump-''${HOST}-''${ZSH_VERSION}}" ZSH_COMPDUMP="''${ZSH_COMPDUMP:-''${XDG_CACHE_HOME:-${config.home.homeDirectory}/.cache}/.zcompdump-''${HOST}-''${ZSH_VERSION}}"
autoload -U compinit && compinit -d $ZSH_COMPDUMP autoload -U compinit && compinit -d $ZSH_COMPDUMP
''; '';
initExtra = '' initExtra =
if [[ "$__ETC_ZSHRC_SOURCED" != "1" ]]; then ''
. ${zshcfg}/zinputrc if [[ "$__ETC_ZSHRC_SOURCED" != "1" ]]; then
fi . ${zshcfg}/zinputrc
source ${zshcfg}/zshcompletion.zsh fi
source ${zshcfg}/zshcompletion.zsh
history-substring-search-up-prefixed(){ history-substring-search-up-prefixed(){
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up
} }
history-substring-search-down-prefixed(){ history-substring-search-down-prefixed(){
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down
} }
zle -N history-substring-search-up-prefixed zle -N history-substring-search-up-prefixed
zle -N history-substring-search-down-prefixed zle -N history-substring-search-down-prefixed
bindkey -r "^[" bindkey -r "^["
bindkey "^[[1;5C" forward-word bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word bindkey "^[[1;5D" backward-word
bindkey "^[[1;5A" history-substring-search-up-prefixed bindkey "^[[1;5A" history-substring-search-up-prefixed
bindkey "^[[1;5B" history-substring-search-down-prefixed bindkey "^[[1;5B" history-substring-search-down-prefixed
zsh-private() { bindkey '^[[3~' delete-char
__MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package} bindkey '^[[3;2~' delete-word
}
myip() { zsh-private() {
${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text __MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package}
} }
speedtest() { myip() {
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3} ${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text
} }
speedtest() {
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
}
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "e"="emacsclient -nw -c --alternate-editor= "''}
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "ee"="emacsclient -n -r --alternate-editor= "''}
'' +
makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then ''
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh + makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
else if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh [[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
fi else
'' + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" '' [[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
unset HISTFILE fi
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"} ''
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh " + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
'' unset HISTFILE
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
''
; ;
@@ -185,5 +199,4 @@ in
programs.starship.enableZshIntegration = lib.mkDefault false; programs.starship.enableZshIntegration = lib.mkDefault false;
}; };
} }
@@ -6,7 +6,7 @@ let
''; '';
in in
{ {
options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus wezterm config"; options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus wezterm config";
options.materus.profile.wezterm.enableHackFont = materusArg.pkgs.lib.mkBoolOpt true "Enable hack nerd font for wezterm"; options.materus.profile.wezterm.enableHackFont = materusArg.pkgs.lib.mkBoolOpt true "Enable hack nerd font for wezterm";
options.materus.profile.wezterm.enableWezcraft = materusArg.pkgs.lib.mkBoolOpt true "Enable alias to start wezcraft with monocraft font"; options.materus.profile.wezterm.enableWezcraft = materusArg.pkgs.lib.mkBoolOpt true "Enable alias to start wezcraft with monocraft font";
options.materus.profile.wezterm.extraConfig = lib.mkOption { options.materus.profile.wezterm.extraConfig = lib.mkOption {
@@ -31,9 +31,7 @@ in
''; '';
home.packages = [ home.packages = [
(lib.mkIf cfg.enableHackFont (pkgs.nerdfonts.override { (lib.mkIf cfg.enableHackFont (pkgs.nerd-fonts.hack))
fonts = [ "Hack" ];
}))
(lib.mkIf cfg.enableWezcraft (pkgs.monocraft)) (lib.mkIf cfg.enableWezcraft (pkgs.monocraft))
(lib.mkIf cfg.enableWezcraft (pkgs.writeShellScriptBin "wezcraft" '' (lib.mkIf cfg.enableWezcraft (pkgs.writeShellScriptBin "wezcraft" ''
${lib.getExe config.programs.wezterm.package} --config font="wezterm.font 'Monocraft Nerd Font'" $@ ${lib.getExe config.programs.wezterm.package} --config font="wezterm.font 'Monocraft Nerd Font'" $@
+7 -3
View File
@@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
{
imports = [ imports = [
./nix.nix ./nix.nix
./fonts.nix ./fonts.nix
@@ -18,12 +17,17 @@
font = lib.mkDefault "LatArCyrHeb-16"; font = lib.mkDefault "LatArCyrHeb-16";
keyMap = lib.mkDefault "pl"; keyMap = lib.mkDefault "pl";
}; };
environment.sessionVariables = {
MATERUS_CONFIG_DIR = lib.mkDefault "/etc/nixos/";
};
programs.tmux = { programs.tmux = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
clock24 = lib.mkDefault true; clock24 = lib.mkDefault true;
}; };
environment.systemPackages = lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ]; environment.systemPackages =
lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
} }
+3 -1
View File
@@ -11,7 +11,6 @@ let
pkgs.keyutils pkgs.keyutils
pkgs.libGL pkgs.libGL
pkgs.libglvnd pkgs.libglvnd
pkgs.gamescope
pkgs.steamPackages.steam pkgs.steamPackages.steam
pkgs.libxcrypt pkgs.libxcrypt
pkgs.gnutls pkgs.gnutls
@@ -93,6 +92,8 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.gamescope.enable = lib.mkDefault true;
programs.gamescope.capSysNice = lib.mkDefault false;
hardware.steam-hardware.enable = lib.mkDefault true; hardware.steam-hardware.enable = lib.mkDefault true;
materus.profile.steam.extraEnv = { materus.profile.steam.extraEnv = {
XDG_DATA_DIRS = "/usr/share:\${XDG_DATA_DIRS}"; XDG_DATA_DIRS = "/usr/share:\${XDG_DATA_DIRS}";
@@ -102,6 +103,7 @@ in
enable = lib.mkDefault true; enable = lib.mkDefault true;
dedicatedServer.openFirewall = lib.mkDefault true; dedicatedServer.openFirewall = lib.mkDefault true;
remotePlay.openFirewall = lib.mkDefault true; remotePlay.openFirewall = lib.mkDefault true;
gamescopeSession.enable = lib.mkDefault true;
}; };
environment.sessionVariables = rec { environment.sessionVariables = rec {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = lib.mkDefault "\${HOME}/.steam/root/compatibilitytools.d"; STEAM_EXTRA_COMPAT_TOOLS_PATHS = lib.mkDefault "\${HOME}/.steam/root/compatibilitytools.d";
+2 -2
View File
@@ -1,4 +1,4 @@
{ config, pkgs, lib, materusArg, ... }: { config, pkgs, lib, materusArg, materusCfg, ... }:
let let
cfg = config.materus.profile.nix; cfg = config.materus.profile.nix;
in in
@@ -7,7 +7,7 @@ in
config.nix = lib.mkIf cfg.enable { config.nix = lib.mkIf cfg.enable {
settings = { settings = {
experimental-features = [ "nix-command" "flakes" "repl-flake" "no-url-literals" ]; experimental-features = lib.mkMerge [[ "nix-command" "flakes" "no-url-literals" ]];
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ]; trusted-users = [ "root" "@wheel" ];
+1 -1
View File
@@ -19,7 +19,6 @@ let
(materusFlake.selfPath + "/configurations/shared/home/${username}") (materusFlake.selfPath + "/configurations/shared/home/${username}")
(materusFlake.selfPath + "/configurations/host/${host}/home/${username}") (materusFlake.selfPath + "/configurations/host/${host}/home/${username}")
profiles.homeProfile profiles.homeProfile
materusFlake.nixosConfigurations.${host}.materusCfg.configInputs.sops-nix.homeManagerModules.sops
]; ];
}; };
}] }]
@@ -49,6 +48,7 @@ let
./${username} ./${username}
profiles.homeProfile profiles.homeProfile
materusCfg.configInputs.sops-nix.homeManagerModules.sops materusCfg.configInputs.sops-nix.homeManagerModules.sops
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
]; ];
}; };
}; };
+9 -9
View File
@@ -4,17 +4,17 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR cd $SCRIPT_DIR
if [ $# = 0 ] || ( [ $# = 1 ] && [ $1 = "help" ] ); then if [ $# = 0 ] || ( [ $# = 1 ] && [ $1 = "help" ] ); then
echo "Use \"unlock\" to unlock with pgp" echo "Use \"unlock\" to unlock with pgp"
echo "Use \"unlock\" /path/to/key to unlock with symmetric key" echo "Use \"unlock\" /path/to/key to unlock with symmetric key"
echo "Use \"lock\": to lock repository" echo "Use \"lock\": to lock repository"
exit exit
fi fi
check_git () { check_git () {
if [ "$(git status --porcelain)" ]; then if [ "$(git status --porcelain)" ]; then
echo "Working directory not clean." echo "Working directory not clean."
echo "Please commit your changes or 'git stash' them before running this script" echo "Please commit your changes or 'git stash' them before running this script"
exit 1 exit 1
fi fi
} }
create_decrypt () { create_decrypt () {
File diff suppressed because it is too large Load Diff
+79 -20
View File
@@ -1,28 +1,87 @@
;;; -*- lexical-binding: t; -*-
;;; VARIABLES
(setenv "LSP_USE_PLISTS" "true") ; Make lsp-mode use plists
(setq c-default-style nil) ; Clear default styles for languages, will set them up later
(setq default-input-method nil) ; Disable default input method, I'm not using them anyway so far
(setq initial-major-mode 'emacs-lisp-mode)
(setq auto-save-default nil) ; TODO: configure auto saves, disable for now
(setq backup-directory-alist
`((".*" . ,(concat user-emacs-directory "var/backups/")))) ; Set backup location
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "var/recovery/") t))) ; Set auto-save location
(setq auto-save-list-file-prefix (concat user-emacs-directory "var/auto-save/sessions/")) ; Set auto-save-list location
(setq load-prefer-newer t) ; Prefer newer files to load
(setq package-enable-at-startup nil)
(setq package-quickstart nil) ; Disable package quickstart
(setq inhibit-startup-screen t)
(setq inhibit-compacting-font-caches t) ; Don't compact fonts
(set-language-environment "UTF-8") ; Use UTF-8
(setq-default buffer-file-coding-system 'utf-8-unix)
(setq custom-file (concat user-emacs-directory "etc/custom.el")) ; Set custom file location, don't want clutter in main directory
(setq custom-theme-directory
(concat user-emacs-directory "/etc/materus/themes" )) ; Set custom themes location
(setq ring-bell-function 'ignore) ; Disable bell
(defvar materus/emacs-gc-cons-threshold (* 64 1024 1024)
"The value of `gc-cons-threshold' after Emacs startup.") ; Define after init garbage collector threshold
;;; GARBAGE COLLECTOR
(setq gc-cons-threshold most-positive-fixnum) ; Set `gc-cons-threshold' so it won't collectect during initialization
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold materus/emacs-gc-cons-threshold))) ; Set `gc-cons-threshold' to desired value after startup
(defvar materus/init-early t)
(setq materus/init-early t)
(tool-bar-mode -1) ;;; FRAMES
(setq initial-major-mode 'fundamental-mode)
(setq-default package-quickstart t)
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
(unless (daemonp) (setq frame-inhibit-implied-resize t)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes (setq frame-resize-pixelwise t)
gc-cons-percentage 0.6) (setq window-resize-pixelwise t) ; Allow pixelwise resizing of window and frame
(setq package-enable-at-startup nil)
(unless (daemonp)
(add-to-list 'initial-frame-alist '(fullscreen . maximized))) ; Start first frame maximized if not running as daemon, daemon frame are set up later in config
(setq default-frame-alist ; Set default size for frames
'((width . 130)
(height . 40)))
(advice-add #'tty-run-terminal-initialization :override #'ignore) (advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook (add-hook 'window-setup-hook
(lambda () (lambda ()
(advice-remove #'tty-run-terminal-initialization #'ignore) (unless (display-graphic-p)
(tty-run-terminal-initialization (selected-frame) nil t) (advice-remove #'tty-run-terminal-initialization #'ignore)
) (tty-run-terminal-initialization (selected-frame) nil t)
) )))
)
;;; NATIVE COMPILATION
(setq native-comp-async-report-warnings-errors nil) ; Silence warnings
(setq native-comp-speed 2) ; Set native-comp speed
(setq native-comp-jit-compilation t
native-comp-deferred-compilation t
package-native-compile t)
;; Setting up native-comp cache location
(when (boundp 'native-comp-eln-load-path)
(startup-redirect-eln-cache (expand-file-name "var/eln-cache/" user-emacs-directory)))
@@ -0,0 +1,169 @@
;;; corfu-mouse.el --- Mouse support for Corfu -*- lexical-binding: t; -*-
;; Copyright (C) 2021, 2022 Free Software Foundation, Inc.
;; Copyright (C) 2022 Akib Azmain Turja.
;; Author: Akib Azmain Turja <akib@disroot.org>
;; Maintainer: Akib Azmain Turja <akib@disroot.org>
;; Created: 2022
;; Version: 0.1
;; Package-Requires: ((emacs "24.4") (corfu "0.25"))
;; Homepage: https://codeberg.org/akib/emacs-corfu-mouse
;; This file is not part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; Disclaimer: This file is based on vertico-mouse.el of Vertico
;; package, which is a part of GNU Emacs.
;;; Commentary:
;; This package is a Corfu extension, which adds mouse support.
;; To enable, M-x corfu-mouse-mode.
;; Modified to support pixel-scroll-precision-mode and fixed adding spaces
;;; Code:
(require 'corfu)
(defgroup corfu-mouse nil
"Mouse support for Corfu."
:group 'corfu
:link '(url-link "https://codeberg.org/akib/emacs-corfu-mouse")
:prefix "corfu-mouse-")
(defface corfu-mouse
'((t :inherit highlight))
"Face used for mouse highlighting."
:group 'corfu-mouse)
(defvar corfu-mouse--completion-buffer nil
"The buffer for which the popup is being shown.")
(defun corfu-mouse--candidate-map (index)
"Return keymap for candidate with INDEX."
(let ((map (make-sparse-keymap))
(mouse-1 (make-symbol "corfu-mouse--on-mouse-1"))
(mouse-3 (make-symbol "corfu-mouse--on-mouse-3")))
(fset mouse-1 (lambda ()
(interactive)
(corfu--goto index)
(corfu-insert)))
(fset mouse-3 (lambda ()
(interactive)
(corfu--goto index)
(corfu-complete)))
(define-key map [mouse-1] mouse-1)
(define-key map [mouse-3] mouse-3)
;; Ignore these events to keep completion session alive.
(define-key map [down-mouse-1] #'ignore)
(define-key map [down-mouse-3] #'ignore)
map))
(defun corfu-mouse--format-candidates (fcands)
"Format candidates.
FCANDS is the return value of `corfu--format-candidates'."
(let ((index corfu--scroll)
(cands (caddr fcands)))
(while cands
(let ((line (car cands)))
;; Append necessary amount of spaces to make it as wide as the
;; popup.
(let ((strlen (- (cadr fcands) (string-width line))))
(when (> strlen 0)
(setq line (concat line (make-string strlen ? )))))
(add-text-properties 0 (length line)
`(mouse-face
corfu-mouse
keymap
,(corfu-mouse--candidate-map index))
line)
(setcar cands line)
(setq cands (cdr cands))
(setq index (1+ index))))
fcands))
(defun corfu-mouse--scroll-up (n)
"Scroll up by N lines."
(with-current-buffer corfu-mouse--completion-buffer
(corfu-next n)))
(defun corfu-mouse--scroll-down (n)
"Scroll down by N lines."
(corfu-mouse--scroll-up (- n)))
(defun corfu-mouse-mwheel-scroll ()
"Call `mwheel-scroll'."
(interactive)
(call-interactively #'mwheel-scroll))
(defun corfu-mouse--setup-scrolling (buffer)
"Setup mouse scrolling on BUFFER."
(let ((current-buffer (current-buffer)))
(with-current-buffer buffer
(when (boundp 'pixel-scroll-precision-mode)
(setq-local pixel-scroll-precision-mode nil))
(setq-local mwheel-scroll-up-function #'corfu-mouse--scroll-up)
(setq-local mwheel-scroll-down-function
#'corfu-mouse--scroll-down)
(setq-local corfu-mouse--completion-buffer current-buffer)))
buffer)
(defun corfu-mouse--post-command-set-buffer ()
"Set `corfu-mouse--completion-buffer' the current buffer."
(when corfu-mouse--completion-buffer
(switch-to-buffer corfu-mouse--completion-buffer)))
;;;###autoload
(define-minor-mode corfu-mouse-mode
"Mouse support for Corfu."
:global t :group 'corfu
(let ((scroll-events '(wheel-up wheel-down mouse-4 mouse-5))
(continue-commands '("corfu-mouse--on-mouse-1"
"corfu-mouse--on-mouse-3"
corfu-mouse-mwheel-scroll)))
(cond
(corfu-mouse-mode
(advice-add #'corfu--format-candidates :filter-return
#'corfu-mouse--format-candidates)
(advice-add #'corfu--make-buffer :filter-return
#'corfu-mouse--setup-scrolling)
(advice-add #'corfu--post-command :before
#'corfu-mouse--post-command-set-buffer)
(setq corfu-continue-commands
(append corfu-continue-commands continue-commands))
(dolist (event scroll-events)
(define-key corfu--mouse-ignore-map (vector event)
#'corfu-mouse-mwheel-scroll)))
(t
(advice-remove #'corfu--format-candidates
#'corfu-mouse--format-candidates)
(advice-remove #'corfu--make-buffer
#'corfu-mouse--setup-scrolling)
(advice-remove #'corfu--post-command
#'corfu-mouse--post-command-set-buffer)
(dolist (command continue-commands)
(setq corfu-continue-commands
(delete command corfu-continue-commands)))
(dolist (event scroll-events)
(define-key corfu--mouse-ignore-map (vector event)
#'ignore))))))
(provide 'corfu-mouse)
;;; corfu-mouse.el ends here
+659 -74
View File
@@ -1,95 +1,680 @@
;;; -*- lexical-binding: t; -*-
(setq native-comp-async-report-warnings-errors nil) ;; Prepare
(setq package-enable-at-startup nil) (require 'materus-nix nil t)
(setq frame-inhibit-implied-resize t) (require 'elec-pair)
(defvar materus/init-early nil) (when (not emacs-build-time)
(unless materus/init-early (print "WARN: emacs-build-time not set up, using current time")
(tool-bar-mode -1) (setq emacs-build-time (decode-time (current-time))))
(setq initial-major-mode 'fundamental-mode) (add-to-list 'load-path (concat user-emacs-directory "etc/pkgs/")) ; Extra load path for packages
(setq-default package-quickstart t)
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(setq package-enable-at-startup nil)
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook
(lambda ()
(advice-remove #'tty-run-terminal-initialization #'ignore)
(tty-run-terminal-initialization (selected-frame) nil t)
)
)
)
)
(setq auto-save-list-file-prefix (concat user-emacs-directory "backups/"))
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups/"))))
(require 'telephone-line)
(require 'elcord)
(require 'dashboard)
(require 'minions)
(require 'doom-themes)
;Graphical
(when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t)
)
(setq read-process-output-max (* 1024 1024 3)) (setq read-process-output-max (* 1024 1024 3))
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (or (not (display-graphic-p)) (daemonp)) ;; Elpaca Init
(xterm-mouse-mode 1) (defvar elpaca-installer-version 0.11)
) (defvar elpaca-directory (expand-file-name "var/elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name (concat "builds/" emacs-version "/") elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil :depth 1 :inherit ignore
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (<= emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let* ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
(elpaca elpaca-use-package
(elpaca-use-package-mode)
(setq elpaca-use-package-by-default t))
(defvar materus/nixos-config (getenv "MATERUS_CONFIG_DIR"))
(defvar materus/server-env nil)
(defvar materus/pkgs/vterm-enable nil)
(let ((vars-file (expand-file-name "etc/variables.el" user-emacs-directory)))
(unless (file-exists-p vars-file) (make-empty-file vars-file))
(load vars-file))
;; Use package preffering built-in / nix packages
(defmacro materus/use-package (package &rest body)
(if (locate-library (symbol-name `,package))
`(progn
(cl-pushnew (quote ,package) elpaca-ignored-dependencies)
(use-package ,package :ensure nil ,@body))
`(use-package ,package ,@body)))
(defun materus/--outli-modes ()
"Check if supported mode"
(or (eq major-mode 'nix-mode)
(eq major-mode 'nix-ts-mode)
(eq major-mode 'c-mode)
(eq major-mode 'c-ts-mode)
(eq major-mode 'c++-mode)
(eq major-mode 'c++-ts-mode)))
(defun materus/anchor-outli-headers ()
"Remove whitespaces before outli headers"
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward (concat "^[ ]+\\(" comment-start "\\*+ +[^ ].*\\)[ ]*") nil t)
(replace-match "\\1")))))
(defun materus/--fix-outli-formatting (FORMATTER STATUS)
(materus/anchor-outli-headers)
)
(defun materus/--electric-indent-ignore-outli (char)
"Don't indent outli headers"
(when (materus/--outli-modes)
(save-excursion
(backward-char)
(beginning-of-line)
(if (not (looking-at-p (concat "^\\(" comment-start "\\*+ +[^ ].*\\)[ ]*"))) nil 'no-indent))))
(use-package no-littering
:ensure (:wait t)
:config
(require 'recentf)
(setq package-quickstart-file
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-etc-directory)))
;; Font & Text init
(when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t))
(setq-default cursor-type '(bar . 2))
(setq truncate-string-ellipsis "")
(setq text-mode-ispell-word-completion nil) ; Disable ispell
(global-completion-preview-mode 1)
(electric-pair-mode 1)
(electric-indent-mode -1)
(setq isearch-allow-scroll t) ; Allows scrolling without closing isearch
;; Frame Init
(when (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame) (when (= (length (frame-list)) 2)
(set-frame-parameter frame 'fullscreen 'maximized))
(select-frame-set-input-focus frame) )))
(global-tab-line-mode 1)
(setq tab-line-close-tab-function 'kill-buffer)
(setq window-divider-default-bottom-width 1)
(setq window-divider-default-right-width 1)
(window-divider-mode 1)
(tool-bar-mode -1) (tool-bar-mode -1)
(load-theme 'doom-horizon t) (setq-default display-line-numbers-width 3)
(setq-default display-line-numbers-widen t)
(setq ring-bell-function 'ignore)
(setq-default cursor-type '(bar . 1))
(pixel-scroll-precision-mode 1)
(defun startup-screen-advice (orig-fun &rest args)
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
(apply orig-fun args)))
(advice-add 'display-startup-screen :around #'startup-screen-advice) ; Hide startup screen if started with file
;; Mouse Init
(context-menu-mode 1)
(setq mouse-wheel-follow-mouse 't) (setq mouse-wheel-follow-mouse 't)
(setq scroll-step 1) (setq scroll-step 1)
(setq mouse-drag-and-drop-region t) (setq mouse-drag-and-drop-region t)
(telephone-line-mode 1) (xterm-mouse-mode 1)
(pixel-scroll-precision-mode 1)
(setq-default pixel-scroll-precision-large-scroll-height 10.0) (setq-default pixel-scroll-precision-large-scroll-height 10.0)
(minions-mode 1) (add-to-list 'c-default-style '(awk-mode . "awk"))
(elcord-mode) (add-to-list 'c-default-style '(other . "bsd"))
;Hide startup screen if started with file (setq-default tab-width 4)
(defun startup-screen-advice (orig-fun &rest args) (setq-default indent-tabs-mode nil)
(when (= (seq-count #'buffer-file-name (buffer-list)) 0) (setq-default c-basic-offset 4)
(apply orig-fun args))) (setq-default c-indent-level 4)
(advice-add 'display-startup-screen :around #'startup-screen-advice)
(setq-default c-ts-mode-indent-offset 4)
(setq-default c-ts-mode-indent-style 'bsd)
(setq-default c-hungry-delete-key t)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'prog-mode-hook 'electric-indent-local-mode)
(add-hook 'electric-indent-functions 'materus/--electric-indent-ignore-outli)
(use-package dracula-theme :config
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame (load-theme 'dracula t))))
(load-theme 'dracula t)))
(use-package rainbow-mode
:hook
((org-mode . rainbow-mode)
(prog-mode . rainbow-mode)))
(use-package rainbow-delimiters
:hook
(prog-mode . rainbow-delimiters-mode)
:config
(set-face-attribute 'rainbow-delimiters-depth-1-face nil :foreground "#FFFFFF")
(set-face-attribute 'rainbow-delimiters-depth-2-face nil :foreground "#FFFF00")
(set-face-attribute 'rainbow-delimiters-depth-5-face nil :foreground "#6A5ACD")
(set-face-attribute 'rainbow-delimiters-unmatched-face nil :foreground "#FF0000"))
;Enable dashboard (use-package doom-modeline
(setq dashboard-center-content t) :init (setq doom-modeline-support-imenu t)
(dashboard-setup-startup-hook) :hook (elpaca-after-init . doom-modeline-mode)
:config
(setq doom-modeline-icon t)
(setq doom-modeline-project-detection 'auto)
(setq doom-modeline-height 20)
(setq doom-modeline-enable-word-count t)
(setq doom-modeline-minor-modes t)
(setq display-time-24hr-format t)
(display-time-mode 1)
(column-number-mode 1)
(line-number-mode 1))
(use-package minions
:hook (elpaca-after-init . minions-mode))
(use-package dashboard
:after (nerd-icons projectile)
:config
(setq dashboard-center-content t)
(setq dashboard-display-icons-p t)
(setq dashboard-icon-type 'nerd-icons)
(setq dashboard-projects-backend 'projectile)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(when (or (daemonp) (< (length command-line-args) 2))
(add-hook 'elpaca-after-init-hook #'dashboard-insert-startupify-lists)
(add-hook 'elpaca-after-init-hook #'dashboard-initialize)
(dashboard-setup-startup-hook)))
(when (daemonp) (when (daemonp)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))) ; Show dashboard when emacs is running as daemon)
) (use-package highlight-indent-guides
:hook ((prog-mode . highlight-indent-guides-mode)))
(use-package outli
:ensure (:host github :repo "jdtsmith/outli")
:hook ((prog-mode . outli-mode)))
(use-package visual-replace
:defer t
:bind (("C-r" . visual-replace)
:map isearch-mode-map
("C-r" . visual-replace-from-isearch)))
(use-package eat)
(when (or materus/pkgs/vterm-enable (locate-library (symbol-name 'vterm)))
(materus/use-package vterm))
(use-package orderless
:init
;; Tune the global completion style settings to your liking!
;; This affects the minibuffer and non-lsp completion at point.
(setq completion-styles '(basic partial-completion orderless)
completion-category-defaults nil
completion-category-overrides nil))
(use-package consult)
(use-package marginalia)
(use-package embark)
(use-package embark-consult
:after (embark consult))
(use-package vertico
:ensure t
:after (consult marginalia embark)
:config
(setq completion-in-region-function
(lambda (&rest args)
(apply (if vertico-mode
#'consult-completion-in-region
#'completion--in-region)
args)))
(vertico-mode 1)
(marginalia-mode 1))
(use-package vertico-mouse
:config
(vertico-mouse-mode 1)
:ensure nil
:after (vertico))
(use-package cape)
(use-package corfu
:ensure t
:after (lsp-mode cape)
;; Optional customizations
:custom
(corfu-cycle nil) ;; Enable cycling for `corfu-next/previous'
(corfu-auto t) ;; Enable auto completion
(global-corfu-minibuffer nil)
;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary
;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match
(corfu-preview-current nil) ;; Disable current candidate preview
;; (corfu-preselect 'prompt) ;; Preselect the prompt
;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
;; Enable Corfu only for certain modes. See also `global-corfu-modes'.
;; :hook ((prog-mode . corfu-mode)
;; (shell-mode . corfu-mode)
;; (eshell-mode . corfu-mode))
;; Recommended: Enable Corfu globally. This is recommended since Dabbrev can
;; be used globally (M-/). See also the customization variable
;; `global-corfu-modes' to exclude certain modes.
:init
(global-corfu-mode 1)
(corfu-popupinfo-mode 1)
(corfu-history-mode 1)
(defun materus/orderless-dispatch-flex-first (_pattern index _total)
(and (eq index 0) 'orderless-flex))
(defun materus/lsp-mode-setup-completion ()
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
'(orderless))
;; Optionally configure the first word as flex filtered.
(add-hook 'orderless-style-dispatchers #'materus/orderless-dispatch-flex-first nil 'local)
;; Optionally configure the cape-capf-buster.
(setq-local completion-at-point-functions (list (cape-capf-buster #'lsp-completion-at-point))))
:hook
(lsp-completion-mode . materus/lsp-mode-setup-completion))
(use-package corfu-terminal
:after (corfu)
:config
(when (or (daemonp) (not (display-graphic-p)))
(corfu-terminal-mode)))
;CUA (use-package corfu-mouse
(cua-mode 1) :after (corfu)
(global-set-key (kbd "C-y") 'undo-redo) :ensure (:type git :repo "https://codeberg.org/materus/emacs-corfu-mouse.git")
:config
(corfu-mouse-mode)
(keymap-set corfu--mouse-ignore-map "<mouse-movement>" 'ignore)
(keymap-set corfu-map "<mouse-movement>" 'ignore))
;(define-key key-translation-map [8711] 'event-apply-hyper-modifier ) (use-package kind-icon
;(global-set-key (kbd "C-∇") (kbd "C-H")) :after (corfu)
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207))) :config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
(use-package dirvish
:after (nerd-icons)
:config
(setq dired-mouse-drag-files t)
(dirvish-override-dired-mode 1)
(setq dirvish-attributes
'(vc-state
subtree-state
nerd-icons
collapse
git-msg
file-time
file-size))
)
(use-package treemacs)
(use-package treemacs-projectile
:after (projectile treemacs))
(use-package treemacs-nerd-icons
:after (nerd-icons treemacs))
(use-package treemacs-perspective
:after (treemacs))
(use-package treemacs-mouse-interface
:after (treemacs)
:ensure nil)
(use-package lsp-ui
:after (lsp-mode))
(use-package lsp-mode
;; :custom
;; (lsp-completion-provider :none) ;; we use Corfu!
:config
(setq lsp-keep-workspace-alive nil)
(setq lsp-enable-on-type-formatting nil)
(setq lsp-ui-doc-show-with-mouse nil)
(defun lsp-booster--advice-json-parse (old-fn &rest args)
"Try to parse bytecode instead of json."
(or
(when (equal (following-char) ?#)
(let ((bytecode (read (current-buffer))))
(when (byte-code-function-p bytecode)
(funcall bytecode))))
(apply old-fn args)))
(advice-add (if (progn (require 'json)
(fboundp 'json-parse-buffer))
'json-parse-buffer
'json-read)
:around
#'lsp-booster--advice-json-parse)
(defun lsp-booster--advice-final-command (old-fn cmd &optional test?)
"Prepend emacs-lsp-booster command to lsp CMD."
(let ((orig-result (funcall old-fn cmd test?)))
(if (and (not test?) ; for check lsp-server-present?
(not (file-remote-p default-directory)) ; see lsp-resolve-final-command, it would add extra shell wrapper
lsp-use-plists
(not (functionp 'json-rpc-connection)) ; native json-rpc
(executable-find "emacs-lsp-booster"))
(progn
(when-let* ((command-from-exec-path (executable-find (car orig-result)))) ; resolve command from exec-path (in case not found in $PATH)
(setcar orig-result command-from-exec-path))
(message "Using emacs-lsp-booster for %s!" orig-result)
(cons "emacs-lsp-booster" orig-result))
orig-result)))
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command))
(use-package lsp-treemacs
:after (lsp-mode treemacs)
:config
(lsp-treemacs-sync-mode 0))
(use-package dap-mode
:after (lsp-mode)
:config
(require 'dap-lldb)
(require 'dap-gdb-lldb)
(require 'dap-cpptools)
(setq dap-gdb-lldb-extension-version "0.27.0")
(setq dap-auto-configure-features '(sessions locals breakpoints controls))
(dap-auto-configure-mode 1))
(use-package format-all
:hook ((prog-mode . format-all-mode))
:config
(defun format-all--buffer-from-hook () nil) ; I don't want formatting on save
(add-hook 'format-all-after-format-functions 'materus/--fix-outli-formatting)
(setq-default format-all-formatters
'(("Nix" (nixfmt))
("C++" (clang-format "--fallback-style=microsoft"))
("C" (clang-format "--fallback-style=microsoft")))))
(use-package yasnippet
:config
(yas-global-mode 1))
(use-package lsp-clangd
:ensure nil
:after (lsp-mode)
:config
(setq lsp-clients-clangd-args '("--fallback-style=microsoft"))
(add-hook 'c-mode-hook 'lsp-deferred)
(add-hook 'c-mode-hook 'display-line-numbers-mode)
(add-hook 'c-ts-mode-hook 'lsp-deferred)
(add-hook 'c-ts-mode-hook 'display-line-numbers-mode)
(add-hook 'c++-mode-hook 'lsp-deferred)
(add-hook 'c++-mode-hook 'display-line-numbers-mode)
(add-hook 'c++-ts-mode-hook 'lsp-deferred)
(add-hook 'c++-ts-mode-hook 'display-line-numbers-mode)
(when (treesit-language-available-p 'c) (push '(c-mode . c-ts-mode) major-mode-remap-alist))
(when (treesit-language-available-p 'cpp) (push '(c++-mode . c++-ts-mode) major-mode-remap-alist))
(add-to-list 'c-default-style '(c-mode . "bsd"))
(add-to-list 'c-default-style '(c++-mode . "bsd"))
(add-to-list 'c-default-style '(c-ts-mode . "bsd"))
(add-to-list 'c-default-style '(c++-ts-mode . "bsd")))
(use-package lsp-java
:after (lsp-mode)
:config
(setq lsp-java-vmargs '("-XX:+UseParallelGC" "-XX:GCTimeRatio=4" "-XX:AdaptiveSizePolicyWeight=90" "-Dsun.zip.disableMemoryMapping=true" "-Xmx4G" "-Xms512m"))
;;(add-hook 'java-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
(add-hook 'java-mode-hook #'lsp)
(add-hook 'java-mode-hook #'display-line-numbers-mode)
(add-hook 'java-mode-hook #'lsp-lens-mode)
(add-hook 'java-mode-hook #'lsp-java-boot-lens-mode)
;;(add-hook 'java-ts-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
(add-hook 'java-ts-mode-hook #'lsp)
(add-hook 'java-ts-mode-hook #'display-line-numbers-mode)
(add-hook 'java-ts-mode-hook #'lsp-lens-mode)
(add-hook 'java-ts-mode-hook #'lsp-java-boot-lens-mode)
(when (treesit-language-available-p 'java) (push '(java-mode . java-ts-mode) major-mode-remap-alist))
(add-to-list 'c-default-style '(java-mode . "java"))
(add-to-list 'c-default-style '(java-ts-mode . "java")))
(use-package lsp-pyright
:after (lsp-mode)
:if (executable-find "python")
:config
(setq lsp-pyright-langserver-command "pyright")
(add-hook 'python-mode-hook 'lsp-deferred)
(add-hook 'python-ts-mode-hook 'lsp-deferred)
(when (treesit-language-available-p 'python) (push '(python-mode . python-ts-mode) major-mode-remap-alist)))
(use-package nix-mode
:config
(advice-add 'nix-format-buffer :after #'materus/anchor-outli-headers))
(use-package nix-ts-mode)
(use-package lsp-nix
:after (lsp-mode nix-mode nix-ts-mode format-all)
:ensure nil
:config
(add-to-list 'lsp-disabled-clients '(nix-mode . nix-nil))
(setq lsp-nix-nixd-server-path "nixd")
(when (executable-find "nixfmt")
(setq lsp-nix-nixd-formatting-command [ "nixfmt" ]))
(unless lsp-nix-nixd-nixos-options-expr
(setq lsp-nix-nixd-nixos-options-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".options")))
(unless lsp-nix-nixd-nixpkgs-expr
(setq lsp-nix-nixd-nixpkgs-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".pkgs")))
(add-hook 'nix-mode-hook 'lsp-deferred)
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
(add-hook 'nix-ts-mode-hook 'lsp-deferred)
(add-hook 'nix-ts-mode-hook 'display-line-numbers-mode)
(when (treesit-language-available-p 'nix) (push '(nix-mode . nix-ts-mode) major-mode-remap-alist)))
(use-package paredit)
(use-package sly
:if (executable-find "sbcl")
:config
(setq inferior-lisp-program "sbcl"))
(use-package bash-completion)
(use-package diff-hl
:config
(setq diff-hl-side 'right)
(global-diff-hl-mode 1)
(diff-hl-margin-mode 1)
(diff-hl-flydiff-mode 1)
(global-diff-hl-show-hunk-mouse-mode 1))
(use-package magit
:after (transient))
(use-package git-timemachine
:defer t)
(use-package org
:mode (("\\.org$" . org-mode))
:hook
((org-mode . org-indent-mode)
(org-mode . display-line-numbers-mode)
)
:config
(require 'org-mouse)
(require 'org-tempo)
(setq org-src-window-setup 'current-window)
(setq org-latex-pdf-process '("latexmk -xelatex -quiet -shell-escape -f -output-directory=%o %f"))
(org-babel-do-load-languages
'org-babel-load-languages
'((latex . t)
(emacs-lisp . t)
(shell . t)
(css . t)
(C . t)
(calc . t)
(awk . t)
(sql . t)
(sqlite . t)))
(add-hook 'org-mode-hook (lambda ()
(setq-local
electric-pair-inhibit-predicate
`(lambda (c)
(if
(char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
(use-package org-modern
:after (org)
:hook
(org-indent-mode . org-modern-mode)
(org-agenda-finalize . org-modern-agenda)
:config
(setq org-modern-block-name '("" . "")))
(use-package org-auto-tangle
:after (org)
:hook (org-mode . org-auto-tangle-mode)
)
(use-package toc-org
:after (org)
:hook
((org-mode . toc-org-mode )
(markdown-mode . toc-org-mode)))
(use-package org-transclusion
:after (org))
(use-package org-roam
:after (org))
(use-package undo-tree
:config
(global-undo-tree-mode 1)
(defvar materus/undo-tree-dir (concat user-emacs-directory "var/undo-tree/"))
(unless (file-exists-p materus/undo-tree-dir)
(make-directory materus/undo-tree-dir t))
(setq undo-tree-visualizer-diff t)
(setq undo-tree-history-directory-alist `(("." . ,materus/undo-tree-dir )))
(setq undo-tree-visualizer-timestamps t))
(use-package which-key
:config
(which-key-mode 1))
(use-package projectile
:config (projectile-mode 1))
(use-package perspective
:config
(setq persp-mode-prefix-key (kbd "C-c M-p"))
(setq persp-modestring-short t)
(persp-mode 1)
)
(use-package elcord
:if (not materus/server-env)
:config
(defun materus/elcord-toggle (&optional _frame)
"Toggle elcord based on visible frames"
(if (> (length (frame-list)) 1)
(elcord-mode 1)
(elcord-mode -1))
)
(unless (daemonp) (elcord-mode 1))
(add-hook 'after-delete-frame-functions 'materus/elcord-toggle)
(add-hook 'server-after-make-frame-hook 'materus/elcord-toggle))
(use-package drag-stuff)
(use-package popper)
(use-package visual-fill-column)
(use-package so-long
:defer t)
(use-package vlf
:defer t)
(use-package crux)
(use-package nerd-icons)
(use-package svg-lib)
(use-package transient)
;; Keybindings
(defun materus/keybind-set ()
(require 'cua-base)
;; CUA-like global
(define-key global-map (kbd "C-s") 'save-buffer)
(define-key global-map (kbd "C-a") 'mark-whole-buffer)
(define-key global-map (kbd "C-f") 'isearch-forward)
(define-key global-map (kbd "C-S-f") 'isearch-backward)
(define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward)
(define-key isearch-mode-map (kbd "C-S-f") 'isearch-repeat-backward)
;; CUA
(define-key cua--cua-keys-keymap (kbd "C-z") 'undo-tree-undo)
(define-key cua--cua-keys-keymap (kbd "C-y") 'undo-tree-redo)
(define-key cua-global-keymap (kbd "C-SPC") 'completion-at-point)
(define-key cua-global-keymap (kbd "C-M-SPC") 'cua-set-mark)
(cua-mode 1)
;; TAB
(define-key global-map (kbd "C-<iso-lefttab>") #'indent-rigidly-left)
(define-key global-map (kbd "C-<tab>") #'indent-rigidly-right)
;; Hyper
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "") 'event-apply-hyper-modifier )
;; Unbind
(define-key isearch-mode-map (kbd "C-s") nil)
(define-key isearch-mode-map (kbd "C-r") nil)
;; Dashboard
(define-key dashboard-mode-map (kbd "C-r") #'dashboard-refresh-buffer)
;; Eat
(defvar cua--eat-semi-char-keymap (copy-keymap cua--cua-keys-keymap) "EAT semi-char mode CUA keymap")
(defvar cua--eat-char-keymap (copy-keymap cua--cua-keys-keymap) "EAT char mode CUA keymap")
(define-key cua--eat-semi-char-keymap (kbd "C-v") #'eat-yank)
(define-key cua--eat-char-keymap (kbd "C-S-v") #'eat-yank)
(define-key cua--eat-semi-char-keymap (kbd "C-c") #'copy-region-as-kill)
(define-key cua--eat-char-keymap (kbd "C-S-c") #'copy-region-as-kill)
(define-key eat-mode-map (kbd "C-<right>") #'eat-self-input)
(define-key eat-mode-map (kbd "C-<left>") #'eat-self-input)
(defun cua--eat-semi-char-override-keymap ()
(setq-local cua--keymap-alist (copy-tree cua--keymap-alist))
(setf (alist-get 'cua--ena-cua-keys-keymap cua--keymap-alist) cua--eat-semi-char-keymap))
(defun cua--eat-char-override-keymap ()
(setq-local cua--keymap-alist (copy-tree cua--keymap-alist))
(setf (alist-get 'cua--ena-cua-keys-keymap cua--keymap-alist) cua--eat-char-keymap))
(advice-add 'eat-semi-char-mode :after #'cua--eat-semi-char-override-keymap)
(advice-add 'eat-char-mode :after #'cua--eat-char-override-keymap)
(add-hook 'eat-char-mode-hook #'cua--eat-char-override-keymap)
;; Treemacs
(define-key global-map (kbd "C-H-t") 'treemacs))
(add-hook 'elpaca-after-init-hook #'materus/keybind-set )
;; Custom File
(add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'noerror)))
-33
View File
@@ -1,33 +0,0 @@
(defvar materus/nix-packages nil)
(when (not materus/nix-packages)
(message "Not using config from nix packages, using straight")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(declare-function straight-use-package "straight" (&optional ARG))
(straight-use-package 'load-relative)
(straight-use-package 'use-package)
(straight-use-package 'telephone-line)
(straight-use-package 'elcord)
(straight-use-package 'dashboard)
(straight-use-package 'minions)
(straight-use-package 'lsp-mode)
(straight-use-package 'lsp-ui)
(straight-use-package 'moe-theme)
(straight-use-package 'doom-themes)
)
@@ -0,0 +1,114 @@
keyboard "Domyślny (XFree 4) - materus"
key Clear+KeyPad : "\E[E"
key Space+Ctrl : "\x00"
key Backspace+Ctrl : "\b"
key Backspace-Ctrl : "\x7f"
key F8+AnyModifier : "\E[19;*~"
key F8-AnyModifier : "\E[19~"
key Enter-NewLine : "\r"
key Enter+NewLine : "\r\n"
key Return+Shift : "\EOM"
key Return-Shift+NewLine : "\r\n"
key Return-Shift-NewLine : "\r"
key PgUp+Shift+Ctrl-AppScreen : ScrollPromptUp
key PgUp+Shift-Ctrl-AppScreen : ScrollPageUp
key PgUp+Shift+AppScreen : "\E[5;*~"
key PgUp-Shift+AnyModifier : "\E[5;*~"
key PgUp-Shift-AnyModifier : "\E[5~"
key PgUp-Shift+KeyPad : "\E[5~"
key Esc : "\E"
key Tab+Ctrl-Ansi : "\t"
key Tab+Ctrl+Ansi : "\E[27;5;9~"
key Tab+Shift-Ansi : "\t"
key Tab+Shift+Ansi : "\E[Z"
key Tab-Shift : "\t"
key F6+AnyModifier : "\E[17;*~"
key F6-AnyModifier : "\E[17~"
key Down+Shift-Ctrl-Alt-AppScreen : ScrollLineDown
key Down-Shift+KeyPad+Ansi-AppCursorKeys : "\E[B"
key Down-Shift+KeyPad+Ansi+AppCursorKeys : "\EOB"
key Down+Shift+Ctrl-AppScreen : "\E[1;*B"
key Down+Shift+Alt-AppScreen : "\E[1;*B"
key Down+Shift+AppScreen : "\E[1;*B"
key Down-Shift+Ansi+AnyModifier : "\E[1;*B"
key Down-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[B"
key Down-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOB"
key Down-Shift-Ansi : "\EB"
key Up+Shift-Ctrl-Alt-AppScreen : ScrollLineUp
key Up-Shift+KeyPad+Ansi-AppCursorKeys : "\E[A"
key Up-Shift+KeyPad+Ansi+AppCursorKeys : "\EOA"
key Up+Shift+Ctrl-AppScreen : "\E[1;*A"
key Up+Shift+Alt-AppScreen : "\E[1;*A"
key Up+Shift+AppScreen : "\E[1;*A"
key Up-Shift+Ansi+AnyModifier : "\E[1;*A"
key Up-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[A"
key Up-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOA"
key Up-Shift-Ansi : "\EA"
key F10+AnyModifier : "\E[21;*~"
key F10-AnyModifier : "\E[21~"
key Left-Shift+KeyPad+Ansi-AppCursorKeys : "\E[D"
key Left-Shift+KeyPad+Ansi+AppCursorKeys : "\EOD"
key Left+Shift+Ctrl-AppScreen : "\E[1;*D"
key Left+Shift+Alt-AppScreen : "\E[1;*D"
key Left+Shift+AppScreen : "\E[1;*D"
key Left-Shift+Ansi+AnyModifier : "\E[1;*D"
key Left-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[D"
key Left-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOD"
key Left-Shift-Ansi : "\ED"
key F5+AnyModifier : "\E[15;*~"
key F5-AnyModifier : "\E[15~"
key F9+AnyModifier : "\E[20;*~"
key F9-AnyModifier : "\E[20~"
key F1+AnyModifier : "\EO*P"
key F1-AnyModifier : "\EOP"
key F12+AnyModifier : "\E[24;*~"
key F12-AnyModifier : "\E[24~"
key Right-Shift+KeyPad+Ansi-AppCursorKeys : "\E[C"
key Right-Shift+KeyPad+Ansi+AppCursorKeys : "\EOC"
key Right+Shift+Ctrl-AppScreen : "\E[1;*C"
key Right+Shift+Alt-AppScreen : "\E[1;*C"
key Right+Shift+AppScreen : "\E[1;*C"
key Right-Shift+Ansi+AnyModifier : "\E[1;*C"
key Right-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[C"
key Right-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOC"
key Right-Shift-Ansi : "\EC"
key F4+AnyModifier : "\EO*S"
key F4-AnyModifier : "\EOS"
key F11+AnyModifier : "\E[23;*~"
key F11-AnyModifier : "\E[23~"
key Home+Shift-AppScreen : ScrollUpToTop
key Home+AnyModifier : "\E[1;*H"
key Home+AppCursorKeys-AnyModifier : "\EOH"
key Home-AppCursorKeys-AnyModifier : "\E[H"
key Home+KeyPad-AppCursorKeys : "\E[H"
key Home+KeyPad+AppCursorKeys : "\EOH"
key F7+AnyModifier : "\E[18;*~"
key F7-AnyModifier : "\E[18~"
key End+Shift-AppScreen : ScrollDownToBottom
key End+AnyModifier : "\E[1;*F"
key End+AppCursorKeys-AnyModifier : "\EOF"
key End-AppCursorKeys-AnyModifier : "\E[F"
key End+KeyPad-AppCursorKeys : "\E[F"
key End+KeyPad+AppCursorKeys : "\EOF"
key F2+AnyModifier : "\EO*Q"
key F2-AnyModifier : "\EOQ"
key F3+AnyModifier : "\EO*R"
key F3-AnyModifier : "\EOR"
key Backtab+Ctrl-Ansi : "\t"
key Backtab+Ctrl+Ansi : "\E[27;6;9~"
key Backtab-Ansi : "\t"
key Backtab+Ansi : "\E[Z"
key PgDown+Shift+Ctrl-AppScreen : ScrollPromptDown
key PgDown+Shift-Ctrl-AppScreen : ScrollPageDown
key PgDown+Shift+AppScreen : "\E[6;*~"
key PgDown-Shift+AnyModifier : "\E[6;*~"
key PgDown-Shift-AnyModifier : "\E[6~"
key PgDown-Shift+KeyPad : "\E[6~"
key Del+AnyModifier : "\E[3;*~"
key Del-AnyModifier : "\E[3~"
key Del+KeyPad : "\E[3~"
key Ins+AnyModifier : "\E[2;*~"
key Ins-AnyModifier : "\E[2~"
key Ins+KeyPad : "\E[2~"
key Calculator : "\xe2\x88\x87"
+50
View File
@@ -0,0 +1,50 @@
#/usr/bin/env bash
IFS=$'\n'
nix build nixpkgs\#imagemagick --no-link
CONVERT="$(nix eval nixpkgs\#imagemagick.outPath | tr -d '"')/bin/magick"
convert_cmd () {
if ! command -v magick &> /dev/null; then $CONVERT "$@"; else convert "$@"; fi
}
function max16 {
while [ `jobs | wc -l` -ge 16 ]
do
sleep 2
done
}
change_to_webp() {
f="$1"
file="${f%.*}"
file_webp="${file}.webp"
echo "Trying to convert to $file_webp"
if convert_cmd "$f" -define webp:thread-level=1 -define webp:method=6 -quality 99 "$file_webp"; then
if touch -r "$f" "$file_webp"; then
rm "$f"
echo "Finished converting $f"
else
echo "Failed to set old date to new file"
exit 1
fi
else
echo "Failed to convert $f"
exit 1;
fi
}
pushd $XDG_PICTURES_DIR
for f in `find "." \( -name "*.png" -type f -o -name "*.jpg" -type f -o -name "*.jpeg" -type f -o -name "*.avif" -type f \) \
-a -not \( -path "./Inne/Special/*" -o -path "./Inne/Emojis/*" -o -path "./Inne/MCSkins/*" -o -path "./Avatar/*" -o -path "./Inne/GIF/*" \)`;
do
max16; change_to_webp "$f" &
done
for job in `jobs -p`
do
echo "Waiting for: $job"
wait $job || let "FAIL+=1"
done
popd
Generated
+483 -164
View File
@@ -5,11 +5,11 @@
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
}, },
"locked": { "locked": {
"lastModified": 1709025227, "lastModified": 1755819240,
"narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=", "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "base16.nix", "repo": "base16.nix",
"rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764", "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -24,11 +24,11 @@
"fromYaml": "fromYaml_2" "fromYaml": "fromYaml_2"
}, },
"locked": { "locked": {
"lastModified": 1709025227, "lastModified": 1755819240,
"narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=", "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "base16.nix", "repo": "base16.nix",
"rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764", "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -46,20 +46,22 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"git-agecrypt": "git-agecrypt", "git-agecrypt": "git-agecrypt",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixerus": "nixerus", "nixerus": "nixerus",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nur": "nur_2", "nur": "nur_2",
"plasma-manager": "plasma-manager",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
}, },
"locked": { "locked": {
"lastModified": 1709405283, "lastModified": 1730405317,
"narHash": "sha256-x5B2/Yp+80kJh/thzqIb61jFQk3zg92N0VO+unEN2po=", "narHash": "sha256-+0BfujrFEGC8xJD2rNwFslMjnrE89TXyDDUCVLCet5k=",
"owner": "materusPL", "owner": "materusPL",
"repo": "nixos-config", "repo": "nixos-config",
"rev": "ac5447eff2d074e1937908738e56741d4cb6a426", "rev": "a7421ce7dd63f27c2118be2eaf41e38402f959a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,20 +81,22 @@
"home-manager": [ "home-manager": [
"hm-stable" "hm-stable"
], ],
"nix-vscode-extensions": "nix-vscode-extensions_2",
"nixerus": "nixerus_2", "nixerus": "nixerus_2",
"nixos-hardware": "nixos-hardware_2", "nixos-hardware": "nixos-hardware_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs-stable" "nixpkgs-stable"
], ],
"nur": "nur_4", "nur": "nur_4",
"plasma-manager": "plasma-manager_2",
"sops-nix": "sops-nix_2" "sops-nix": "sops-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1709405283, "lastModified": 1730405317,
"narHash": "sha256-x5B2/Yp+80kJh/thzqIb61jFQk3zg92N0VO+unEN2po=", "narHash": "sha256-+0BfujrFEGC8xJD2rNwFslMjnrE89TXyDDUCVLCet5k=",
"owner": "materusPL", "owner": "materusPL",
"repo": "nixos-config", "repo": "nixos-config",
"rev": "ac5447eff2d074e1937908738e56741d4cb6a426", "rev": "a7421ce7dd63f27c2118be2eaf41e38402f959a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -104,21 +108,17 @@
}, },
"devshell": { "devshell": {
"inputs": { "inputs": {
"flake-utils": [
"configInputs",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"configInputs", "configInputs",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1713532798, "lastModified": 1741473158,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -130,21 +130,17 @@
}, },
"devshell_2": { "devshell_2": {
"inputs": { "inputs": {
"flake-utils": [
"configInputs-stable",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"configInputs-stable", "configInputs-stable",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1713532798, "lastModified": 1741473158,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,10 +152,6 @@
}, },
"emacs-overlay": { "emacs-overlay": {
"inputs": { "inputs": {
"flake-utils": [
"configInputs",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"configInputs", "configInputs",
"nixpkgs" "nixpkgs"
@@ -167,11 +159,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1713517520, "lastModified": 1759739185,
"narHash": "sha256-t59lpRo7EulX9J0/bc5/8cUEo7hl6z9YOYukzg54cyU=", "narHash": "sha256-mO3kaYc+xdbwf8roqexsKq1ocQCQsZzFha0fIJMbRRw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "a8692d4e570e93061d2bbe10af4a1590afe82e15", "rev": "722d8e6f96a0fd1dcf3d49a1f2dc38aec8c4039d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -183,22 +175,18 @@
}, },
"emacs-overlay_2": { "emacs-overlay_2": {
"inputs": { "inputs": {
"flake-utils": [
"configInputs-stable",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"configInputs-stable", "configInputs-stable",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_3" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1713517520, "lastModified": 1759739185,
"narHash": "sha256-t59lpRo7EulX9J0/bc5/8cUEo7hl6z9YOYukzg54cyU=", "narHash": "sha256-mO3kaYc+xdbwf8roqexsKq1ocQCQsZzFha0fIJMbRRw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "a8692d4e570e93061d2bbe10af4a1590afe82e15", "rev": "722d8e6f96a0fd1dcf3d49a1f2dc38aec8c4039d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -208,16 +196,127 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"configInputs",
"nixerus",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"configInputs",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"configInputs-stable",
"nixerus",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"configInputs-stable",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -232,11 +331,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -249,11 +348,11 @@
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689549921, "lastModified": 1731966426,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "fromYaml", "repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", "rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -265,11 +364,11 @@
"fromYaml_2": { "fromYaml_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689549921, "lastModified": 1731966426,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "fromYaml", "repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", "rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -337,16 +436,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712386041, "lastModified": 1758463745,
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=", "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff", "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11", "ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -359,11 +458,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713539802, "lastModified": 1759756027,
"narHash": "sha256-aub7mcsDv5J6PcYNxcLUCIaNGNlInPCAYYoCA1x76oY=", "narHash": "sha256-wcRWJgk0DNWjmJjLtfkoTYy/1sMIVQZp8Kqn6upIGoM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1f305c363ecd7c6505f03fc7baba15505f3aa630", "rev": "ed10023224107dc8479ead95a448d66f046785e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -375,20 +474,73 @@
}, },
"home-manager_2": { "home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1712317700, "lastModified": 1759756027,
"narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=", "narHash": "sha256-wcRWJgk0DNWjmJjLtfkoTYy/1sMIVQZp8Kqn6upIGoM=",
"path": "/nix/store/6kq2krynx50y7ws18xhpljn5rjzk37ps-source", "owner": "nix-community",
"rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f", "repo": "home-manager",
"type": "path" "rev": "ed10023224107dc8479ead95a448d66f046785e0",
"type": "github"
}, },
"original": { "original": {
"id": "home-manager", "id": "home-manager",
"type": "indirect" "type": "indirect"
} }
}, },
"nix-vscode-extensions": {
"inputs": {
"flake-utils": [
"configInputs",
"flake-utils"
],
"nixpkgs": [
"configInputs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1759715292,
"narHash": "sha256-x6Z+bHpF6qQuBiI8mHNo1eBZwk4encZe5eCn5OtbOMI=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "1f6a9062a119b04c607ae291fb058011b19ac047",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"nix-vscode-extensions_2": {
"inputs": {
"flake-utils": [
"configInputs-stable",
"flake-utils"
],
"nixpkgs": [
"configInputs-stable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1759715292,
"narHash": "sha256-x6Z+bHpF6qQuBiI8mHNo1eBZwk4encZe5eCn5OtbOMI=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "1f6a9062a119b04c607ae291fb058011b19ac047",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"nixerus": { "nixerus": {
"inputs": { "inputs": {
"home-manager": [ "home-manager": [
@@ -402,11 +554,11 @@
"nur": "nur" "nur": "nur"
}, },
"locked": { "locked": {
"lastModified": 1712344538, "lastModified": 1756146915,
"narHash": "sha256-Cg9tOeingv0tPUnENdlxfsoWLuZfYUjFgFjrG5+P1js=", "narHash": "sha256-kzqvt4h0nzmm+KnFWmQ4PWDn430FHDLYhE2j3MOt6X0=",
"owner": "materusPL", "owner": "materusPL",
"repo": "Nixerus", "repo": "Nixerus",
"rev": "14e31ce7591aae41102c8e417f3f0fb02700c126", "rev": "7071878ada9d4ec712f8b99a841d6ee641ac97cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -429,11 +581,11 @@
"nur": "nur_3" "nur": "nur_3"
}, },
"locked": { "locked": {
"lastModified": 1712344538, "lastModified": 1756146915,
"narHash": "sha256-Cg9tOeingv0tPUnENdlxfsoWLuZfYUjFgFjrG5+P1js=", "narHash": "sha256-kzqvt4h0nzmm+KnFWmQ4PWDn430FHDLYhE2j3MOt6X0=",
"owner": "materusPL", "owner": "materusPL",
"repo": "Nixerus", "repo": "Nixerus",
"rev": "14e31ce7591aae41102c8e417f3f0fb02700c126", "rev": "7071878ada9d4ec712f8b99a841d6ee641ac97cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -445,11 +597,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1713521961, "lastModified": 1759582739,
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", "narHash": "sha256-spZegilADH0q5OngM86u6NmXxduCNv5eX9vCiUPhOYc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", "rev": "3441b5242af7577230a78ffb03542add264179ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -461,11 +613,11 @@
}, },
"nixos-hardware_2": { "nixos-hardware_2": {
"locked": { "locked": {
"lastModified": 1713521961, "lastModified": 1759582739,
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", "narHash": "sha256-spZegilADH0q5OngM86u6NmXxduCNv5eX9vCiUPhOYc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", "rev": "3441b5242af7577230a78ffb03542add264179ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -477,15 +629,15 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711703276, "lastModified": 1755615617,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@@ -493,91 +645,107 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1713344939, "lastModified": 1759580034,
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=", "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd", "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1713434076, "lastModified": 1759580034,
"narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=", "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c", "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-23.11", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_3": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1713344939, "lastModified": 1759580034,
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=", "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd", "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_4": {
"locked": {
"lastModified": 1713434076,
"narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_5": {
"locked": {
"lastModified": 1713344939,
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1713297878, "lastModified": 1741173522,
"narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", "narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1741173522,
"narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -587,13 +755,50 @@
"type": "github" "type": "github"
} }
}, },
"nur": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1711043201, "lastModified": 1759381078,
"narHash": "sha256-jxx3+oFnKKtL26uq3vlHxbWmS3kqif2F6CVErMMzy3w=", "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"path": "/nix/store/sr2qvyjjrp7d3qmdqj9141b97hyg8gd2-source", "owner": "NixOS",
"rev": "ef102b2c8fa81a28f1da791930042696cafd6bda", "repo": "nixpkgs",
"type": "path" "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1756145408,
"narHash": "sha256-ltkbs5Watrq+V2l9hWefSdM7cfvxLkabtMJeZn0MiCo=",
"owner": "nix-community",
"repo": "NUR",
"rev": "c9c985b60eb46d97370f7d3fefdc300b953c044d",
"type": "github"
}, },
"original": { "original": {
"id": "nur", "id": "nur",
@@ -601,12 +806,17 @@
} }
}, },
"nur_2": { "nur_2": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": { "locked": {
"lastModified": 1713540396, "lastModified": 1753980880,
"narHash": "sha256-mc9hP0I2K2I23fx0py4bp6k28liXgBRilVQRc5hb3LU=", "narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e16ee8a64f1ab6bfbd54f24985141a0bd1243c29", "rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -617,12 +827,17 @@
} }
}, },
"nur_3": { "nur_3": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_3"
},
"locked": { "locked": {
"lastModified": 1711043201, "lastModified": 1756145408,
"narHash": "sha256-jxx3+oFnKKtL26uq3vlHxbWmS3kqif2F6CVErMMzy3w=", "narHash": "sha256-ltkbs5Watrq+V2l9hWefSdM7cfvxLkabtMJeZn0MiCo=",
"path": "/nix/store/sr2qvyjjrp7d3qmdqj9141b97hyg8gd2-source", "owner": "nix-community",
"rev": "ef102b2c8fa81a28f1da791930042696cafd6bda", "repo": "NUR",
"type": "path" "rev": "c9c985b60eb46d97370f7d3fefdc300b953c044d",
"type": "github"
}, },
"original": { "original": {
"id": "nur", "id": "nur",
@@ -630,12 +845,17 @@
} }
}, },
"nur_4": { "nur_4": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_4",
"treefmt-nix": "treefmt-nix_2"
},
"locked": { "locked": {
"lastModified": 1713540396, "lastModified": 1753980880,
"narHash": "sha256-mc9hP0I2K2I23fx0py4bp6k28liXgBRilVQRc5hb3LU=", "narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e16ee8a64f1ab6bfbd54f24985141a0bd1243c29", "rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -646,18 +866,75 @@
} }
}, },
"nur_5": { "nur_5": {
"inputs": {
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_7"
},
"locked": { "locked": {
"lastModified": 1712342638, "lastModified": 1759755583,
"narHash": "sha256-0yvbIJSRMh09d3BEySpbC+ZNHV7o+nlLH9emLxB6Uq4=", "narHash": "sha256-ZY0EZTqlb3RwCEolM6d7S1ccVhay8GsXF9V2yLbdCmo=",
"path": "/nix/store/v54rd44np54b7ka6vsz92vrwnq7bi5gi-source", "owner": "nix-community",
"rev": "08506b97dda7b6e5b483885d7bb0f5e6bfdc9b57", "repo": "NUR",
"type": "path" "rev": "58e23a2765d244dd4283f8f25c3a1b9a8f06417a",
"type": "github"
}, },
"original": { "original": {
"id": "nur", "id": "nur",
"type": "indirect" "type": "indirect"
} }
}, },
"plasma-manager": {
"inputs": {
"home-manager": [
"configInputs",
"home-manager"
],
"nixpkgs": [
"configInputs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1759321049,
"narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "trunk",
"repo": "plasma-manager",
"type": "github"
}
},
"plasma-manager_2": {
"inputs": {
"home-manager": [
"configInputs-stable",
"home-manager"
],
"nixpkgs": [
"configInputs-stable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1759321049,
"narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "trunk",
"repo": "plasma-manager",
"type": "github"
}
},
"private": { "private": {
"locked": { "locked": {
"lastModified": 1684365822, "lastModified": 1684365822,
@@ -680,8 +957,8 @@
"configInputs-stable": "configInputs-stable", "configInputs-stable": "configInputs-stable",
"hm-stable": "hm-stable", "hm-stable": "hm-stable",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_5", "nixpkgs-stable": "nixpkgs-stable_3",
"nur": "nur_5", "nur": "nur_5",
"private": "private" "private": "private"
} }
@@ -691,15 +968,14 @@
"nixpkgs": [ "nixpkgs": [
"configInputs", "configInputs",
"nixpkgs" "nixpkgs"
], ]
"nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1713532771, "lastModified": 1759635238,
"narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=", "narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "a929a011a09db735abc45a8a45d1ff7fdee62755", "rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -714,15 +990,14 @@
"nixpkgs": [ "nixpkgs": [
"configInputs-stable", "configInputs-stable",
"nixpkgs" "nixpkgs"
], ]
"nixpkgs-stable": "nixpkgs-stable_4"
}, },
"locked": { "locked": {
"lastModified": 1713532771, "lastModified": 1759635238,
"narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=", "narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "a929a011a09db735abc45a8a45d1ff7fdee62755", "rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -761,6 +1036,50 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"configInputs",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"configInputs-stable",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",
+2 -2
View File
@@ -29,14 +29,14 @@
type = "github"; type = "github";
owner = "NixOS"; owner = "NixOS";
repo = "nixpkgs"; repo = "nixpkgs";
ref = "nixos-23.11"; ref = "nixos-25.05";
}; };
hm-stable = { hm-stable = {
type = "github"; type = "github";
owner = "nix-community"; owner = "nix-community";
repo = "home-manager"; repo = "home-manager";
ref = "release-23.11"; ref = "release-25.05";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };