From 805d62549159d2a6b952f2385a324b1c9d26c07d Mon Sep 17 00:00:00 2001 From: bayram-budak Date: Mon, 6 Nov 2023 22:41:36 +0100 Subject: [PATCH 01/17] first attempt at adding ente public --- server/modules/nginx.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/server/modules/nginx.nix b/server/modules/nginx.nix index 6691ba8..47f5075 100644 --- a/server/modules/nginx.nix +++ b/server/modules/nginx.nix @@ -52,6 +52,34 @@ ''; proxyPass = "http://127.0.0.1:8080"; }; + }, + #discord bot for tracking useractivity public version + "activitytracker.site" = { + root = "/data/website"; + forceSSL = true; + enableACME = true; + locations."~* \\.(jpg)$".extraConfig= '' + add_header Access-Control-Allow-Origin *; + ''; + locations."~ ^/(stash|resources|css)".extraConfig='' + client_max_body_size 5000M; + proxy_redirect off; + 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-NginX-Proxy true; + proxy_pass http://localhost:5092; + ''; + locations."/" = { + tryFiles = "$uri $uri/ /tracker-site/index.html =404"; + }; + locations."/api" = { + extraConfig ='' + rewrite /api/(.*) /$1 break; + ''; + proxyPass = "http://127.0.0.1:8080"; + }; }; "adguard.local" = { locations."/".proxyPass = "http://127.0.0.1:3000"; From b3a114091aa249ed0d7fb9945b9294151834cf6c Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:19:03 +0100 Subject: [PATCH 02/17] make adguard listen on vpn --- modules/adguard.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/adguard.nix b/modules/adguard.nix index f5853d4..b659d35 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -1,6 +1,7 @@ { config, pkgs, inputs, vars, ... }: let ip = vars.ipv4; + wireguardIp = vars.wireguardIp; in { networking.firewall.allowedTCPPorts = [ 53 ]; @@ -16,7 +17,7 @@ in } ]; dns = { - bind_hosts = [ "127.0.0.1" "${ip}" ]; # "192.168.2.1" ]; + bind_hosts = [ "127.0.0.1" ip wireguardIp ]; port = 53; protection_enabled = true; filtering_enabled = true; From f96765d8fb047a819b80eb2d3056140966d9a0c6 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:31:14 +0000 Subject: [PATCH 03/17] enable direnv --- users/anon.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/users/anon.nix b/users/anon.nix index f6775f4..fda5f03 100644 --- a/users/anon.nix +++ b/users/anon.nix @@ -17,6 +17,11 @@ in useUserPackages = true; users.${user} = { programs.git.enable = true; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; programs.zsh = { enable = true; enableCompletion = true; From 9bcd8c09d0cee086912e54e9bf89f0462749a2d4 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:34:00 +0000 Subject: [PATCH 04/17] extract gnome --- flake.nix | 1 + modules/graphical/gnome.nix | 53 +++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 modules/graphical/gnome.nix diff --git a/flake.nix b/flake.nix index 1ffe171..ae3afc6 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,7 @@ modules = [ ./users/kopatz.nix # Todo: refactor file layout + ./modules/graphical/gnome.nix ./laptop/configuration.nix ./modules/virt-manager.nix ./modules/ssh.nix diff --git a/modules/graphical/gnome.nix b/modules/graphical/gnome.nix new file mode 100644 index 0000000..0a71908 --- /dev/null +++ b/modules/graphical/gnome.nix @@ -0,0 +1,53 @@ +{ config, pkgs, ... }: + +{ + services.xserver = { + layout = "at"; + xkbVariant = ""; + enable = true; + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + }; + + environment.gnome.excludePackages = (with pkgs; [ + gnome-photos + gnome-tour + ]) ++ (with pkgs.gnome; [ + cheese # webcam tool + gnome-music + gnome-terminal + gedit # text editor + epiphany # web browser + #geary # email reader + evince # document viewer + gnome-characters + totem # video player + tali # poker game + iagno # go game + hitori # sudoku game + atomix # puzzle game + ]); + + environment.systemPackages = with pkgs; [ + wmctrl + gnome.mutter + gnome.adwaita-icon-theme + gnome.gnome-settings-daemon + gnome.gnome-tweaks + gnome.dconf-editor + gruvbox-gtk-theme + colloid-icon-theme + gnomeExtensions.appindicator + gnomeExtensions.just-perfection + gnomeExtensions.system-monitor + gnomeExtensions.dash2dock-lite + gnomeExtensions.dash-to-dock + gnomeExtensions.vitals + gnomeExtensions.rounded-window-corners + gnomeExtensions.wallpaper-switcher + gnomeExtensions.backslide + gnomeExtensions.nextcloud-folder + gnomeExtensions.tray-icons-reloaded + gnomeExtensions.blur-my-shell + ]; +} From 71705b84c0318f2a5fe5c1b578dc299f0d70242a Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:19:35 +0100 Subject: [PATCH 05/17] add pc --- flake.nix | 15 +++ modules/graphical/gnome.nix | 6 ++ modules/graphical/plasma.nix | 11 +++ modules/graphical/shared.nix | 82 +++++++++++++++++ systems/pc/configuration.nix | 127 ++++++++++++++++++++++++++ systems/pc/hardware-configuration.nix | 37 ++++++++ users/kopatz.nix | 2 + 7 files changed, 280 insertions(+) create mode 100644 modules/graphical/plasma.nix create mode 100644 modules/graphical/shared.nix create mode 100644 systems/pc/configuration.nix create mode 100644 systems/pc/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index ae3afc6..bb305b9 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,21 @@ inherit inputs ; }; }; + nixosConfigurations."kop-pc" = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs ; + }; + modules = [ + ./users/kopatz.nix + ./modules/graphical/plasma.nix + ./modules/graphical/shared.nix + ./modules/nix-settings.nix + ./systems/pc/configuration.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager + ]; + }; nixosConfigurations."nix-laptop" = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { diff --git a/modules/graphical/gnome.nix b/modules/graphical/gnome.nix index 0a71908..ca59c8d 100644 --- a/modules/graphical/gnome.nix +++ b/modules/graphical/gnome.nix @@ -9,6 +9,12 @@ desktopManager.gnome.enable = true; }; + # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment.gnome.excludePackages = (with pkgs; [ gnome-photos gnome-tour diff --git a/modules/graphical/plasma.nix b/modules/graphical/plasma.nix new file mode 100644 index 0000000..4c88c40 --- /dev/null +++ b/modules/graphical/plasma.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + services.xserver = { + layout = "at"; + xkbVariant = ""; + enable = true; + displayManager.sddm.enable = true; + desktopManager.plasma5.enable = true; + }; +} diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix new file mode 100644 index 0000000..aff693f --- /dev/null +++ b/modules/graphical/shared.nix @@ -0,0 +1,82 @@ +{ config, pkgs, inputs, ... }: + +let + keepassWithPlugins = pkgs.keepass.override { + plugins = [ + pkgs.keepass-keepassrpc + ]; + }; +in +{ + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + + programs.kdeconnect.enable = true; + + fonts.fontDir.enable = true; + fonts.fonts = with pkgs; [ + nerdfonts + ]; + + networking.firewall = { + enable = true; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + wget + nixos-option + kate + keepassWithPlugins + jetbrains.idea-ultimate + jetbrains.rider + dotnet-sdk_7 + dotnet-runtime_7 + neovim + htop + btop + git + xfce.thunar + killall + xclip + usbutils + bun + inputs.agenix.packages."x86_64-linux".default + insomnia + remmina + nextcloud-client + #podman-compose + #arion # docker + neofetch + thunderbird + rofi + pdfgrep + taisei + ncdu + localsend + element-desktop + ]; + + environment.sessionVariables = { + DOTNET_ROOT = "${pkgs.dotnet-sdk_7}"; + }; + + ### docker + virtualisation.docker.enable = true; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix new file mode 100644 index 0000000..3b7d477 --- /dev/null +++ b/systems/pc/configuration.nix @@ -0,0 +1,127 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, lib, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + 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 + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Vienna"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_AT.UTF-8"; + LC_IDENTIFICATION = "de_AT.UTF-8"; + LC_MEASUREMENT = "de_AT.UTF-8"; + LC_MONETARY = "de_AT.UTF-8"; + LC_NAME = "de_AT.UTF-8"; + LC_NUMERIC = "de_AT.UTF-8"; + LC_PAPER = "de_AT.UTF-8"; + LC_TELEPHONE = "de_AT.UTF-8"; + LC_TIME = "de_AT.UTF-8"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = lib.mkForce "de"; + xkbVariant = lib.mkForce "us"; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Enable automatic login for the user. + services.xserver.displayManager.autoLogin.enable = true; + services.xserver.displayManager.autoLogin.user = "kopatz"; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.05"; # Did you read the comment? + +} diff --git a/systems/pc/hardware-configuration.nix b/systems/pc/hardware-configuration.nix new file mode 100644 index 0000000..b572ac4 --- /dev/null +++ b/systems/pc/hardware-configuration.nix @@ -0,0 +1,37 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/dd65bdf8-c003-439c-a1aa-d050cb20959d"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5AA5-45E0"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/kopatz.nix b/users/kopatz.nix index a990c9a..fe16284 100644 --- a/users/kopatz.nix +++ b/users/kopatz.nix @@ -33,6 +33,7 @@ in theme = "eastwood"; }; }; + programs.git.enable = true; home.stateVersion = "23.05"; }; }; @@ -47,6 +48,7 @@ in (discord.override { withVencord = true; }) librewolf ungoogled-chromium + brave ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2 lukas" From 67f0cf7d6e5eaebcbc58ffa4b2d0643c2b73c027 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:12:11 +0100 Subject: [PATCH 06/17] more pc configuration --- flake.nix | 10 ++++++++-- modules/flatpak.nix | 3 +++ modules/gpg.nix | 13 +++++++++++++ modules/nix/index.nix | 7 +++++++ modules/nix/ld.nix | 3 +++ modules/{nix-settings.nix => nix/settings.nix} | 0 modules/support/ntfs.nix | 3 +++ modules/wooting.nix | 11 +++++++++++ users/anon.nix | 2 +- users/kopatz.nix | 5 +++++ 10 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 modules/flatpak.nix create mode 100644 modules/gpg.nix create mode 100644 modules/nix/index.nix create mode 100644 modules/nix/ld.nix rename modules/{nix-settings.nix => nix/settings.nix} (100%) create mode 100644 modules/support/ntfs.nix create mode 100644 modules/wooting.nix diff --git a/flake.nix b/flake.nix index bb305b9..96da302 100644 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,7 @@ ./modules/motd.nix ./modules/postgres.nix ./modules/fail2ban.nix - ./modules/nix-settings.nix + ./modules/nix/settings.nix ./modules/adguard.nix ./modules/git.nix ./modules/github-runner.nix @@ -94,7 +94,13 @@ ./users/kopatz.nix ./modules/graphical/plasma.nix ./modules/graphical/shared.nix - ./modules/nix-settings.nix + ./modules/nix/settings.nix + ./modules/nix/index.nix + ./modules/nix/ld.nix + ./modules/gpg.nix + ./modules/flatpak.nix + ./modules/wooting.nix + ./modules/support/ntfs.nix ./systems/pc/configuration.nix agenix.nixosModules.default home-manager.nixosModules.home-manager diff --git a/modules/flatpak.nix b/modules/flatpak.nix new file mode 100644 index 0000000..e63b2ac --- /dev/null +++ b/modules/flatpak.nix @@ -0,0 +1,3 @@ +{ + services.flatpak.enable = true; +} diff --git a/modules/gpg.nix b/modules/gpg.nix new file mode 100644 index 0000000..ebd5617 --- /dev/null +++ b/modules/gpg.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: +{ + #services.pcscd.enable = true; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "qt"; + }; + #environment.systemPackages = with pkgs; [ + # pinentry-curses + # ]; +} diff --git a/modules/nix/index.nix b/modules/nix/index.nix new file mode 100644 index 0000000..e8e93b3 --- /dev/null +++ b/modules/nix/index.nix @@ -0,0 +1,7 @@ +{ + programs.command-not-found.enable = false; + programs.nix-index = { + enable = true; + enableZshIntegration=true; + }; +} diff --git a/modules/nix/ld.nix b/modules/nix/ld.nix new file mode 100644 index 0000000..4ff6916 --- /dev/null +++ b/modules/nix/ld.nix @@ -0,0 +1,3 @@ +{ + programs.nix-ld.enable = true; +} diff --git a/modules/nix-settings.nix b/modules/nix/settings.nix similarity index 100% rename from modules/nix-settings.nix rename to modules/nix/settings.nix diff --git a/modules/support/ntfs.nix b/modules/support/ntfs.nix new file mode 100644 index 0000000..4f09762 --- /dev/null +++ b/modules/support/ntfs.nix @@ -0,0 +1,3 @@ +{ + boot.supportedFilesystems = [ "ntfs" ]; +} diff --git a/modules/wooting.nix b/modules/wooting.nix new file mode 100644 index 0000000..eec4356 --- /dev/null +++ b/modules/wooting.nix @@ -0,0 +1,11 @@ +{ pkgs, ...}: +{ + services.udev.extraRules = '' + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess" + ''; + + environment.systemPackages = with pkgs; [ + wootility + ]; +} diff --git a/users/anon.nix b/users/anon.nix index fda5f03..f075a6e 100644 --- a/users/anon.nix +++ b/users/anon.nix @@ -17,7 +17,7 @@ in useUserPackages = true; users.${user} = { programs.git.enable = true; - programs.direnv = { + programs.direnv = { enable = true; enableZshIntegration = true; nix-direnv.enable = true; diff --git a/users/kopatz.nix b/users/kopatz.nix index fe16284..aa23b93 100644 --- a/users/kopatz.nix +++ b/users/kopatz.nix @@ -34,6 +34,11 @@ in }; }; programs.git.enable = true; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; home.stateVersion = "23.05"; }; }; From ea53f65f55caa78426b9f8db18e21c17a24a2c0e Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:58:17 +0100 Subject: [PATCH 07/17] fix wooting --- flake.nix | 1 + modules/wooting.nix | 34 +++++++++++++++++++++++++++------- modules/wooting.rules | 12 ++++++++++++ 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 modules/wooting.rules diff --git a/flake.nix b/flake.nix index 96da302..8049576 100644 --- a/flake.nix +++ b/flake.nix @@ -99,6 +99,7 @@ ./modules/nix/ld.nix ./modules/gpg.nix ./modules/flatpak.nix + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./modules/wooting.nix ./modules/support/ntfs.nix ./systems/pc/configuration.nix diff --git a/modules/wooting.nix b/modules/wooting.nix index eec4356..7dcfda9 100644 --- a/modules/wooting.nix +++ b/modules/wooting.nix @@ -1,10 +1,30 @@ -{ pkgs, ...}: -{ - services.udev.extraRules = '' - SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess" - SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess" - ''; - +{ pkgs, lib, ...}: +let + wooting-udev = pkgs.stdenv.mkDerivation rec { + pname = "wooting-udev-rules"; + version = "unstable-2023-03-31"; + + # Source: https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/ + src = [ ./wooting.rules ]; + + dontUnpack = true; + + installPhase = '' + install -Dpm644 $src $out/lib/udev/rules.d/70-wooting.rules + ''; + + meta = with lib; { + homepage = "https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/"; + description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; + platforms = platforms.linux; + license = "unknown"; + maintainers = with maintainers; [ davidtwco ]; + }; +}; +in +{ + services.udev.packages = [ wooting-udev ]; + environment.systemPackages = with pkgs; [ wootility ]; diff --git a/modules/wooting.rules b/modules/wooting.rules new file mode 100644 index 0000000..690484f --- /dev/null +++ b/modules/wooting.rules @@ -0,0 +1,12 @@ +# Wooting Two HE (ARM) +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0666", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0666", GROUP="input" +# Wooting Two HE Alt-gamepad mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0666", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0666", GROUP="input" +# Wooting Two HE 2nd Alt-gamepad mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0666", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0666", GROUP="input" + +# Wooting Two HE (ARM) update mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="123f", MODE:="0666", GROUP="input" From 787fee318fdc120c07e57ee0ca7abf0779937808 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:25:15 +0100 Subject: [PATCH 08/17] add tetrio --- modules/graphical/shared.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index aff693f..9beb70f 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -71,6 +71,7 @@ in ncdu localsend element-desktop + tetrio-desktop ]; environment.sessionVariables = { From 111eba465175714deb8dcebdf4e7e586bafeae9b Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:26:15 +0100 Subject: [PATCH 09/17] add virtmanager to pc --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 8049576..b3f475e 100644 --- a/flake.nix +++ b/flake.nix @@ -98,6 +98,7 @@ ./modules/nix/index.nix ./modules/nix/ld.nix ./modules/gpg.nix + ./modules/virt-manager.nix ./modules/flatpak.nix ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./modules/wooting.nix From 3654bb8d2bc6928e62fe9e87071aed260690d24b Mon Sep 17 00:00:00 2001 From: bayram-budak Date: Wed, 22 Nov 2023 21:24:06 +0100 Subject: [PATCH 10/17] removed server folder --- server/modules/nginx.nix | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 server/modules/nginx.nix diff --git a/server/modules/nginx.nix b/server/modules/nginx.nix deleted file mode 100644 index e69de29..0000000 From 122fa5ee6495d402f048c5331ff5cb202a9d3913 Mon Sep 17 00:00:00 2001 From: bayram-budak Date: Wed, 22 Nov 2023 23:04:05 +0100 Subject: [PATCH 11/17] updated nginx.nix for ente public --- modules/nginx.nix | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/modules/nginx.nix b/modules/nginx.nix index a49ca1f..686c9d5 100644 --- a/modules/nginx.nix +++ b/modules/nginx.nix @@ -53,36 +53,26 @@ proxyPass = "http://127.0.0.1:8080"; }; - #locations."~/books(.*)$" = { + #locations."~/books(.*)$" = { # proxyPass = "http://127.0.0.1:5000"; #}; - }, + }; #discord bot for tracking useractivity public version "activitytracker.site" = { + #serverAliases = [ + # "localhost" + #]; root = "/data/website"; forceSSL = true; enableACME = true; - locations."~* \\.(jpg)$".extraConfig= '' - add_header Access-Control-Allow-Origin *; - ''; - locations."~ ^/(stash|resources|css)".extraConfig='' - client_max_body_size 5000M; - proxy_redirect off; - 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-NginX-Proxy true; - proxy_pass http://localhost:5092; - ''; - locations."/" = { - tryFiles = "$uri $uri/ /tracker-site/index.html =404"; + locations."/tracker-site-public" = { + tryFiles = "$uri $uri/ /tracker-site-public/index.html =404"; }; locations."/api" = { extraConfig ='' rewrite /api/(.*) /$1 break; ''; - proxyPass = "http://127.0.0.1:8080"; + proxyPass = "http://127.0.0.1:8081"; }; }; "adguard.local" = { From 27513ef4bbf65da060c50e89c83597e2ebacb935 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:14:34 +0100 Subject: [PATCH 12/17] ssd --- flake.nix | 2 ++ modules/hardware/ssd.nix | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 modules/hardware/ssd.nix diff --git a/flake.nix b/flake.nix index 1ffe171..6cd20f2 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,8 @@ ./modules/paperless.nix ./modules/kavita.nix ./modules/netdata.nix + ### Hardware ### + ./modules/hardware/ssd.nix home-manager.nixosModules.home-manager agenix.nixosModules.default { diff --git a/modules/hardware/ssd.nix b/modules/hardware/ssd.nix new file mode 100644 index 0000000..5866c1c --- /dev/null +++ b/modules/hardware/ssd.nix @@ -0,0 +1,3 @@ +{ + services.fstrim.enable = true; +} From df8ef57c462c823ea5e2538bfb63fb657aca99cb Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:06:43 +0100 Subject: [PATCH 13/17] update nixos to 23.11, save plasma config, change git config, add noise supression --- .config/plasma-localerc | 2 + .../plasma-org.kde.plasma.desktop-appletsrc | 458 ++++++++++++++++++ .config/plasmanotifyrc | 12 + .config/plasmashellrc | 50 ++ .config/plasmawindowed-appletsrc | 11 + .config/plasmawindowedrc | 11 + .gitconfig | 2 + .gitconfig-evolit | 3 + flake.lock | 16 +- flake.nix | 6 +- modules/graphical/shared.nix | 3 + modules/noise-supression.nix | 3 + 12 files changed, 567 insertions(+), 10 deletions(-) create mode 100644 .config/plasma-localerc create mode 100644 .config/plasma-org.kde.plasma.desktop-appletsrc create mode 100644 .config/plasmanotifyrc create mode 100644 .config/plasmashellrc create mode 100644 .config/plasmawindowed-appletsrc create mode 100644 .config/plasmawindowedrc create mode 100644 .gitconfig-evolit create mode 100644 modules/noise-supression.nix diff --git a/.config/plasma-localerc b/.config/plasma-localerc new file mode 100644 index 0000000..2023037 --- /dev/null +++ b/.config/plasma-localerc @@ -0,0 +1,2 @@ +[Formats] +LANG=en_US.UTF-8 diff --git a/.config/plasma-org.kde.plasma.desktop-appletsrc b/.config/plasma-org.kde.plasma.desktop-appletsrc new file mode 100644 index 0000000..632107e --- /dev/null +++ b/.config/plasma-org.kde.plasma.desktop-appletsrc @@ -0,0 +1,458 @@ +[ActionPlugins][0] +MiddleButton;NoModifier=org.kde.paste +RightButton;NoModifier=org.kde.contextmenu +wheel:Vertical;NoModifier=org.kde.switchdesktop + +[ActionPlugins][1] +RightButton;NoModifier=org.kde.contextmenu + +[Containments][130] +ItemGeometries-2560x1440= +ItemGeometriesHorizontal= +activityId=6784e532-d567-43a5-965a-c229de33d941 +formfactor=0 +immutability=1 +lastScreen=0 +location=0 +plugin=org.kde.plasma.folder +wallpaperplugin=org.kde.slideshow + +[Containments][130][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][130][General] +ToolBoxButtonState=topcenter +ToolBoxButtonX=697 + +[Containments][130][Wallpaper][org.kde.slideshow][General] +Image=file:///home/kopatz/Nextcloud/dinge/Bg/AcademyWireframe_wide.jpg +SlideInterval=18900 +SlidePaths=/home/kopatz/Nextcloud/dinge/Bg/ + +[Containments][131] +ItemGeometries-1920x1080= +ItemGeometriesHorizontal= +activityId=6784e532-d567-43a5-965a-c229de33d941 +formfactor=0 +immutability=1 +lastScreen=1 +location=0 +plugin=org.kde.plasma.folder +wallpaperplugin=org.kde.slideshow + +[Containments][131][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][131][Wallpaper][org.kde.slideshow][General] +Image=file:///home/kopatz/Nextcloud/dinge/Bg/303695.jpg +SlideInterval=18900 +SlidePaths=/home/kopatz/Nextcloud/dinge/Bg/ + +[Containments][132] +activityId= +formfactor=2 +immutability=1 +lastScreen=0 +location=4 +plugin=org.kde.panel +wallpaperplugin=org.kde.image + +[Containments][132][Applets][133] +immutability=1 +plugin=org.kde.plasma.kickoff + +[Containments][132][Applets][133][Configuration] +PreloadWeight=100 +popupHeight=574 +popupWidth=729 + +[Containments][132][Applets][133][Configuration][General] +favoritesPortedToKAstats=true + +[Containments][132][Applets][133][Configuration][Shortcuts] +global=Alt+F1 + +[Containments][132][Applets][134] +immutability=1 +plugin=org.kde.plasma.pager + +[Containments][132][Applets][135] +immutability=1 +plugin=org.kde.plasma.icontasks + +[Containments][132][Applets][135][Configuration][General] +launchers=applications:systemsettings.desktop,preferred://filemanager,preferred://browser + +[Containments][132][Applets][136] +immutability=1 +plugin=org.kde.plasma.marginsseparator + +[Containments][132][Applets][137] +immutability=1 +plugin=org.kde.plasma.systemtray + +[Containments][132][Applets][137][Configuration] +PreloadWeight=55 +SystrayContainmentId=138 + +[Containments][132][Applets][149] +immutability=1 +plugin=org.kde.plasma.digitalclock + +[Containments][132][Applets][150] +immutability=1 +plugin=org.kde.plasma.showdesktop + +[Containments][132][Applets][179] +immutability=1 +plugin=org.kde.plasma.systemmonitor + +[Containments][132][Applets][179][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor + +[Containments][132][Applets][179][Configuration][Appearance] +chartFace=org.kde.ksysguard.piechart +updateRateLimit=500 + +[Containments][132][Applets][179][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][132][Applets][179][Configuration][SensorColors] +memory/physical/usedPercent=61,164,233 + +[Containments][132][Applets][179][Configuration][Sensors] +highPrioritySensorIds=["memory/physical/usedPercent"] +totalSensors=["memory/physical/usedPercent"] + +[Containments][132][Applets][180] +immutability=1 +plugin=org.kde.plasma.systemmonitor + +[Containments][132][Applets][180][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor + +[Containments][132][Applets][180][Configuration][Appearance] +chartFace=org.kde.ksysguard.piechart +updateRateLimit=500 + +[Containments][132][Applets][180][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][132][Applets][180][Configuration][SensorColors] +cpu/all/averageTemperature=61,233,114 + +[Containments][132][Applets][180][Configuration][Sensors] +highPrioritySensorIds=["cpu/all/averageTemperature"] +totalSensors=["cpu/all/averageTemperature"] + +[Containments][132][Applets][181] +immutability=1 +plugin=org.kde.plasma.systemmonitor + +[Containments][132][Applets][181][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor + +[Containments][132][Applets][181][Configuration][Appearance] +chartFace=org.kde.ksysguard.piechart +updateRateLimit=500 + +[Containments][132][Applets][181][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][132][Applets][181][Configuration][SensorColors] +cpu/all/usage=233,61,95 + +[Containments][132][Applets][181][Configuration][Sensors] +highPrioritySensorIds=["cpu/all/usage"] +totalSensors=["cpu/all/usage"] + +[Containments][132][Applets][182] +immutability=1 +plugin=org.kde.plasma.systemmonitor + +[Containments][132][Applets][182][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor + +[Containments][132][Applets][182][Configuration][Appearance] +chartFace=org.kde.ksysguard.piechart +updateRateLimit=1000 + +[Containments][132][Applets][182][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][132][Applets][182][Configuration][SensorColors] +gpu/gpu0/temperature=85,61,233 + +[Containments][132][Applets][182][Configuration][Sensors] +highPrioritySensorIds=["gpu/gpu0/temperature"] +totalSensors=["gpu/gpu0/temperature"] + +[Containments][132][Applets][183] +immutability=1 +plugin=org.kde.plasma.systemmonitor + +[Containments][132][Applets][183][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor + +[Containments][132][Applets][183][Configuration][Appearance] +chartFace=org.kde.ksysguard.piechart + +[Containments][132][Applets][183][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 + +[Containments][132][Applets][183][Configuration][SensorColors] +gpu/all/usage=61,111,233 +gpu/gpu0/usage=233,173,61 + +[Containments][132][Applets][183][Configuration][Sensors] +highPrioritySensorIds=["gpu/all/usage"] +totalSensors=["gpu/all/usage"] + +[Containments][132][Applets][185] +immutability=1 +plugin=org.kde.plasma.systemmonitor.diskactivity + +[Containments][132][Applets][185][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor +PreloadWeight=55 + +[Containments][132][Applets][185][Configuration][Appearance] +chartFace=org.kde.ksysguard.linechart +title=Hard Disk Activity + +[Containments][132][Applets][185][Configuration][SensorColors] +disk/all/read=233,120,61 +disk/all/write=61,174,233 + +[Containments][132][Applets][185][Configuration][Sensors] +highPrioritySensorIds=["disk/all/write","disk/all/read"] + +[Containments][132][Applets][186] +immutability=1 +plugin=org.kde.plasma.systemmonitor.net + +[Containments][132][Applets][186][Configuration] +CurrentPreset=org.kde.plasma.systemmonitor +PreloadWeight=55 + +[Containments][132][Applets][186][Configuration][Appearance] +chartFace=org.kde.ksysguard.linechart +title=Network speed + +[Containments][132][Applets][186][Configuration][SensorColors] +network/all/download=61,174,233 +network/all/upload=233,120,61 + +[Containments][132][Applets][186][Configuration][Sensors] +highPrioritySensorIds=["network/all/download","network/all/upload"] + +[Containments][132][ConfigDialog] +DialogHeight=93 +DialogWidth=2560 + +[Containments][132][General] +AppletOrder=133;134;135;181;180;183;182;186;136;179;185;137;149;150 + +[Containments][138] +activityId= +formfactor=2 +immutability=1 +lastScreen=0 +location=4 +plugin=org.kde.plasma.private.systemtray +wallpaperplugin=org.kde.image + +[Containments][138][Applets][139] +immutability=1 +plugin=org.kde.plasma.notifications + +[Containments][138][Applets][140] +immutability=1 +plugin=org.kde.plasma.clipboard + +[Containments][138][Applets][141] +immutability=1 +plugin=org.kde.plasma.manage-inputmethod + +[Containments][138][Applets][142] +immutability=1 +plugin=org.kde.plasma.devicenotifier + +[Containments][138][Applets][143] +immutability=1 +plugin=org.kde.plasma.printmanager + +[Containments][138][Applets][144] +immutability=1 +plugin=org.kde.plasma.volume + +[Containments][138][Applets][144][Configuration][General] +migrated=true + +[Containments][138][Applets][145] +immutability=1 +plugin=org.kde.plasma.keyboardlayout + +[Containments][138][Applets][146] +immutability=1 +plugin=org.kde.kdeconnect + +[Containments][138][Applets][147] +immutability=1 +plugin=org.kde.kscreen + +[Containments][138][Applets][148] +immutability=1 +plugin=org.kde.plasma.keyboardindicator + +[Containments][138][Applets][151] +immutability=1 +plugin=org.kde.plasma.nightcolorcontrol + +[Containments][138][Applets][152] +immutability=1 +plugin=org.kde.plasma.battery + +[Containments][138][Applets][153] +immutability=1 +plugin=org.kde.plasma.mediacontroller + +[Containments][138][Applets][154] +immutability=1 +plugin=org.kde.plasma.networkmanagement + +[Containments][138][General] +extraItems=org.kde.plasma.mediacontroller,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.clipboard,org.kde.plasma.manage-inputmethod,org.kde.plasma.devicenotifier,org.kde.plasma.nightcolorcontrol,org.kde.plasma.printmanager,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.keyboardlayout,org.kde.kdeconnect,org.kde.kscreen,org.kde.plasma.keyboardindicator +knownItems=org.kde.plasma.mediacontroller,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.clipboard,org.kde.plasma.manage-inputmethod,org.kde.plasma.devicenotifier,org.kde.plasma.nightcolorcontrol,org.kde.plasma.printmanager,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.keyboardlayout,org.kde.kdeconnect,org.kde.kscreen,org.kde.plasma.keyboardindicator + +[Containments][155] +activityId= +formfactor=2 +immutability=1 +lastScreen=1 +location=4 +plugin=org.kde.panel +wallpaperplugin=org.kde.image + +[Containments][155][Applets][156] +immutability=1 +plugin=org.kde.plasma.kickoff + +[Containments][155][Applets][156][Configuration][General] +favoritesPortedToKAstats=true + +[Containments][155][Applets][156][Configuration][Shortcuts] +global=Alt+F1 + +[Containments][155][Applets][157] +immutability=1 +plugin=org.kde.plasma.pager + +[Containments][155][Applets][158] +immutability=1 +plugin=org.kde.plasma.icontasks + +[Containments][155][Applets][159] +immutability=1 +plugin=org.kde.plasma.marginsseparator + +[Containments][155][Applets][160] +immutability=1 +plugin=org.kde.plasma.systemtray + +[Containments][155][Applets][160][Configuration] +PreloadWeight=55 +SystrayContainmentId=161 + +[Containments][155][Applets][172] +immutability=1 +plugin=org.kde.plasma.digitalclock + +[Containments][155][Applets][173] +immutability=1 +plugin=org.kde.plasma.showdesktop + +[Containments][155][General] +AppletOrder=156;157;158;159;160;172;173 + +[Containments][161] +activityId= +formfactor=2 +immutability=1 +lastScreen=1 +location=4 +plugin=org.kde.plasma.private.systemtray +wallpaperplugin=org.kde.image + +[Containments][161][Applets][162] +immutability=1 +plugin=org.kde.plasma.notifications + +[Containments][161][Applets][163] +immutability=1 +plugin=org.kde.plasma.clipboard + +[Containments][161][Applets][164] +immutability=1 +plugin=org.kde.plasma.manage-inputmethod + +[Containments][161][Applets][165] +immutability=1 +plugin=org.kde.plasma.devicenotifier + +[Containments][161][Applets][166] +immutability=1 +plugin=org.kde.plasma.printmanager + +[Containments][161][Applets][167] +immutability=1 +plugin=org.kde.plasma.volume + +[Containments][161][Applets][167][Configuration][General] +migrated=true + +[Containments][161][Applets][168] +immutability=1 +plugin=org.kde.plasma.keyboardlayout + +[Containments][161][Applets][169] +immutability=1 +plugin=org.kde.kdeconnect + +[Containments][161][Applets][170] +immutability=1 +plugin=org.kde.kscreen + +[Containments][161][Applets][171] +immutability=1 +plugin=org.kde.plasma.keyboardindicator + +[Containments][161][Applets][174] +immutability=1 +plugin=org.kde.plasma.nightcolorcontrol + +[Containments][161][Applets][175] +immutability=1 +plugin=org.kde.plasma.battery + +[Containments][161][Applets][176] +immutability=1 +plugin=org.kde.plasma.mediacontroller + +[Containments][161][Applets][177] +immutability=1 +plugin=org.kde.plasma.networkmanagement + +[Containments][161][General] +extraItems=org.kde.plasma.mediacontroller,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.clipboard,org.kde.plasma.manage-inputmethod,org.kde.plasma.devicenotifier,org.kde.plasma.nightcolorcontrol,org.kde.plasma.printmanager,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.keyboardlayout,org.kde.kdeconnect,org.kde.kscreen,org.kde.plasma.keyboardindicator +knownItems=org.kde.plasma.mediacontroller,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.clipboard,org.kde.plasma.manage-inputmethod,org.kde.plasma.devicenotifier,org.kde.plasma.nightcolorcontrol,org.kde.plasma.printmanager,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.keyboardlayout,org.kde.kdeconnect,org.kde.kscreen,org.kde.plasma.keyboardindicator + +[ScreenMapping] +itemsOnDisabledScreens= diff --git a/.config/plasmanotifyrc b/.config/plasmanotifyrc new file mode 100644 index 0000000..98f3fa0 --- /dev/null +++ b/.config/plasmanotifyrc @@ -0,0 +1,12 @@ +[Applications][brave-browser] +Seen=true + +[Applications][com.nextcloud.desktopclient.nextcloud] +Seen=true +ShowPopups=false + +[Applications][discord] +Seen=true + +[Applications][thunderbird] +Seen=true diff --git a/.config/plasmashellrc b/.config/plasmashellrc new file mode 100644 index 0000000..ef6057c --- /dev/null +++ b/.config/plasmashellrc @@ -0,0 +1,50 @@ +[ActionsWidget] +ColumnState=AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYwAAAACAQAAAQAAAAAAAAAAAAAAAHD/////AAAAgQAAAAAAAAACAAAA+gAAAAEAAAAAAAAAkgAAAAEAAAAAAAAD6AAAAABw + +[ConfigDialog] +2 screens: Height=550 +2 screens: Width=835 + +[FileDialogSize] +2 screens: Height=606 +2 screens: Width=860 + +[General] +Number of Actions=0 + +[PlasmaTransientsConfig] +PreloadWeight=0 + +[PlasmaViews][Panel 107][Defaults] +thickness=54 + +[PlasmaViews][Panel 132][Defaults] +thickness=54 + +[PlasmaViews][Panel 155][Defaults] +thickness=54 + +[PlasmaViews][Panel 3][Defaults] +thickness=54 + +[PlasmaViews][Panel 34][Defaults] +thickness=54 + +[PlasmaViews][Panel 63] +alignment=132 + +[PlasmaViews][Panel 63][Defaults] +maxLength=2346 +minLength=2346 +offset=0 +thickness=26 + +[PlasmaViews][Panel 63][Horizontal2560] +maxLength=2346 +minLength=2346 + +[PlasmaViews][Panel 82][Defaults] +thickness=54 + +[Updates] +performed=/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/systemloadviewer_systemmonitor.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/no_middle_click_paste_on_panels.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/digitalclock_rename_timezonedisplay_key.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/maintain_existing_desktop_icon_sizes.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/folderview_fix_recursive_screenmapping.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/unlock_widgets.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/mediaframe_migrate_useBackground_setting.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/move_desktop_layout_config.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/keyboardlayout_migrateiconsetting.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/digitalclock_migrate_font_settings.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/keyboardlayout_remove_shortcut.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/containmentactions_middlebutton.js,/run/current-system/sw/share/plasma/shells/org.kde.plasma.desktop/contents/updates/klipper_clear_config.js diff --git a/.config/plasmawindowed-appletsrc b/.config/plasmawindowed-appletsrc new file mode 100644 index 0000000..176df5e --- /dev/null +++ b/.config/plasmawindowed-appletsrc @@ -0,0 +1,11 @@ +[ActionPlugins][0] +MiddleButton;NoModifier=org.kde.paste +RightButton;NoModifier=org.kde.contextmenu +wheel:Vertical;NoModifier=org.kde.switchdesktop + +[Containments][2] +activityId= +formfactor=4 +lastScreen=-1 +location=0 +wallpaperplugin=org.kde.image diff --git a/.config/plasmawindowedrc b/.config/plasmawindowedrc new file mode 100644 index 0000000..7ab8dfa --- /dev/null +++ b/.config/plasmawindowedrc @@ -0,0 +1,11 @@ +[Applets][3] +immutability=1 +plugin=org.kde.plasma.calendar + +[Applets][3][Configuration] +PreloadWeight=42 +geometry=2787,531,462,308 + +[Applets][3][Configuration][ConfigDialog] +DialogHeight=660 +DialogWidth=880 diff --git a/.gitconfig b/.gitconfig index 5ccbb2d..33c6f2f 100644 --- a/.gitconfig +++ b/.gitconfig @@ -25,3 +25,5 @@ path = .gitconfig-gitea [includeIf "gitdir/i:~/projects/fh/**"] path = .gitconfig-gitlabfh +[includeIf "gitdir/i:~/projects/evolit/**"] + path = .gitconfig-evolit diff --git a/.gitconfig-evolit b/.gitconfig-evolit new file mode 100644 index 0000000..2bfd72e --- /dev/null +++ b/.gitconfig-evolit @@ -0,0 +1,3 @@ +[user] + name = Lukas Kopatz + email = lukas.kopatz@evolit.com diff --git a/flake.lock b/flake.lock index 38cdb1e..75b2d20 100644 --- a/flake.lock +++ b/flake.lock @@ -104,16 +104,16 @@ ] }, "locked": { - "lastModified": 1695108154, - "narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=", + "lastModified": 1700814205, + "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=", "owner": "nix-community", "repo": "home-manager", - "rev": "07682fff75d41f18327a871088d20af2710d4744", + "rev": "aeb2232d7a32530d3448318790534d196bf9427a", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.05", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -223,16 +223,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1699110214, - "narHash": "sha256-L2TU4RgtiqF69W8Gacg2jEkEYJrW+Kp0Mp4plwQh5b8=", + "lastModified": 1700671922, + "narHash": "sha256-XPh/AHD14O+oaztjSb53c3Gh9K1JQHNBOTdn0dvtJpM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "78f3a4ae19f0e99d5323dd2e3853916b8ee4afee", + "rev": "4784a12198f7434971d5bb8aa6f111acef662ff4", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index b3f475e..4ef33d6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,11 +3,11 @@ inputs = { # secrets management agenix.url = "github:ryantm/agenix"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-wsl = { @@ -94,12 +94,14 @@ ./users/kopatz.nix ./modules/graphical/plasma.nix ./modules/graphical/shared.nix + ./modules/hardware/ssd.nix ./modules/nix/settings.nix ./modules/nix/index.nix ./modules/nix/ld.nix ./modules/gpg.nix ./modules/virt-manager.nix ./modules/flatpak.nix + ./modules/noise-supression.nix ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./modules/wooting.nix ./modules/support/ntfs.nix diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index 9beb70f..69473b8 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -72,6 +72,9 @@ in localsend element-desktop tetrio-desktop + krita + unstable.libreoffice-fresh + mangohud ]; environment.sessionVariables = { diff --git a/modules/noise-supression.nix b/modules/noise-supression.nix new file mode 100644 index 0000000..c46b29e --- /dev/null +++ b/modules/noise-supression.nix @@ -0,0 +1,3 @@ +{ + programs.noisetorch.enable = true; +} From 4d3fc04cd76ff43509b1c45c73fae28062a90c65 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:17:28 +0100 Subject: [PATCH 14/17] update gitconfig --- .gitconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitconfig b/.gitconfig index 33c6f2f..a3b3584 100644 --- a/.gitconfig +++ b/.gitconfig @@ -18,6 +18,13 @@ lg = !"git lg1" [color] ui = true +[mergetool] + keeptemporaries = false + keepbackups = false + prompt = false + trustexitcode = false +[pull] + ff = true [includeIf "gitdir/i:~/projects/github/**"] path = .gitconfig-github From 14d982a508f7533d27d204fea0ecf38473f23e31 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 24 Nov 2023 16:09:04 +0100 Subject: [PATCH 15/17] add screenshot tool --- modules/graphical/shared.nix | 4 ++++ systems/pc/configuration.nix | 2 ++ 2 files changed, 6 insertions(+) diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index 69473b8..f926d6e 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -6,6 +6,9 @@ let pkgs.keepass-keepassrpc ]; }; + screenshot = pkgs.writeShellScriptBin "screenshot.sh" '' + ${pkgs.scrot}/bin/scrot -fs - | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png -i + ''; in { programs.steam = { @@ -75,6 +78,7 @@ in krita unstable.libreoffice-fresh mangohud + screenshot ]; environment.sessionVariables = { diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 3b7d477..4c49eea 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -48,6 +48,8 @@ # Enable networking networking.networkmanager.enable = true; + boot.initrd.systemd.network.wait-online.enable = false; + systemd.network.wait-online.enable = false; # Set your time zone. time.timeZone = "Europe/Vienna"; From 98856a09c585e01d6538803d56628ab6b9b8852a Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 25 Nov 2023 11:44:43 +0100 Subject: [PATCH 16/17] tmpfs and set noatime --- flake.nix | 3 +++ laptop/hardware-configuration.nix | 4 ++++ modules/tmpfs.nix | 3 +++ systems/pc/configuration.nix | 3 +++ systems/pc/hardware-configuration.nix | 4 ++++ systems/server/hardware-configuration.nix | 6 +++++- 6 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 modules/tmpfs.nix diff --git a/flake.nix b/flake.nix index 3275dac..72be374 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ ./modules/paperless.nix ./modules/kavita.nix ./modules/netdata.nix + ./modules/tmpfs.nix ### Hardware ### ./modules/hardware/ssd.nix home-manager.nixosModules.home-manager @@ -106,6 +107,7 @@ ./modules/noise-supression.nix ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./modules/wooting.nix + ./modules/tmpfs.nix ./modules/support/ntfs.nix ./systems/pc/configuration.nix agenix.nixosModules.default @@ -131,6 +133,7 @@ #./modules/wake-on-lan.nix ./modules/thunderbolt.nix ./modules/rdp.nix + ./modules/tmpfs.nix nixos-hardware.nixosModules.dell-xps-15-7590-nvidia agenix.nixosModules.default home-manager.nixosModules.home-manager diff --git a/laptop/hardware-configuration.nix b/laptop/hardware-configuration.nix index 041c0ce..38b29f3 100644 --- a/laptop/hardware-configuration.nix +++ b/laptop/hardware-configuration.nix @@ -16,6 +16,10 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/b90bb1c8-922d-45b4-b911-74c37dca2ed3"; fsType = "ext4"; + options = [ + "defaults" + "noatime" + ]; }; fileSystems."/boot" = diff --git a/modules/tmpfs.nix b/modules/tmpfs.nix new file mode 100644 index 0000000..7177b8a --- /dev/null +++ b/modules/tmpfs.nix @@ -0,0 +1,3 @@ +{ + boot.tmp.useTmpfs = true; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 4c49eea..ee4aa54 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -50,6 +50,9 @@ networking.networkmanager.enable = true; boot.initrd.systemd.network.wait-online.enable = false; systemd.network.wait-online.enable = false; + + #disable firewall when doing ipv6 vm stuff + #networking.firewall.enable = lib.mkForce false; # Set your time zone. time.timeZone = "Europe/Vienna"; diff --git a/systems/pc/hardware-configuration.nix b/systems/pc/hardware-configuration.nix index b572ac4..e891a66 100644 --- a/systems/pc/hardware-configuration.nix +++ b/systems/pc/hardware-configuration.nix @@ -16,6 +16,10 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/dd65bdf8-c003-439c-a1aa-d050cb20959d"; fsType = "ext4"; + options = [ + "defaults" + "noatime" + ]; }; fileSystems."/boot" = diff --git a/systems/server/hardware-configuration.nix b/systems/server/hardware-configuration.nix index 2b17482..ca47570 100644 --- a/systems/server/hardware-configuration.nix +++ b/systems/server/hardware-configuration.nix @@ -16,6 +16,10 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/1af836fb-ffef-4362-84af-bcb24d4db068"; fsType = "ext4"; + options = [ + "defaults" + "noatime" + ]; }; fileSystems."/boot" = @@ -42,7 +46,7 @@ fileSystems."/mnt/250ssd" = { device = "/dev/disk/by-uuid/80163cf9-2030-4757-ada2-03db96184961"; fsType = "ext4"; - options = ["defaults" "nofail"]; + options = ["defaults" "nofail" "noatime"]; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking From 58eb258629701eeff00537c60c28e74686f9c46e 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 17/17] make server work with nixos 23.11 --- modules/adguard.nix | 1 + modules/github-runner.nix | 2 +- modules/nextcloud.nix | 5 +++-- secrets/github-runner-pw.age | Bin 658 -> 685 bytes 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/adguard.nix b/modules/adguard.nix index b659d35..870871b 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -10,6 +10,7 @@ in services.adguardhome = { enable = true; settings = { + schema_version = 20; users = [ { name = "admin"; diff --git a/modules/github-runner.nix b/modules/github-runner.nix index fb1aee8..1c38d61 100644 --- a/modules/github-runner.nix +++ b/modules/github-runner.nix @@ -7,7 +7,7 @@ users.groups.github-actions-runner = {}; users.users.github-actions-runner = { isSystemUser = true; - passwordFile = config.age.secrets.github-runner-pw.path; + hashedPasswordFile = config.age.secrets.github-runner-pw.path; group = "github-actions-runner"; extraGroups = [ "docker" ]; }; diff --git a/modules/nextcloud.nix b/modules/nextcloud.nix index 39b963f..490bdc8 100644 --- a/modules/nextcloud.nix +++ b/modules/nextcloud.nix @@ -64,12 +64,13 @@ in spreed = pkgs.fetchNextcloudApp rec { url = "https://github.com/nextcloud-releases/spreed/releases/download/v17.1.1/spreed-v17.1.1.tar.gz"; sha256 = "sha256-LaUG0maatc2YtWQjff7J54vadQ2RE4X6FcW8vFefBh8="; + license = "agpl3"; }; }; phpOptions = { - upload_max_filesize = "5G"; - post_max_size = "5G"; + upload_max_filesize = lib.mkForce "5G"; + post_max_size = lib.mkForce "5G"; }; extraAppsEnable = true; extraOptions.enabledPreviewProviders = [ 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