From 453181fa67997d746af3e51cd5fc0c4887b0eae0 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 25 Nov 2023 12:11:47 +0100 Subject: [PATCH 1/7] make server work with nixos 23.11 --- secrets/github-runner-pw.age | Bin 658 -> 685 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/secrets/github-runner-pw.age b/secrets/github-runner-pw.age index 793ffa190fd023ed6ae6c180238d6fc1cf3b1b2c..a59a99ea92e0fed1dce55d1a6bba20a4b69ac609 100644 GIT binary patch delta 632 zcmbQlx|VfQj&9UR7O;!qg%E~SyEb+e^QW_v3sPeX=GH9X<1R8i$!5r zF;{6oX+eH*exA9ZxwEUAiN1bth;O1}Rg!6$kzshMN0Oy!l(SnwWolW41(&X!LUD11 zZfc5=si~o*f@heqOLm|_u7P`qkBgt9QBF}_Sx8!Clv_|iaax+YMM`GAPk3s$b3}+i zxsi9NW2JjCS7Eq$Mnq;>cAB4A^K9(k_{;6eY>BY_=ZmuAY_;}{mDaY%k7o{c^ zrz%8erg$2~1{o>T7T7yS=PCp#ct^TuDAt>(>T*?-nwa}q1Y|{7_8W`l6q!pRE8Ks$*LMFST`=m!kgqMcpgePS(#I>t0-XEcI89+3|Gs=K9$F>6PsNH7@y`(PjJi?y!1x zmzG4i=$DQq39;vLRa~F-`j|YN@Jnp5srpUbU+-)W|MPVG$a5vZZbsSLY3Cj}l$&&@ Tz5dbsCikG`YKvm|6Za$lPJ-g< delta 605 zcmZ3>I*E0HPQ9a#TZ)lUNvV6NbGb*VNl>^)S&%`fS&*M|m`9phrJ-?fWmIITnTtV? z372bCN>Zq~OQm;yxQjtfg|}g7WV(l!d!=PSpk<}8uW@;Czr0BLUD11 zZfc5=si~o*f@heqOLm}wfp4XLsB?Luk)NkWc~P)`kXxd+Z(^E%Vr8VKYoJk3o=>Q^ ziBZ0BUTS4FmuFU%e|n`yvU#ARYl)GcV^nBRo5rN+R#%A80Nq&imfvzBr1P6E-Wn}557o{c^ zrz%wGd*8%R=9;bnw5o_`z2YFB&E4{7x;5|83dV^8(F&e6{eYFDzd1v?+ zl^dH!nfrUYC3$*!>6>Tx=%@OY2IZ9a=Q(CpI(i#9dAdfVS(-(d6nO-5MLKfn>elNj zIAxe+7X|y|Cza%+MTU4Acqd1CmxTN1CzTYLn46incqIjvrDha68F+hgeckrgJ*B2$ zt??dK%PkUHp5~od(97Vf_KUUB{B_*vF!SRU4lb*_ayu+7mMBk2*%W77K1T=Va8?70B|mp09O From 91ae3d6faee81abc4965a500028e353dc21e67dc Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:54:21 +0100 Subject: [PATCH 2/7] add docs on how to register new matrix user --- register_matrix_user.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 register_matrix_user.md diff --git a/register_matrix_user.md b/register_matrix_user.md new file mode 100644 index 0000000..37074f1 --- /dev/null +++ b/register_matrix_user.md @@ -0,0 +1,7 @@ +$ nix-shell -p matrix-synapse +$ register_new_matrix_user -k your-registration-shared-secret http://localhost:8008 +New user localpart: your-username +Password: +Confirm password: +Make admin [no]: +Success! From cc39bb6e44286a91dc82c065eb80d62a95772103 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:40:05 +0100 Subject: [PATCH 3/7] enable wireshark, firmware update manager and some tools --- flake.nix | 2 ++ modules/graphical/shared.nix | 2 ++ modules/hardware/firmware.nix | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 modules/hardware/firmware.nix diff --git a/flake.nix b/flake.nix index 72be374..6ec14dd 100644 --- a/flake.nix +++ b/flake.nix @@ -98,6 +98,7 @@ ./modules/graphical/plasma.nix ./modules/graphical/shared.nix ./modules/hardware/ssd.nix + ./modules/hardware/firmware.nix ./modules/nix/settings.nix ./modules/nix/index.nix ./modules/nix/ld.nix @@ -107,6 +108,7 @@ ./modules/noise-supression.nix ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./modules/wooting.nix + ./modules/wireshark.nix ./modules/tmpfs.nix ./modules/support/ntfs.nix ./systems/pc/configuration.nix diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index f926d6e..74229bd 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -79,6 +79,8 @@ in unstable.libreoffice-fresh mangohud screenshot + glxinfo + vulkan-tools ]; environment.sessionVariables = { diff --git a/modules/hardware/firmware.nix b/modules/hardware/firmware.nix new file mode 100644 index 0000000..a62f709 --- /dev/null +++ b/modules/hardware/firmware.nix @@ -0,0 +1,3 @@ +{ + services.fwupd.enable = true; +} From 28af03141e711a6582c1e33b5ab4edb4a147a022 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:45:08 +0100 Subject: [PATCH 4/7] add activitytracker to adguard rewrites --- modules/adguard.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/adguard.nix b/modules/adguard.nix index 870871b..a20d753 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -42,6 +42,10 @@ in "domain" = "server.local"; "answer" = ip; } + { + "domain" = "activitytracker.site"; + "answer" = ip; + } { "domain" = "adguard.local"; "answer" = ip; From 7fd0c5a09aa6f2cd6fd9b60c035fe648c5e90598 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 19:13:43 +0100 Subject: [PATCH 5/7] move nvidia config to seperate file --- flake.nix | 1 + modules/hardware/nvidia.nix | 33 +++++++++++++++++++++++++++++++++ systems/pc/configuration.nix | 30 ------------------------------ users/kopatz.nix | 1 - 4 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 modules/hardware/nvidia.nix diff --git a/flake.nix b/flake.nix index 6ec14dd..563b49f 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ ./users/kopatz.nix ./modules/graphical/plasma.nix ./modules/graphical/shared.nix + ./modules/hardware/nvidia.nix ./modules/hardware/ssd.nix ./modules/hardware/firmware.nix ./modules/nix/settings.nix diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix new file mode 100644 index 0000000..ce5757f --- /dev/null +++ b/modules/hardware/nvidia.nix @@ -0,0 +1,33 @@ +{config, pkgs, ...}: +{ + # Enable OpenGL + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia = { + # Modesetting is required. + modesetting.enable = true; + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + powerManagement.enable = false; + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + # Currently alpha-quality/buggy, so false is currently the recommended setting. + open = false; + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index ee4aa54..bb91845 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -14,36 +14,6 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - # Enable OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { - # Modesetting is required. - modesetting.enable = true; - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - powerManagement.enable = false; - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = false; - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; networking.hostName = "kop-pc"; # Define your hostname. # Enable networking diff --git a/users/kopatz.nix b/users/kopatz.nix index aa23b93..ac8a7f9 100644 --- a/users/kopatz.nix +++ b/users/kopatz.nix @@ -52,7 +52,6 @@ in packages = with pkgs; [ (discord.override { withVencord = true; }) librewolf - ungoogled-chromium brave ]; openssh.authorizedKeys.keys = [ From d4f2c7c05edb24c76366bdc147bf27dcdcb04b91 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:16:05 +0100 Subject: [PATCH 6/7] add newer kernel --- modules/graphical/shared.nix | 2 +- systems/pc/configuration.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index 74229bd..68b5bbd 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -20,7 +20,7 @@ in programs.kdeconnect.enable = true; fonts.fontDir.enable = true; - fonts.fonts = with pkgs; [ + fonts.packages = with pkgs; [ nerdfonts ]; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index bb91845..365e49c 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -10,6 +10,8 @@ ./hardware-configuration.nix ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; From 2e5d92254856bef483af73931d682ac668813f5c Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:18:19 +0100 Subject: [PATCH 7/7] place latest kernel config in its own file --- flake.nix | 2 ++ modules/kernel.nix | 4 ++++ systems/pc/configuration.nix | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 modules/kernel.nix diff --git a/flake.nix b/flake.nix index 563b49f..d7b048c 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,8 @@ ./modules/hardware/nvidia.nix ./modules/hardware/ssd.nix ./modules/hardware/firmware.nix + # use latest kernel + ./modules/kernel.nix ./modules/nix/settings.nix ./modules/nix/index.nix ./modules/nix/ld.nix diff --git a/modules/kernel.nix b/modules/kernel.nix new file mode 100644 index 0000000..91314b1 --- /dev/null +++ b/modules/kernel.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: +{ + boot.kernelPackages = pkgs.linuxPackages_latest; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 365e49c..bb91845 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -10,8 +10,6 @@ ./hardware-configuration.nix ]; - boot.kernelPackages = pkgs.linuxPackages_latest; - # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true;