From 5cf1b9254e1b22e0ccf7b07f80fa1e8a444925c8 Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Sat, 16 Mar 2024 18:28:01 +0100 Subject: [PATCH] pull out shared components --- configuration.nix | 22 +++- flake.lock | 147 ++++++++++++++++++------- flake.nix | 23 +--- modules/cloudsync.nix | 2 - modules/fonts.nix | 4 - modules/localisation.nix | 25 ----- modules/mypackaegsstayinstoreffs.nix | 13 --- modules/network.nix | 45 -------- modules/nvidia.nix | 54 --------- modules/opengl.nix | 23 ---- modules/polkit.nix | 19 ---- modules/printing.nix | 18 --- modules/screenshare_select.nix | 17 +++ modules/{sound.nix => spotify-tui.nix} | 13 --- modules/system-packages.nix | 17 --- modules/toolchains.nix | 111 ------------------- modules/tui.nix | 15 --- modules/users.nix | 6 - modules/xdg.nix | 35 ------ modules/xserver.nix | 6 +- 20 files changed, 157 insertions(+), 458 deletions(-) delete mode 100644 modules/localisation.nix delete mode 100644 modules/mypackaegsstayinstoreffs.nix delete mode 100644 modules/network.nix delete mode 100644 modules/nvidia.nix delete mode 100644 modules/opengl.nix delete mode 100644 modules/polkit.nix delete mode 100644 modules/printing.nix create mode 100644 modules/screenshare_select.nix rename modules/{sound.nix => spotify-tui.nix} (86%) delete mode 100644 modules/toolchains.nix delete mode 100644 modules/tui.nix delete mode 100644 modules/xdg.nix diff --git a/configuration.nix b/configuration.nix index da80c2a..b75c6b7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -21,16 +21,32 @@ boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; - kernelParams = [ "nouveau.config=NvGspRm=1" "quiet" ]; - kernelPackages = pkgs.linuxPackagesFor ( pkgs.linux_latest ); + kernelParams = [ "quiet" ]; + kernelPackages = pkgs.linuxPackagesFor ( pkgs.linux_6_7 ); }; # Enable flatpaks services.flatpak.enable = true; - programs.thefuck.enable = true; chaotic.mesa-git.enable = true; + grimmShared = { + enable = true; + locale = true; + printing = true; + portals = true; + network = true; + tooling = { + enable = true; + }; + sound = true; + graphical = true; + }; + + age.identityPaths = [ "/home/grimmauld/.ssh/id_rsa" ]; + + networking.hostName = "grimmauld-nixos"; + environment.sessionVariables = { NIXPKGS_ALLOW_UNFREE="1"; OMP_NUM_THREADS = "12"; diff --git a/flake.lock b/flake.lock index fb2b765..8e32a9c 100644 --- a/flake.lock +++ b/flake.lock @@ -78,11 +78,11 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1709828095, - "narHash": "sha256-subJqhj34TJ00C0qbGPUkozt4nMNi5DZltw/i4xmgVE=", + "lastModified": 1710512612, + "narHash": "sha256-XMyG8ceRZ3aIqSJy/XlJHzkOaNCudldWq8Zrn2NfgcA=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "9b54befbe7993ed2abe91f4d76e259b3e8f9d922", + "rev": "4417bbe33cb131959a9635815faa092c0934b36b", "type": "github" }, "original": { @@ -138,17 +138,17 @@ ] }, "locked": { - "lastModified": 1709522437, - "narHash": "sha256-mS0tYjN3B2cLfF+p8m/0YAMNOEQSx/HJT6BOy/XcOLw=", + "lastModified": 1710090208, + "narHash": "sha256-1W7yDW+kqCr/9SygZwygBayE8HwLnzJq48fMAOZQLAY=", "owner": "girlbossceo", "repo": "conduwuit", - "rev": "b527ec46661a9a5efe22aa83eeb9fbbe37c41850", - "type": "gitlab" + "rev": "e888a0a745ac979abe6a687ff24b8c5e7b7b79ed", + "type": "github" }, "original": { "owner": "girlbossceo", "repo": "conduwuit", - "type": "gitlab" + "type": "github" } }, "crane": { @@ -230,6 +230,22 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1673956053, @@ -285,12 +301,12 @@ ] }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "revCount": 91, + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "revCount": 92, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.91%2Brev-d465f4819400de7c8d874d50b982301f28a84605/018defde-b702-7c49-9ad0-aa7e8781287b/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.92%2Brev-b1d9ab70662946ef0850d488da1c9019f3a9752a/018e2ca5-e5a2-7f80-9261-445a8cecd4d7/source.tar.gz" }, "original": { "type": "tarball", @@ -347,11 +363,11 @@ ] }, "locked": { - "lastModified": 1709744297, - "narHash": "sha256-Q2LOs08hmFlzJdJMN4yNrWvZTegfpHEajLin0vcw7t0=", + "lastModified": 1710404304, + "narHash": "sha256-tYsUAsZgt9TT7d+r1KRYHWyBRWedJ39SXNBVSCQVsGQ=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "f8e3302ee1e0ccaabc443f45dc415e117b54926f", + "rev": "ffa51458aec4d53aac85b6dee1ee2ec29f4e953f", "type": "github" }, "original": { @@ -373,11 +389,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1709786138, - "narHash": "sha256-yppQIffjpyQ2nqhiZbV2pSMQJx8srmHjAk+UClCQfRw=", + "lastModified": 1710484139, + "narHash": "sha256-vOm70QgvfjHNQa9vmpxPsm1xE4PTmqtkDpe22/ra5cw=", "owner": "martinvonz", "repo": "jj", - "rev": "bf76080f42f77cad934d9a5202c7b7d29ab2c890", + "rev": "3bb9fd412ac7f021a2fa09503fdec93ac066d7b7", "type": "github" }, "original": { @@ -410,11 +426,11 @@ ] }, "locked": { - "lastModified": 1709751999, - "narHash": "sha256-9I0bn0iSdYXHIPhU1Ne8Ooxfnut/qMtNDutBii9NxQE=", + "lastModified": 1710494976, + "narHash": "sha256-WDuSPzeKecrolclXHmPk44Ch28+DQXHqYFOJkHSWFgM=", "owner": "YaLTeR", "repo": "niri", - "rev": "1a784e6e66785f360da6df59ae2fb4b98370ca3c", + "rev": "642c6e7512f25f1fdc47dfa6a6eaec38c5faa69b", "type": "github" }, "original": { @@ -425,11 +441,11 @@ }, "nix-filter": { "locked": { - "lastModified": 1705332318, - "narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=", + "lastModified": 1710156097, + "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "owner": "numtide", "repo": "nix-filter", - "rev": "3449dc925982ad46246cfc36469baf66e1b64f17", + "rev": "3342559a24e85fc164b295c3444e8a139924675b", "type": "github" }, "original": { @@ -442,15 +458,16 @@ "inputs": { "flake-parts": "flake-parts", "nixpkgs": [ + "shared", "nixpkgs" ] }, "locked": { - "lastModified": 1709428394, - "narHash": "sha256-WIDKofwDWFLHtk14MdBiRiM8Lxn+OByHYtybjSU/18Q=", + "lastModified": 1710551318, + "narHash": "sha256-s1fOcZdpMbPOTuyVpzvN8QXdxS/viYjQ6J+hTR8NGys=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "1f3fa3b398051c815e8500d4c4fe794ecfdee328", + "rev": "8b46b34b574cd1e6a9a8ded392f5b2f97b1f46a2", "type": "github" }, "original": { @@ -484,11 +501,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", "type": "github" }, "original": { @@ -536,8 +553,8 @@ "inputs": { "agenix": "agenix", "chaotic": "chaotic", - "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs", + "shared": "shared", "swayfx": "swayfx", "swaymux": "swaymux" } @@ -586,9 +603,32 @@ "type": "github" } }, - "swayfx": { + "shared": { "inputs": { "flake-compat": "flake-compat_2", + "nix-gaming": "nix-gaming", + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1710609877, + "narHash": "sha256-lKxTaTTFxsIiv4Z4X3dMIaCtCHS6pxdvEy5EASIIRKA=", + "ref": "refs/heads/main", + "rev": "5e620c121570b823d8b8d6c191c48d8016cd92b3", + "revCount": 25, + "type": "git", + "url": "https://git.grimmauld.de/Grimmauld/grimm-nix-shared" + }, + "original": { + "type": "git", + "url": "https://git.grimmauld.de/Grimmauld/grimm-nix-shared" + } + }, + "swayfx": { + "inputs": { + "flake-compat": "flake-compat_3", "nixpkgs": [ "nixpkgs" ] @@ -614,11 +654,11 @@ ] }, "locked": { - "lastModified": 1710004931, - "narHash": "sha256-0i6cLh3Mrgj7ZnQX68Fe66ozIXCFS7WjkKV5CL2EmCQ=", + "lastModified": 1710362637, + "narHash": "sha256-i5fTiwb4SvEIoEcJyPMLy0QYtlIuoJagpSMb+KDwLdQ=", "ref": "refs/heads/main", - "rev": "55384e0ceda36f7137203607179fc9b4ff85827f", - "revCount": 14, + "rev": "4e6afa08fd8c9a302e3ad634c691fcd3fcf516d1", + "revCount": 27, "type": "git", "url": "https://git.grimmauld.de/Grimmauld/swaymux" }, @@ -657,6 +697,39 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "yafas": { "inputs": { "flake-schemas": [ diff --git a/flake.nix b/flake.nix index f4d5fd5..17c08f7 100644 --- a/flake.nix +++ b/flake.nix @@ -21,13 +21,13 @@ url = "github:WillPower3309/swayfx"; inputs.nixpkgs.follows = "nixpkgs"; }; - nix-gaming = { - url = "github:fufexan/nix-gaming"; + shared = { + url = "git+https://git.grimmauld.de/Grimmauld/grimm-nix-shared"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs @ { self, agenix, nix-gaming, nixpkgs, chaotic, swayfx, swaymux, ... }: let + outputs = inputs @ { self, agenix, shared, nixpkgs, chaotic, swayfx, swaymux, ... }: let system = "x86_64-linux"; # pkg-overlays = import nixpkgs { @@ -45,33 +45,22 @@ modules = [ # ({ config, pkgs, ... }: { nixpkgs.overlays = [ (import ./overlay.nix {inherit inputs system;} ) ]; }) agenix.nixosModules.default - nix-gaming.nixosModules.pipewireLowLatency chaotic.nixosModules.default + shared.nixosModules.default # swaymux.nixosModules.default # ./kernel.nix ./configuration.nix -# ./modules/accessibility.nix ./modules/sway.nix -# ./modules/sunshine.nix - ./modules/localisation.nix ./modules/users.nix ./modules/tlp.nix - ./modules/printing.nix - ./modules/network.nix - ./modules/xdg.nix ./modules/fonts.nix - ./modules/polkit.nix - ./modules/sound.nix + ./modules/screenshare_select.nix +# ./modules/spotify-tui.nix ./modules/tabletdriver.nix ./modules/xserver.nix ./modules/system-packages.nix - ./modules/mypackaegsstayinstoreffs.nix - ./modules/opengl.nix # ./modules/kvm.nix - ./modules/toolchains.nix - ./modules/tui.nix ./modules/cloudsync.nix -# ./cachix.nix { environment.systemPackages = [ agenix.packages.${system}.default ]; } ]; }; diff --git a/modules/cloudsync.nix b/modules/cloudsync.nix index 8fdd175..24c2d49 100644 --- a/modules/cloudsync.nix +++ b/modules/cloudsync.nix @@ -3,7 +3,6 @@ sync_user = "grimmauld"; sync_user_remote = "Grimmauld"; sync_server = "cloud.grimmauld.de"; - # cloud_cmd = "${pkgs.nextcloud-client}/bin/nextcloudcmd -u ${sync_user_remote} -p -h -n --path"; sync_script = let cloud_cmd = ''${pkgs.nextcloud-client}/bin/nextcloudcmd -u ${sync_user_remote} -p "$(cat ${config.age.secrets.nextcloud_pass.path})" -h -n --path''; in '' @@ -33,7 +32,6 @@ in { wants = [ "network-online.target" ]; serviceConfig.Type = "simple"; serviceConfig.User = sync_user; -# serviceConfig.UID = 1000; serviceConfig.Group= "users"; script= sync_script; # TimeoutStopSec = "180"; diff --git a/modules/fonts.nix b/modules/fonts.nix index 49483e0..1ed2685 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -8,8 +8,4 @@ roboto liberation_ttf ]; - fonts.fontDir.enable = true; - environment.sessionVariables = { - FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"; - }; } diff --git a/modules/localisation.nix b/modules/localisation.nix deleted file mode 100644 index 1ad7e81..0000000 --- a/modules/localisation.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - time.timeZone = "Europe/Berlin"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - - console.keyMap = "de"; - - services.xserver.xkb = { - layout = "de"; - variant = ""; - }; -} diff --git a/modules/mypackaegsstayinstoreffs.nix b/modules/mypackaegsstayinstoreffs.nix deleted file mode 100644 index 0ab6522..0000000 --- a/modules/mypackaegsstayinstoreffs.nix +++ /dev/null @@ -1,13 +0,0 @@ -{users, pkgs, ...}: -{ - users.extraUsers.mypackaegsstayinstoreffs = { - isNormalUser = true; - description = "dummy user to prevent nix gc from clearing out large packages"; - packages = with pkgs; [ - jetbrains.clion - jetbrains.pycharm-community - jetbrains.idea-community -# cudatoolkit_11 - ]; - }; -} diff --git a/modules/network.nix b/modules/network.nix deleted file mode 100644 index 0aa807c..0000000 --- a/modules/network.nix +++ /dev/null @@ -1,45 +0,0 @@ -{pkgs, lib, ...}: -{ - # 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.enp3s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - - networking.hostName = "grimmauld-nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - networking.firewall.allowedTCPPorts = [ 5900 ]; - - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - - # Bluetooth - services.blueman.enable = true; - hardware.bluetooth.enable = true; - - systemd.user.services.mpris-proxy = { - description = "Mpris proxy"; - after = [ "network.target" "sound.target" ]; - wantedBy = [ "default.target" ]; - serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; - }; - - environment.systemPackages = with pkgs; [ - wireguard-tools - ]; -} diff --git a/modules/nvidia.nix b/modules/nvidia.nix deleted file mode 100644 index 04d8e1d..0000000 --- a/modules/nvidia.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; -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 = true; - - # 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.beta; - }; - - hardware.nvidia.prime = { - sync.enable = true; -# offload = { -# enable = true; -# enableOffloadCmd = true; -# }; - - # Make sure to use the correct Bus ID values for your system! - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - - specialisation = { - on-the-go.configuration = { - system.nixos.tags = [ "on-the-go" ]; - powerManagement.cpuFreqGovernor = lib.mkForce "powersave"; - hardware.nvidia = { - prime.offload.enable = lib.mkForce true; - prime.offload.enableOffloadCmd = lib.mkForce true; - prime.sync.enable = lib.mkForce false; - }; - }; - }; -} diff --git a/modules/opengl.nix b/modules/opengl.nix deleted file mode 100644 index 845b830..0000000 --- a/modules/opengl.nix +++ /dev/null @@ -1,23 +0,0 @@ -{pkgs, ...}: { - # Enable OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - extraPackages = with pkgs; []; - }; - - environment.sessionVariables = { - __GL_LOG_MAX_ANISO = "0"; - __GL_SHADER_DISK_CACHE = "1"; - __GL_SYNC_TO_VBLANK = "0"; - __GL_THREADED_OPTIMIZATIONS = "1"; - __GL_VRR_ALLOWED = "1"; -# MESA_LOADER_DRIVER_OVERRIDE="zink"; -# FLATPAK_GL_DRIVERS="mesa-git"; - }; - - environment.systemPackages = with pkgs; [ - glfw - ]; -} diff --git a/modules/polkit.nix b/modules/polkit.nix deleted file mode 100644 index 4e2d487..0000000 --- a/modules/polkit.nix +++ /dev/null @@ -1,19 +0,0 @@ -{pkgs, ...}: -{ - security.polkit.enable = true; - - systemd.user.services.polkit-kde-authentication-agent-1 = { - enable = true; - description = "polkit-kde-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - wants = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; -} diff --git a/modules/printing.nix b/modules/printing.nix deleted file mode 100644 index 1dd3274..0000000 --- a/modules/printing.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ... }: -{ - imports = - [ # Include the results of the hardware scan. -# - ]; - - # Enable CUPS to print documents. - services.printing.enable = true; - services.printing.drivers = with pkgs; [ brgenml1lpr brgenml1cupswrapper ]; - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; - services.printing.cups-pdf.enable = true; - hardware.sane.brscan4.enable = true; # enables support for SANE scanners -} diff --git a/modules/screenshare_select.nix b/modules/screenshare_select.nix new file mode 100644 index 0000000..7c851e2 --- /dev/null +++ b/modules/screenshare_select.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: +{ + xdg.portal.wlr.settings = { + screencastExternal = { + output_name = "HDMI-A-1"; + max_fps = 60; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + screencastInternal = { + output_name = "eDP-1"; + max_fps = 144; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; +} diff --git a/modules/sound.nix b/modules/spotify-tui.nix similarity index 86% rename from modules/sound.nix rename to modules/spotify-tui.nix index 3850511..d050c20 100644 --- a/modules/sound.nix +++ b/modules/spotify-tui.nix @@ -26,21 +26,8 @@ END ''; });}) ]; - # 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; - jack.enable = true; # osu uses jack - systemWide = true; # required for spotifyd as spotifyd runs as the spotifyd user - }; environment.systemPackages = with pkgs; [ - pavucontrol spotify-tui spotifyd ]; diff --git a/modules/system-packages.nix b/modules/system-packages.nix index 511b385..e85d3d4 100644 --- a/modules/system-packages.nix +++ b/modules/system-packages.nix @@ -1,28 +1,11 @@ {pkgs, ...}: { - programs.droidcam.enable = true; environment.systemPackages = with pkgs; [ spice-gtk - wget - tree - file kate - util-linux - btop - kitty - polkit-kde-agent - skanpage - cached-nix-shell - gnupg - visualvm - ffmpeg-full - lm_sensors oci-cli xcb-util-cursor krfb - imagemagick - pypy3 - kdePackages.audiocd-kio (writeShellScriptBin "primerun" '' diff --git a/modules/toolchains.nix b/modules/toolchains.nix deleted file mode 100644 index 949539b..0000000 --- a/modules/toolchains.nix +++ /dev/null @@ -1,111 +0,0 @@ -{config, pkgs, ...}: let - git_user = "Grimmauld"; -in { - environment.systemPackages = with pkgs; [ - (writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@") - (writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@") - (writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@") - mkpasswd - cargo - gcc - rustc - rustfmt - rust-analyzer - jdk17 - python3 - pkg-config - - pinentry - pass - libsecret - tea - acpi - (writeShellScriptBin "passw" "pass $@") -# nodejs_21 # ugh.... somehow nvim needs node now?!? - ]; - - programs.git = { - enable = true; - lfs.enable = true; - config = { - init.defaultBranch = "main"; - credential.username = git_user; - core.editor = "${pkgs.neovim}/bin/nvim"; - user.name = git_user; - user.email = "${git_user}@grimmauld.de"; - }; - }; - - programs.tmux = { - enable = true; - historyLimit = 42000; - #keyMode = "vi"; - }; - - virtualisation.docker.enable = true; - - - programs.neovim = { - enable = true; - viAlias = true; - defaultEditor = true; - configure = { - customRC = '' - set number - set hidden - set fileencodings=utf-8 - set nocompatible - set clipboard+=unnamedplus - if filereadable($HOME . "/.vimrc") - source ~/.vimrc - endif -''; - packages.myVimPackage = with pkgs.vimPlugins; { - # loaded on launch - start = [ - vim-nix - vim-scala - fugitive - nvim-lspconfig -# autoclose-nvim -# coc-nvim -# mason-nvim -# mason-lspconfig-nvim -# coc-rust-analyzer -# rust-tools-nvim - vim-vsnip - cmp-path - cmp-nvim-lsp-signature-help - cmp-nvim-lua - cmp-buffer - cmp-vsnip - nvim-dap - nvim-treesitter-parsers.rust - nvim-treesitter-parsers.lua - nvim-treesitter-parsers.toml - nvim-treesitter-parsers.c - nvim-treesitter-parsers.vimdoc - nvim-treesitter - vimspector - snippets-nvim - ]; - - # manually loadable by calling `:packadd $plugin-name` - opt = [ ]; - }; - }; - }; - - services.passSecretService.enable = true; - services.pcscd.enable = true; - programs.xonsh.enable = true; - programs.ssh.startAgent = true; - programs.gnupg.agent = { - settings = { -# default-cache-ttl = 6000; - }; - pinentryFlavor = "tty"; - enable = true; - # enableSSHSupport = true; - }; -} diff --git a/modules/tui.nix b/modules/tui.nix deleted file mode 100644 index 3afc0a9..0000000 --- a/modules/tui.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ... }: { - environment.systemPackages = with pkgs; [ - fbcat - gomuks - gotop - bluetuith - spotify-tui - ranger - alacritty - playerctl - pulseaudio - nix-search-cli - nixos-option - ]; -} diff --git a/modules/users.nix b/modules/users.nix index 7ef42cf..4bf3655 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -7,15 +7,10 @@ packages = with pkgs; [ webcord discord - nomacs heroic plasma-browser-integration - pdfarranger kwrited - hyfetch - gparted element-desktop - nmap ghidra # firefox kcalc @@ -57,5 +52,4 @@ }; services.udev.packages = [ pkgs.wooting-udev-rules ]; - services.blueman.enable = true; } diff --git a/modules/xdg.nix b/modules/xdg.nix deleted file mode 100644 index f781d48..0000000 --- a/modules/xdg.nix +++ /dev/null @@ -1,35 +0,0 @@ -{pkgs, ...}: -{ - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-kde - xdg-desktop-portal-gtk - ]; - wlr.settings = { - screencastExternal = { - output_name = "HDMI-A-1"; - max_fps = 60; - # exec_before = "disable_notifications.sh"; - # exec_after = "enable_notifications.sh"; - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; - }; - screencastInternal = { - output_name = "eDP-1"; - max_fps = 144; - # exec_before = "disable_notifications.sh"; - # exec_after = "enable_notifications.sh"; - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; - }; - - }; - }; - - environment.sessionVariables = { - XDG_CONFIG_HOME = "$HOME/.config"; - }; -} diff --git a/modules/xserver.nix b/modules/xserver.nix index 615551a..ea40ab0 100644 --- a/modules/xserver.nix +++ b/modules/xserver.nix @@ -13,11 +13,15 @@ defaultSession = "sway"; }; desktopManager = { - plasma6.enable = true; # xfce.enable = true; }; }; + services.desktopManager = { + plasma6.enable = true; +# xfce.enable = true; + }; + # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; }