diff --git a/configuration.nix b/configuration.nix index 86041e0..e9d7013 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,45 +1,45 @@ -{ pkgs, hyper, inputs, ... }: +{ ... }@all: with all; { imports = [ inputs.sops-nix.nixosModules.sops - inputs.nixpkgs.nixosModules.readOnlyPkgs - ./system-modules/adb.nix ./system-modules/auto-mount.nix + ./system-modules/tz.nix + ./system-modules/bluetooth.nix ./system-modules/boot.nix - ./system-modules/boot.nix + ./system-modules/cache.nix ./system-modules/calendar.nix ./system-modules/dm.nix ./system-modules/docker.nix ./system-modules/fcitx5.nix ./system-modules/fonts.nix - ./system-modules/fonts.nix - ./system-modules/fuse.nix ./system-modules/fuse.nix ./system-modules/games.nix ./system-modules/gc.nix - ./system-modules/gc.nix ./system-modules/gpg.nix ./system-modules/hardware-configuration.nix - ./system-modules/hardware-configuration.nix ./system-modules/health_reminder.nix ./system-modules/hsmw.nix ./system-modules/kanata.nix + ./system-modules/terminal.nix ./system-modules/kodi.nix ./system-modules/networking.nix ./system-modules/nixd.nix ./system-modules/nvidia.nix - ./system-modules/nvidia.nix ./system-modules/ollama.nix ./system-modules/qmk.nix ./system-modules/scanning.nix ./system-modules/sops.nix ./system-modules/sound.nix - ./system-modules/sound.nix ./system-modules/sshd.nix + ./system-modules/base-packages.nix + ./system-modules/input.nix ./system-modules/syncthing.nix ./system-modules/tuda.nix - ./system-modules/users.nix + ./system-modules/gui.nix + ./system-modules/editor.nix + ./system-modules/printing.nix + ./system-modules/security.nix ./system-modules/users.nix ./system-modules/virtualisation.nix ./system-modules/ydotool.nix @@ -49,112 +49,20 @@ ./system-modules/postgres.nix ./system-modules/nx2site/proxy.nix ./system-modules/nx2site/audiobookshelf.nix - # ./system-modules/nx2site/dyn_dns.nix ./system-modules/nx2site/gitea.nix ./system-modules/nx2site/open-web-calendar.nix ./system-modules/nx2site/radicale.nix - # ./system-modules/nx2site/nextcloud.nix ./system-modules/nx2site/vaultwarden.nix ./system-modules/nx2site/paperless.nix - - ./system-modules/calendar-publish.nix - ./system-modules/calendar-lec.nix - ./system-modules/calendar-lr.nix - ./system-modules/calendar-dicos.nix + ./system-modules/calendar/publish.nix + ./system-modules/calendar/lec.nix + ./system-modules/calendar/lr.nix + ./system-modules/calendar/dicos.nix ] else [ ]); - - # Set your time zone. - time.timeZone = "Europe/Berlin"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - console.font = "Lat2-Terminus16"; - console.keyMap = "de"; - - services.xserver = { - enable = true; - xkb = { - layout = "de"; - options = "eurosign:e,caps:escape"; - }; - # lightdm in lightdm.nix - }; - # Enable CUPS to print documents. - services.printing.enable = true; - - # rtkit is optional but recommended - security.rtkit.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; - hardware.uinput.enable = true; - - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - package = pkgs.bluez5-experimental; - settings.Policy.AutoEnable = "true"; - settings.General.Enable = "Source,Sink,Media,Socket"; - }; - services.blueman.enable = true; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; ([ - git - git-crypt - lazygit # home-manager module is bugged - wget - curlHTTP3 - zip - unzip - p7zip - unar - nano - htop - direnv - openssl - blueman - dmidecode - file - parallel - # ]) ++ (with pkgs-unstable; [ - # # sendme - ]); - - environment.variables = { - EDITOR = "hx"; - VISUAL = "hx"; - }; - - - programs.hyprland = { - # config is done with home-manager - enable = true; - xwayland.enable = true; - }; - systemd.extraConfig = "DefaultLimitNOFILE=2048"; - boot.tmp.useTmpfs = false; - - system.stateVersion = pkgs.version; - - nixpkgs.pkgs = pkgs; - - nix = { - settings = { - experimental-features = [ "nix-command" "flakes" ]; - substitute = true; - substituters = [ - "https://yazi.cachix.org" - ]; - trusted-public-keys = [ - "yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k=" - ]; - }; - }; - + system.stateVersion = hyper.pkgs-version; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; programs.bash.shellInit = '' source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh ''; diff --git a/flake.lock b/flake.lock index 114ad5b..afde90a 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1749155310, - "narHash": "sha256-t0HfHg/1+TbSra5s6nNM0o4tnb3uqWedShSpZXsUMYY=", + "lastModified": 1750372185, + "narHash": "sha256-lVBKxd9dsZOH1fA6kSE5WNnt8e+09fN+NL/Q3BjTWHY=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "94981cf75a9f11da0b6dd6a1abbd7c50a36ab2d3", + "rev": "7cef49d261cbbe537e8cb662485e76d29ac4cbca", "type": "github" }, "original": { @@ -200,27 +200,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nix-on-droid", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709445365, - "narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "4de84265d7ec7634a69ba75028696d74de9a44a7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -266,11 +245,11 @@ ] }, "locked": { - "lastModified": 1749238452, - "narHash": "sha256-8qiKEWcxUrjpUpK+WyFNg/72C8rp70LUuyTD23T+SdQ=", + "lastModified": 1750371717, + "narHash": "sha256-cNP+bVq8m5x2Rl6MTjwfQLCdwbVmKvTH7yqVc1SpiJM=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "c7225d73755a6c4c7c72f4d4f3925ea426e325a8", + "rev": "15c6f8f3a567fec9a0f732cd310a7ff456deef88", "type": "github" }, "original": { @@ -295,11 +274,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1749982876, - "narHash": "sha256-SCorI7O9GEF804gf/VcDwXHZx5Y2ISvsOoVsShpHJbA=", + "lastModified": 1750589353, + "narHash": "sha256-ESfhPjQ6E/JUdFknr+HTHqZU5ZcwlTODemMTxApg1D0=", "ref": "refs/heads/main", - "rev": "d037c54260d4f55c7f7b5ca69faa2ebe10289ef8", - "revCount": 6193, + "rev": "dd33128c2f127f39c30cca72addb1970b8936d07", + "revCount": 6213, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -327,11 +306,11 @@ ] }, "locked": { - "lastModified": 1749980366, - "narHash": "sha256-sB2jmzoZgxMOpLsw4EfQyp2NbO3qhorR6gAdbNXHxOk=", + "lastModified": 1750503578, + "narHash": "sha256-/qnR7/GvGP1cGtOOm4OGJRtkVejn75/jsvJpiqE1ZDk=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "4783860953a0777fee43d45fee0df9173f9e8c9e", + "rev": "8b4405ab46cafc471d5b09ff7258676dc9aaca59", "type": "github" }, "original": { @@ -420,11 +399,11 @@ ] }, "locked": { - "lastModified": 1749155776, - "narHash": "sha256-t1PM0wxQLQwv2F2AW23uA7pm5giwmcgYEWbNIRct9r4=", + "lastModified": 1750371812, + "narHash": "sha256-D868K1dVEACw17elVxRgXC6hOxY+54wIEjURztDWLk8=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "396e8aa1c06274835b69da7f9a015fff9a9b7522", + "rev": "b13c7481e37856f322177010bdf75fccacd1adc8", "type": "github" }, "original": { @@ -449,11 +428,11 @@ ] }, "locked": { - "lastModified": 1749145882, - "narHash": "sha256-qr0KXeczF8Sma3Ae7+dR2NHhvG7YeLBJv19W4oMu6ZE=", + "lastModified": 1750371198, + "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "1bfb84f54d50c7ae6558c794d3cfd5f6a7e6e676", + "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", "type": "github" }, "original": { @@ -495,11 +474,11 @@ ] }, "locked": { - "lastModified": 1749819919, - "narHash": "sha256-7F/KG8dwSH9JXdlpOVrEEArS+PJSn0iEnx5eVCk89/I=", + "lastModified": 1750371096, + "narHash": "sha256-JB1IeJ41y7kWc/dPGV6RMcCUM0Xj2NEK26A2Ap7EM9c=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "57ab2a867d8b554ad89f29060c15efd11631db91", + "rev": "38f3a211657ce82a1123bf19402199b67a410f08", "type": "github" }, "original": { @@ -520,11 +499,11 @@ ] }, "locked": { - "lastModified": 1749145760, - "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", + "lastModified": 1750371869, + "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", + "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", "type": "github" }, "original": { @@ -557,55 +536,6 @@ "type": "github" } }, - "nix-formatter-pack": { - "inputs": { - "nixpkgs": [ - "nix-on-droid", - "nixpkgs" - ], - "nmd": "nmd", - "nmt": "nmt" - }, - "locked": { - "lastModified": 1705252799, - "narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=", - "owner": "Gerschtli", - "repo": "nix-formatter-pack", - "rev": "2de39dedd79aab14c01b9e2934842051a160ffa5", - "type": "github" - }, - "original": { - "owner": "Gerschtli", - "repo": "nix-formatter-pack", - "type": "github" - } - }, - "nix-on-droid": { - "inputs": { - "home-manager": "home-manager_2", - "nix-formatter-pack": "nix-formatter-pack", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-docs": "nixpkgs-docs", - "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", - "nmd": "nmd_2" - }, - "locked": { - "lastModified": 1720396533, - "narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=", - "owner": "nix-community", - "repo": "nix-on-droid", - "rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-24.05", - "repo": "nix-on-droid", - "type": "github" - } - }, "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_3", @@ -628,11 +558,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -642,45 +572,13 @@ "type": "github" } }, - "nixpkgs-docs": { - "locked": { - "lastModified": 1705957679, - "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-for-bootstrap": { - "locked": { - "lastModified": 1720244366, - "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", - "type": "github" - } - }, "nixpkgs-latest": { "locked": { - "lastModified": 1750014763, - "narHash": "sha256-lO6pbyJy8AlmCH50M9Am1L6BmvrGwI6qqQYhyBp/DQI=", + "lastModified": 1750591067, + "narHash": "sha256-E1cW8nG5JceZnbgd8mVAvIEa/PQpAEN7/FknHNUQBn0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "edcaeb67ef6ef8d57443ddc35be953d8ac39258b", + "rev": "38e5187aeea047f16faa4f03a110c69e353b8396", "type": "github" }, "original": { @@ -708,11 +606,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -755,11 +653,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1749857119, - "narHash": "sha256-tG5xUn3hFaPpAHYIvr2F88b+ovcIO5k1HqajFy7ZFPM=", + "lastModified": 1750400657, + "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5f4f306bea96741f1588ea4f450b2a2e29f42b98", + "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", "type": "github" }, "original": { @@ -784,60 +682,6 @@ "type": "github" } }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1666190571, - "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", - "owner": "rycee", - "repo": "nmd", - "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, - "nmd_2": { - "inputs": { - "nixpkgs": [ - "nix-on-droid", - "nixpkgs-docs" - ], - "scss-reset": "scss-reset" - }, - "locked": { - "lastModified": 1705050560, - "narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", - "owner": "~rycee", - "repo": "nmd", - "rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", - "type": "sourcehut" - }, - "original": { - "owner": "~rycee", - "repo": "nmd", - "type": "sourcehut" - } - }, - "nmt": { - "flake": false, - "locked": { - "lastModified": 1648075362, - "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", - "owner": "rycee", - "repo": "nmt", - "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmt", - "type": "gitlab" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -895,7 +739,6 @@ "hyprland-plugins": "hyprland-plugins", "hyprspace": "hyprspace", "lanzaboote": "lanzaboote", - "nix-on-droid": "nix-on-droid", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_4", "nixpkgs-latest": "nixpkgs-latest", @@ -946,22 +789,6 @@ "type": "github" } }, - "scss-reset": { - "flake": false, - "locked": { - "lastModified": 1631450058, - "narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=", - "owner": "andreymatin", - "repo": "scss-reset", - "rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91", - "type": "github" - }, - "original": { - "owner": "andreymatin", - "repo": "scss-reset", - "type": "github" - } - }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -969,11 +796,11 @@ ] }, "locked": { - "lastModified": 1749592509, - "narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=", + "lastModified": 1750119275, + "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", "owner": "Mic92", "repo": "sops-nix", - "rev": "50754dfaa0e24e313c626900d44ef431f3210138", + "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", "type": "github" }, "original": { @@ -1055,11 +882,11 @@ ] }, "locked": { - "lastModified": 1749490041, - "narHash": "sha256-R9Dn9IyUdPaJHD2Oqd7XJnnxpka6M6UYw4Ld0iA46HM=", + "lastModified": 1750372504, + "narHash": "sha256-VBeZb1oqZM1cqCAZnFz/WyYhO8aF/ImagI7WWg/Z3Og=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "3cf35e178bc192ee51e3fddfd69e531e2c106a30", + "rev": "400308fc4f9d12e0a93e483c2e7a649e12af1a92", "type": "github" }, "original": { @@ -1075,11 +902,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1749888828, - "narHash": "sha256-D6suAjGrP3W3tXGrVffS7EMtMUNQEq0cBzQb5+vjMyY=", + "lastModified": 1750515839, + "narHash": "sha256-I3FdBExb2eaLVD76Vkl9TFy/snKrE+od0x6vtTMcqXc=", "owner": "sxyazi", "repo": "yazi", - "rev": "917fee939f23b00a6ea6180f74f7f0e76afc56f9", + "rev": "3a9591a3d9d8f4c9fb990274e967bdef89177d14", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 273ce59..37f839b 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,6 @@ home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; }; - nix-on-droid = { url = "github:nix-community/nix-on-droid/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; }; @@ -28,22 +27,22 @@ hyper-base = rec { inherit system; - user = "nx2"; - domain = "nx2.site"; - home = "/home/${user}/"; + user = "nx2"; + domain = "nx2.site"; + home = "/home/${user}/"; + webroot = "/var/lib/hugo/nx2site/public"; + pkgs-version = "25.05"; }; - pkgs = (import nixpkgs { inherit system config; }) // { - unstable = import nixpkgs-unstable { inherit system config; }; - latest = import nixpkgs-latest { inherit system config; }; - version = "25.05"; - }; - pkgs64 = let - system = "aarch64-linux"; - in import nixpkgs { inherit system config; } // { - unstable = import nixpkgs-unstable { inherit system config; }; - latest = import nixpkgs-latest { inherit system config; }; - version = "24.05"; + pkgs = import nixpkgs { + inherit system config; + overlays = [ + (final: prev: { + unstable = import nixpkgs-unstable { inherit system config; }; + latest = import nixpkgs-latest { inherit system config; }; + version = "25.05"; + }) + ]; }; nvidia-base = import ./flake-modules/nvidia.nix; @@ -52,16 +51,18 @@ in { nixosConfigurations = let make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem { + inherit pkgs; modules = [ ./configuration.nix ]; specialArgs = let hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); }; - in { inherit pkgs inputs hyper rice secrets; }; + in { inherit inputs hyper rice secrets; }; }; make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem { + inherit pkgs; modules = [ ./nixos-wsl.nix ]; specialArgs = let hyper = hyper-base // { inherit host; }; - in { inherit pkgs inputs hyper rice; }; + in { inherit inputs hyper rice; }; }; in { NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; @@ -69,10 +70,6 @@ NxACE = make-nixos-system "NxACE" { enable = false; }; NxWSL = make-nixos-wsl-system "NxWSL"; }; - nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { - pkgs = pkgs64; - modules = [ ./nix-on-droid.nix ]; - }; homeConfigurations = let make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration { @@ -94,8 +91,6 @@ "${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; }; "${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; }; - "${hyper-base.user}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user; - "${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user; }; }; diff --git a/home-modules/bitwarden.nix b/home-modules/bitwarden.nix index 5bf042d..31ee03f 100644 --- a/home-modules/bitwarden.nix +++ b/home-modules/bitwarden.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ bitwarden diff --git a/home-modules/calendar-campuszeit-fix.nix b/home-modules/calendar-campuszeit-fix.nix index d15769f..88fd4d6 100644 --- a/home-modules/calendar-campuszeit-fix.nix +++ b/home-modules/calendar-campuszeit-fix.nix @@ -1,4 +1,4 @@ -{ pkgs, user, ... }: +{ pkgs, ... }@all: with all; { home.packages = let u = pkgs.writers.writePython3Bin "nx_fix_campuszeit_python" { diff --git a/home-modules/calendar.nix b/home-modules/calendar.nix index 946e6dd..0ae3cd7 100644 --- a/home-modules/calendar.nix +++ b/home-modules/calendar.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, secrets, ... }: let +{ pkgs, ... }@all: with all; let calendars = with hyper; [ { name = "Preservation"; @@ -85,7 +85,7 @@ in { userName = hyper.user; # my globally set username }; }; - in pkgs.lib.attrsets.mergeAttrsList ( + in lib.attrsets.mergeAttrsList ( map (calendar: { "${calendar.name}" = transform_caledar_set ( default_set // calendar ); }) calendars @@ -93,7 +93,7 @@ in { programs.thunderbird.settings = let to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name; - in (pkgs.lib.attrsets.mergeAttrsList ( + in (lib.attrsets.mergeAttrsList ( map (calendar: with ( default_set // calendar ); { "calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true; "calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary; @@ -106,7 +106,7 @@ in { "calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only; }) calendars ) // { - "calendar.list.sortOrder" = pkgs.lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars; + "calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars; "calendar.week.start" = 1; }); } diff --git a/home-modules/chatterino.nix b/home-modules/chatterino.nix index b29f256..7a01b1c 100644 --- a/home-modules/chatterino.nix +++ b/home-modules/chatterino.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, rice, secrets, ... }: +{ pkgs, ... }@all: with all; let channels = [ "Caedrel" diff --git a/home-modules/clipboard.nix b/home-modules/clipboard.nix index 494ef15..95d5a69 100644 --- a/home-modules/clipboard.nix +++ b/home-modules/clipboard.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { services.clipman = { package = pkgs.clipman; diff --git a/home-modules/discord.nix b/home-modules/discord.nix index 71676eb..a7a98b9 100644 --- a/home-modules/discord.nix +++ b/home-modules/discord.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { home = { packages = with pkgs; [ diff --git a/home-modules/email.nix b/home-modules/email.nix index 32ca800..edc8737 100644 --- a/home-modules/email.nix +++ b/home-modules/email.nix @@ -1,12 +1,12 @@ -{ pkgs, hyper, rice, secrets, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ thunderbird ]; programs.thunderbird = let - inherit (pkgs.lib.generators) toJSON; + inherit (lib.generators) toJSON; extensions = toJSON {} { "addon@darkreader.org" = "71d6c69d-55f9-4c56-888c-abdcf6efd73d"; }; diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index 21e76eb..bfe0ca2 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, rice, ... }: +{ pkgs, ... }@all: with all; # browser.tabs.allow_transparent_browser # https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/ { diff --git a/home-modules/fish.nix b/home-modules/fish.nix index 3266405..266c45c 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ fish diff --git a/home-modules/games.nix b/home-modules/games.nix index 1f58b16..4417350 100644 --- a/home-modules/games.nix +++ b/home-modules/games.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host == "NxNORTH") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host == "NxNORTH") { home = { packages = (with pkgs.unstable; [ diff --git a/home-modules/gestures.nix b/home-modules/gestures.nix index c025d97..5c61b49 100644 --- a/home-modules/gestures.nix +++ b/home-modules/gestures.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host == "NxXPS") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host == "NxXPS") { home.packages = with pkgs; [ libinput-gestures diff --git a/home-modules/ghostty.nix b/home-modules/ghostty.nix index c28f9e3..19d2e44 100644 --- a/home-modules/ghostty.nix +++ b/home-modules/ghostty.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, ... }@all: with all; { programs.ghostty = { enable = true; diff --git a/home-modules/gimp.nix b/home-modules/gimp.nix index 666c41d..d9eee52 100644 --- a/home-modules/gimp.nix +++ b/home-modules/gimp.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ # (gimp-with-plugins.override { diff --git a/home-modules/git.nix b/home-modules/git.nix index 33920f4..1f96907 100644 --- a/home-modules/git.nix +++ b/home-modules/git.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, rice, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ delta @@ -21,10 +21,10 @@ }; extraConfig = { credential = { - "https://git.da.dicos.de".username = pkgs.lib.mkIf (hyper.host =="NxWSL") "lkurzweg"; - "https://git.da.dicos.de".password = pkgs.lib.mkIf (hyper.host =="NxWSL") "Test"; + "https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxWSL") "lkurzweg"; + "https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxWSL") "Test"; }; - url."ssh://git@git.da.dicos.de/".insteadOf = pkgs.lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/"; + url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/"; pull.rebase = false; # true }; }; diff --git a/home-modules/gpg.nix b/home-modules/gpg.nix index 7a9878f..36aed64 100644 --- a/home-modules/gpg.nix +++ b/home-modules/gpg.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { # there also is a system module home.packages = with pkgs; [ @@ -7,7 +7,6 @@ pinentry-all ]; - # services.pcscd.enable = true; services.gpg-agent = let min2sec = min: (min * 60); in { diff --git a/home-modules/gtk.nix b/home-modules/gtk.nix index 078c535..ad88aea 100644 --- a/home-modules/gtk.nix +++ b/home-modules/gtk.nix @@ -1,4 +1,4 @@ -{ config, pkgs, rice, ... }: +{ pkgs, ... }@all: with all; let # theme-name = "Colloid-Pink-Dark-Compact"; # theme-package = pkgs.colloid-gtk-theme.override { diff --git a/home-modules/helix.nix b/home-modules/helix.nix index 06656a3..237b2fe 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, rice, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ @@ -271,7 +271,7 @@ command = "nixd"; }; "style-check" = { - command = pkgs.lib.getExe pkgs.vale-ls; + command = lib.getExe pkgs.vale-ls; }; "language-tool" = { command = "${pkgs.ltex-ls}/bin/ltex-ls"; @@ -287,7 +287,7 @@ ]; }; "llm" = { - command = pkgs.lib.getExe pkgs.helix-gpt; + command = lib.getExe pkgs.helix-gpt; args = [ "--handler" "ollama" diff --git a/home-modules/hyprland-autoname-workspaces.nix b/home-modules/hyprland-autoname-workspaces.nix index 5367515..c0d1abf 100644 --- a/home-modules/hyprland-autoname-workspaces.nix +++ b/home-modules/hyprland-autoname-workspaces.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ hyprland-autoname-workspaces ]; diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index c70f98e..3dd6023 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, inputs, rice, ... }: +{ pkgs, ... }@all: with all; let animation-speed = "5"; transparency = builtins.toString rice.transparency; @@ -308,8 +308,8 @@ in { "opacity ${transparency}, class:^(Code)$" "opacity ${transparency}, class:^(code-oss)$" "opacity ${transparency}, class:^(discord)$" - "opacity ${transparency}, class:^(element)$" - "opacity ${transparency}, class:^(Element)$" + "opacity ${transparency}, class:^(vesktop)$" + # "opacity ${transparency}, class:^(Element)$" "opacity ${transparency}, class:^(lutris)$" "opacity ${transparency}, class:^(neovide)$" "opacity ${transparency}, class:^(obsidian)$" diff --git a/home-modules/latex.nix b/home-modules/latex.nix index a40c574..6511849 100644 --- a/home-modules/latex.nix +++ b/home-modules/latex.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ texlab # LSP diff --git a/home-modules/mako.nix b/home-modules/mako.nix index 298516e..f7eb6d0 100644 --- a/home-modules/mako.nix +++ b/home-modules/mako.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ libnotify ]; services.mako = with rice; { diff --git a/home-modules/matrix.nix b/home-modules/matrix.nix index 0968292..937fe9b 100644 --- a/home-modules/matrix.nix +++ b/home-modules/matrix.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ # cinny-desktop diff --git a/home-modules/nh.nix b/home-modules/nh.nix index 07db55c..eb90a85 100644 --- a/home-modules/nh.nix +++ b/home-modules/nh.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ diff --git a/home-modules/nixd.nix b/home-modules/nixd.nix index f2ac5e3..ffd8f9f 100644 --- a/home-modules/nixd.nix +++ b/home-modules/nixd.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ nixd diff --git a/home-modules/nvidia.nix b/home-modules/nvidia.nix index fb75673..7ed2531 100644 --- a/home-modules/nvidia.nix +++ b/home-modules/nvidia.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.nvidia.enable == true) +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.nvidia.enable == true) { home = { packages = with pkgs; [ diff --git a/home-modules/nx-gcal-event.nix b/home-modules/nx-gcal-event.nix index ac84f96..5c14580 100644 --- a/home-modules/nx-gcal-event.nix +++ b/home-modules/nx-gcal-event.nix @@ -1,4 +1,4 @@ -{ config, pkgs, secrets, ... }: let +{ pkgs, ... }@all: with all; sep = " "; in { home = { diff --git a/home-modules/nx2site-backup.nix b/home-modules/nx2site-backup.nix index 44722b5..c12dc73 100644 --- a/home-modules/nx2site-backup.nix +++ b/home-modules/nx2site-backup.nix @@ -1,11 +1,11 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = [ (pkgs.writeShellApplication { name = "nx_backup"; runtimeInputs = [ ]; text = let - web-root = "/var/nginx/webroot"; + web-root = hyper.webroot; gitea-backup = "/var/backup/gitea"; postgres-backup = "/var/backup/postgresql"; in /* bash */ '' @@ -59,8 +59,7 @@ echo "Backup and encryption complete: $DESTINATION" echo "Space remaining:" - df -h | head -n 1 - df -h | grep -P "^/dev.+? " + dysk ''; }) ]; diff --git a/home-modules/nx2site.nix b/home-modules/nx2site.nix index 821d1a0..6188172 100644 --- a/home-modules/nx2site.nix +++ b/home-modules/nx2site.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ (writeShellApplication { diff --git a/home-modules/nxgs.nix b/home-modules/nxgs.nix index 3a79a2d..0f2df4e 100644 --- a/home-modules/nxgs.nix +++ b/home-modules/nxgs.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ ghostscript diff --git a/home-modules/obs.nix b/home-modules/obs.nix index eea25f6..5c5861a 100644 --- a/home-modules/obs.nix +++ b/home-modules/obs.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { # home.packages = with pkgs; [ # obs-studio diff --git a/home-modules/office.nix b/home-modules/office.nix index cc9b604..7165c14 100644 --- a/home-modules/office.nix +++ b/home-modules/office.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ libreoffice diff --git a/home-modules/ollama.nix b/home-modules/ollama.nix index 5b32507..6cc20f9 100644 --- a/home-modules/ollama.nix +++ b/home-modules/ollama.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ ollama @@ -16,10 +16,10 @@ if len(sys.argv) < 2: system_message = sys.argv[1] input_text = sys.stdin.read() try: - response = ollama.chat(model='llama3.1:8b', messages=[ + response = ollama.chat(model='gemma3:4b', messages=[ { 'role': 'system', - 'content': "You are a text transformer. Follow the folling instruction:\n\n" + system_message + "\n\nOnly output the transformed text. Do not add any addidional conversation around the output. Just the result.", + 'content': system_message, }, { 'role': 'user', diff --git a/home-modules/pandoc.nix b/home-modules/pandoc.nix index 4ac751e..b2dce0d 100644 --- a/home-modules/pandoc.nix +++ b/home-modules/pandoc.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ pandoc diff --git a/home-modules/pkgs-list/desktop.nix b/home-modules/pkgs-list/desktop.nix new file mode 100644 index 0000000..fcb4830 --- /dev/null +++ b/home-modules/pkgs-list/desktop.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }@all: with all; { + home.packages = with pkgs; [ + brightnessctl + blueman + fontpreview + gsettings-desktop-schemas + imv + pavucontrol + # playerctl + swww + wev + wl-clipboard + xclip + ]; +} diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix new file mode 100644 index 0000000..4ac2595 --- /dev/null +++ b/home-modules/pkgs-list/programs.nix @@ -0,0 +1,16 @@ +{ pkgs, hyper, ... }: { + home.packages = with pkgs; [ + chromium + element-desktop + mpv + qbittorrent + unstable.spotify + wl-clipboard + xfce.thunar + ] ++ (if (hyper.host != "NxACE") then [ + signal-desktop + obsidian + zoom-us + inkscape + ] else []); +} diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index 77774ab..2e3bb5b 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -1,8 +1,6 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ bat - browsh cmake dig du-dust diff --git a/home-modules/pnx.nix b/home-modules/pnx.nix index ea976f5..cc4ad74 100644 --- a/home-modules/pnx.nix +++ b/home-modules/pnx.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, secrets, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { home.packages = [ pkgs.remmina diff --git a/home-modules/programming/c.nix b/home-modules/programming/c.nix index fbf33a0..b85aec0 100644 --- a/home-modules/programming/c.nix +++ b/home-modules/programming/c.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ diff --git a/home-modules/programming/gleam.nix b/home-modules/programming/gleam.nix index f4a826c..93b1594 100644 --- a/home-modules/programming/gleam.nix +++ b/home-modules/programming/gleam.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ erlang diff --git a/home-modules/programming/go.nix b/home-modules/programming/go.nix index c1bd295..40892d5 100644 --- a/home-modules/programming/go.nix +++ b/home-modules/programming/go.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ diff --git a/home-modules/programming/java.nix b/home-modules/programming/java.nix index 412d03f..3b3a4eb 100644 --- a/home-modules/programming/java.nix +++ b/home-modules/programming/java.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ diff --git a/home-modules/programming/js.nix b/home-modules/programming/js.nix index 668a083..9e12d70 100644 --- a/home-modules/programming/js.nix +++ b/home-modules/programming/js.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ nodejs diff --git a/home-modules/programming/python.nix b/home-modules/programming/python.nix index da29ebd..0254d79 100644 --- a/home-modules/programming/python.nix +++ b/home-modules/programming/python.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home = let python-with-packages = pkgs.python3.withPackages (pp: with pp; [ diff --git a/home-modules/rofi.nix b/home-modules/rofi.nix index 880b5e2..6a1ed01 100644 --- a/home-modules/rofi.nix +++ b/home-modules/rofi.nix @@ -1,4 +1,5 @@ -{ pkgs, rice, ... }: { +{ pkgs, ... }@all: with all; +{ home.packages = with pkgs; [ rofi-wayland ]; diff --git a/home-modules/scanning.nix b/home-modules/scanning.nix index e131d7b..8099241 100644 --- a/home-modules/scanning.nix +++ b/home-modules/scanning.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ xsane diff --git a/home-modules/sent.nix b/home-modules/sent.nix index ec9d731..76172fa 100644 --- a/home-modules/sent.nix +++ b/home-modules/sent.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, ... }@all: with all; let my-sent = pkgs.sent.override { patches = [ diff --git a/home-modules/sops.nix b/home-modules/sops.nix index d39bf63..0f730dd 100644 --- a/home-modules/sops.nix +++ b/home-modules/sops.nix @@ -1,12 +1,12 @@ -{ pkgs, hyper, inputs, ... }: +{ pkgs, ... }@all: with all; { imports = [ inputs.sops-nix.homeManagerModules.sops ]; sops = { - age.keyFile = pkgs.lib.mkIf (hyper.host == "NxACE") "${hyper.home}.age_nx2_key_13.txt"; - gnupg.home = pkgs.lib.mkIf (hyper.host != "NxACE") "${hyper.home}.gnupg"; + age.keyFile = lib.mkIf (hyper.host == "NxACE") "${hyper.home}.age_nx2_key_13.txt"; + gnupg.home = lib.mkIf (hyper.host != "NxACE") "${hyper.home}.gnupg"; defaultSopsFile = ../sops-secrets.yaml; # %r is $XDG_RUNTIME_DIR diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index f4936ed..cf71ccd 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ sshfs ]; diff --git a/home-modules/starship.nix b/home-modules/starship.nix index 46c23b5..f8f3943 100644 --- a/home-modules/starship.nix +++ b/home-modules/starship.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, ... }@all: with all; { programs.starship = { enable = true; @@ -7,7 +7,7 @@ enableFishIntegration = true; settings = with rice.color; { add_newline = false; - format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [ + format = lib.strings.concatMapStrings (x: "$" + x) [ "jobs" "battery" "username" diff --git a/home-modules/tts.nix b/home-modules/tts.nix index a454241..0f093b6 100644 --- a/home-modules/tts.nix +++ b/home-modules/tts.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ (writeShellApplication { diff --git a/home-modules/vale.nix b/home-modules/vale.nix index 6ec16f7..3c1ea84 100644 --- a/home-modules/vale.nix +++ b/home-modules/vale.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: let +{ pkgs, ... }@all: with all; let vws = pkgs.vale.withStyles (s: [ s.alex s.google ]); in { home = { diff --git a/home-modules/virt-manager.nix b/home-modules/virt-manager.nix index 882b953..c71a9c2 100644 --- a/home-modules/virt-manager.nix +++ b/home-modules/virt-manager.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host == "NxNORTH") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host == "NxNORTH") { home.packages = with pkgs; [ virt-manager diff --git a/home-modules/vscode.nix b/home-modules/vscode.nix index abef521..7aa9608 100644 --- a/home-modules/vscode.nix +++ b/home-modules/vscode.nix @@ -1,6 +1,6 @@ -{ config, pkgs, hyper, rice, ... }: +{ pkgs, ... }@all: with all; { - config = pkgs.lib.mkIf (hyper.host != "NxACE") { + config = lib.mkIf (hyper.host != "NxACE") { home.packages = [ pkgs.vscodium pkgs.nixpkgs-fmt @@ -92,13 +92,13 @@ # url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix"; # sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8"; # }) - # { inherit config pkgs; lib = pkgs.lib; }) + # { inherit config pkgs; lib = lib; }) # (import # (builtins.fetchurl { # url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix"; # sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f"; # }) - # { inherit config pkgs; lib = pkgs.lib; }) + # { inherit config pkgs; lib = lib; }) # ] else []; } diff --git a/home-modules/wallpaper-to-colors.nix b/home-modules/wallpaper-to-colors.nix index 98744dd..d787178 100644 --- a/home-modules/wallpaper-to-colors.nix +++ b/home-modules/wallpaper-to-colors.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ (writers.writePython3Bin "change_colors_json" { diff --git a/home-modules/waybar.nix b/home-modules/waybar.nix index ab3b8b9..6b95b1d 100644 --- a/home-modules/waybar.nix +++ b/home-modules/waybar.nix @@ -1,5 +1,4 @@ -{ pkgs, hyper, rice, ... }: -let +{ pkgs, hyper, ... }@all: with all; let sep = " "; in { sops.secrets = { diff --git a/home-modules/wlogout.nix b/home-modules/wlogout.nix index c005efe..993800d 100644 --- a/home-modules/wlogout.nix +++ b/home-modules/wlogout.nix @@ -1,4 +1,4 @@ -{ pkgs, rice,... }: +{ pkgs, ... }@all: with all; { home = { packages = with pkgs; [ wlogout ]; diff --git a/home-modules/xdg.nix b/home-modules/xdg.nix new file mode 100644 index 0000000..4542153 --- /dev/null +++ b/home-modules/xdg.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }@all: with all; { + xdg = { + enable = true; + configHome = "${hyper.home}.config"; + cacheHome = "${hyper.home}.cache"; + dataHome = "${hyper.home}.local/share"; + stateHome = "${hyper.home}.local/state"; + mimeApps = { + enable = true; + defaultApplications = let + browser = "firefox.desktop"; + image = "imv.desktop"; + in { + "default-web-browser" = [ browser ]; + "text/html" = [ browser ]; + "text/htm" = [ browser ]; + "x-scheme-handler/http" = [ browser ]; + "x-scheme-handler/https" = [ browser ]; + "x-scheme-handler/about" = [ browser ]; + "x-scheme-handler/unknown" = [ browser ]; + "x-scheme-handler/mailto" = "thunderbird.desktop"; + "image/png" = image; + "image/jpg" = image; + "image/jpeg" = image; + "image/webp" = image; + "image/gif" = image; + "application/pdf" = "zathura.desktop"; + "inode/directory" = "thunar.desktop"; + }; + }; + }; +} diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index cc081da..ffd8872 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, rice, inputs, ... }: +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ unar @@ -34,6 +34,7 @@ { on = [ "g" "e" ]; run = "arrow up"; desc = "Move cursor to the end"; } { on = [ "g" "h" ]; run = "cd ~"; desc = "Go to the home directory"; } { on = [ "g" "n" ]; run = "cd ~/nix-dots"; desc = "Go to the Nix-Dotfiles directory"; } + (pkgs.lib.mkIf (hyper.host == "NxACE") { on = [ "g" "s" ]; run = "cd /var/lib/hugo/nx2site"; desc = "Go to the Hugo Nx2.Site directory"; }) { on = [ "g" "n" ]; run = "cd /nix/store"; desc = "Go to the Nix-Store"; } { on = [ "g" "c" ]; run = "cd ~/.config"; desc = "Go to the config directory"; } { on = [ "g" "l" ]; run = "cd ~/.locale"; desc = "Go to the .locale directory"; } diff --git a/home.nix b/home.nix index f7b080a..7afd742 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { imports = [ ./home-modules/auto-mount.nix @@ -27,7 +27,6 @@ ./home-modules/latex.nix ./home-modules/mako.nix # ./home-modules/matrix.nix - # ./home-modules/nm.nix ./home-modules/nh.nix ./home-modules/nixd.nix ./home-modules/nvidia.nix @@ -36,6 +35,9 @@ ./home-modules/office.nix ./home-modules/ollama.nix ./home-modules/pandoc.nix + ./home-modules/pkgs-list/desktop.nix + ./home-modules/pkgs-list/programs.nix + ./home-modules/pkgs-list/shell.nix ./home-modules/pnx.nix ./home-modules/programming/c.nix ./home-modules/programming/gleam.nix @@ -57,6 +59,7 @@ ./home-modules/wallpaper-to-colors.nix ./home-modules/waybar.nix ./home-modules/wlogout.nix + ./home-modules/xdg.nix ./home-modules/yazi.nix ./home-modules/zathura.nix ./home-modules/zoxide.nix @@ -66,95 +69,7 @@ ] else []); home.username = hyper.user; # home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here - home.homeDirectory = "/home/${hyper.user}"; - home.stateVersion = pkgs.version; - home.packages = with pkgs; [ - bat - brightnessctl - browsh - chromium - cmake - dig - du-dust - exiftool - eza - ffmpeg - figlet - fontpreview - fzf - glib - glow - gnumake - gsettings-desktop-schemas - imagemagick - imv - jq - lolcat - lynx - mediainfo - mpv - neofetch - pavucontrol - pdfgrep - piper-tts - pipes - playerctl - pv - qbittorrent - reflex - ripgrep - screen - spicetify-cli - sssnake - swww - systemctl-tui - tldr - unstable.spotify - w3m - wev - wl-clipboard - xclip - xfce.thunar - yt-dlp - ] ++ (if (hyper.host != "NxACE") then [ - signal-desktop - obsidian - zoom-us - inkscape - ] else []); - - xdg = { - enable = true; - configHome = "${hyper.home}.config"; - cacheHome = "${hyper.home}.cache"; - dataHome = "${hyper.home}.local/share"; - stateHome = "${hyper.home}.local/state"; - mimeApps = { - enable = true; - defaultApplications = let - browser = "firefox.desktop"; - in { - "default-web-browser" = [ browser ]; - "text/html" = [ browser ]; - "text/htm" = [ browser ]; - "x-scheme-handler/http" = [ browser ]; - "x-scheme-handler/https" = [ browser ]; - "x-scheme-handler/about" = [ browser ]; - "x-scheme-handler/unknown" = [ browser ]; - "x-scheme-handler/mailto" = "thunderbird.desktop"; - "image/png" = "imv.desktop"; - "image/jpg" = "imv.desktop"; - "image/jpeg" = "imv.desktop"; - "image/webp" = "imv.desktop"; - "image/gif" = "imv.desktop"; - "application/pdf" = "zathura.desktop"; - "inode/directory" = "thunar.desktop"; - }; - }; - }; - # Wayland, X, etc. support for session vars - # systemd.user.sessionVariables = home.sessionVariables; - - # Let Home Manager install and manage itself. + home.homeDirectory = "/home/${hyper.user}"; + home.stateVersion = hyper.pkgs-version; programs.home-manager.enable = true; } diff --git a/nix-on-droid.nix b/nix-on-droid.nix index 11e44ca..fe30dc8 100644 --- a/nix-on-droid.nix +++ b/nix-on-droid.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { # Simply install just the packages environment.packages = with pkgs; [ diff --git a/nixos-wsl.nix b/nixos-wsl.nix index c4f003d..b0a9ade 100644 --- a/nixos-wsl.nix +++ b/nixos-wsl.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, inputs, ... }: +{ pkgs, ... }@all: with all; { imports = [ inputs.nixos-wsl.nixosModules.default diff --git a/shell-only.nix b/shell-only.nix index 1a14784..bf972ea 100644 --- a/shell-only.nix +++ b/shell-only.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { imports = [ ./home-modules/bash.nix diff --git a/sops-secrets.yaml b/sops-secrets.yaml index 4206360..ea7232d 100644 --- a/sops-secrets.yaml +++ b/sops-secrets.yaml @@ -45,7 +45,7 @@ eduroam: client-key: ENC[AES256_GCM,data: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,iv:elOnzTpyIwv49ErwOZRINMSXryBwiwP8Kus83+tAzks=,tag:QN3WdC+TUB01X2p76+ng3w==,type:str] root-ca: ENC[AES256_GCM,data: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,iv:8UyU8fVq8YaSsurOOgsKGIAelaxWR7+AITwwf7ts4qk=,tag:K/zGiCthB6Vyh0ijRDxM6w==,type:str] nxxpspw: ENC[AES256_GCM,data:IpzL3rsB9BN5fhUBMtAo3DPhk6LEDuizHUj+mPPtQA==,iv:zjH5Bcw0q57oyA/ce0scSIeDvmt51vQzttHq6hwDkwk=,tag:Gf0NUQ3O3fol0M0+2HpGEA==,type:str] - tuda_nmconnection: ENC[AES256_GCM,data:LHy4lYZ6hf0Xfz25KSIY47TwrjNoEvqPi21mXKsfOq9/8Hmveca7UD9jfSbL2fyQ7dEBB2yoW01l6L63GilmSRUqd7eU2dhUCOdZ6L0j7IiFg51oT0FtJSKnQIf9BHslRWP3gQifOxKCIMGwhVEw6xMRINwRizjq073oCCDvgKtbW0cxLy8s4VOsBgAjCWiRDWaItYW83lLL6y49SYw8JJljZXGwrSxmE/wN2STJ05Wzc3cuah63b+lKnGAApkfCALGYGjdktJ/87wT0RveTyV7DzmKOd9Oo0N2cPB91vsnYOKlUBEsNo45x52tvlAx4qJ7358SjNTV0i4HD+k5/byKe8IvSnEsRjvnOLG9OXdCkdf17NcI7VvWPF6u3kAWp81Wc+6lFo9LXB5AE8dRpf5naC1wseLl2pU/8cdgj2EgVl89mo8QaaQfAPxEbaFDnQcNCEYXcRcwjVfBV5cQVqYIrcmmb/c1IVGOOSBijM8u19zq5DfUP1uc835RE9D6NL7NV69VvgoYjb/8/GGf11hDcDESaOEK3zULeyKU0K0hM7AluI8rnZsOZJK70OMLJsUPvVfI0GS9NGZXjYfCoALE0DAt2Qi4cKMNLQzQvHkvXGbdMpzI=,iv:SZmGSEOEPdzWvYvAe4/Iv8qNZjaAfSY+uVfpt3BBN9Q=,tag:NprSgZJwjBHCEKNNypESxg==,type:str] + tuda_nmconnection: ENC[AES256_GCM,data:ubOpTdlwBKqKPCqT/L1+JOVl8t4OIIxr5ac+iHQfjzoUCBDFcmH4w7rQVr1G231NqmVgCtLgakOmJruqR5NRMgHtB8YaLfISD6nu6q2oqwBeQv9rfs8YDobanyyLtbKuPD4SSKdZXP23xAdP/YsgLCYmHTc878jhUYz3tRXg4jLWZtIW2neOxqyyZh96x5dT8IfU5DN+JQLVgarBH5Mnki/APLAW7L9zhmn5gLXOUp7yjNjovKw+IKm8o7/3zRwEIJk36qpA8mw2Vu+aBjnep+pKaAjmBx5jUwXQOUDRmziPqoeYUiz4wIYh3rQNiM+9KoimtNbs1tY2t6wk2n23Il4GQ86EH0toVioKybRUr4kx2q4N0+RZVecc11HaAnX2U+oyNFLptk/uLfqWEwiY+khfrLU54JYeOKdbWZqe3imh671EUeMBws3AeS8v0dYhzBtUnJV1+N4Wdn4GmV36+Xhgrsz64SgMNmGe+xkwfpsSetNmy0NSrYZDxoMP3GodGJ7DJ/JzT8Y4fWB61BdUhrzbdQuKgtB/YjYr9OtmVnK2QwswFBVs8+XyB/T1Gi7pRzS0nV0fjXrRmDzbvKqQj4RZ//DqPxDxQmwcYShc0OmcrioCjO0=,iv:H4wOADm86rKrwj41kNaIo2RvsLg2jVlrgx4U5Fj7hp0=,tag:5vYu0hOiI7exCGeB/t9/bQ==,type:str] hsmw-vpn-secret: ENC[AES256_GCM,data:3bKxRGTQcbhRjzARSpYBW5ekQW/U/ixzNiFmO36gw0NKyDMLlbVbJBqXvi71M0GXgmo/FA==,iv:7bVDA8u9apDNXFY/vEMbz/0HywG5Pyrl5JfZrcNCr8w=,tag:xz4j7cEc5hvLwrItWjkx0Q==,type:str] postgres-pw: ENC[AES256_GCM,data:D9b7IbvLshmRuSyF9+V3WqVf/95+OhCJm0g=,iv:D4tpzEBzcCatbnQwtOGn8X0QSrXOye20rXaw8TSB7Gk=,tag:Q0B/86eDKkhu0Jnln1sUyg==,type:str] sops: @@ -86,8 +86,8 @@ sops: YkJWUEMySU50ZHVxUzVudjNnYURXak0KkMn/8sFrrviqb3s8DtS/BAbrdCwJ+jv/ A8rXQkKMjvTqG1f0fq5IlSmRAQy7XFBzkfbKdIUoefhey190WPEHaw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-05-05T15:43:24Z" - mac: ENC[AES256_GCM,data:O+L35rVqMaogvBDpnIweo1hdNXU39tEmBFXXTlLyImwt8ZWN98MIcS6tOBRjOAMSTRXEkNgvoggn/3ZF7erAva5w0ohVyN5PUeJvjNqkOQ522YTVC5wYYjvG+LUgaKcvKlm5c8XGEwJBt81i/ZXt0P03RpHge2a687dZ5e8fEQQ=,iv:0pOFGLPZC8gN3hV/FTzY1443283nwsHKiUdmdQyOn8U=,tag:GMMZX55DRZkRqe1HMpVX8g==,type:str] + lastmodified: "2025-06-16T08:57:57Z" + mac: ENC[AES256_GCM,data:Qwk39Cv+WhxnW8858qWtGPiCrYb4bje5nRGOkG4OrAC/dZ+wpbMd9DXF134PUM1NB/aI3ivnl4EeVAlcv/E32EjodZJOGkseKme5Hler69+nfL0DJT00XhBDR3aGVf3YMA5Po+XR9ikLKFF1wz4DhV4ylN6RxxMrpLJltba+0NI=,iv:QUulKPfnAujRUNWKBKUsIynOHsd4E09NO8TlaQwzFy0=,tag:N1LNlbvdjkXWarIAI9tkZg==,type:str] pgp: - created_at: "2025-06-08T12:35:30Z" enc: |- diff --git a/system-modules/adb.nix b/system-modules/adb.nix index 39f2268..10f70b3 100644 --- a/system-modules/adb.nix +++ b/system-modules/adb.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, lib, ... }: +{ pkgs, ... }@all: with all; lib.mkIf (hyper.host != "NxACE") { environment.systemPackages = with pkgs; [ diff --git a/system-modules/base-packages.nix b/system-modules/base-packages.nix new file mode 100644 index 0000000..0ccdd77 --- /dev/null +++ b/system-modules/base-packages.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; ([ + git + git-crypt + lazygit # home-manager module is bugged + wget + curlHTTP3 + zip + unzip + p7zip + unar + vim + htop + openssl + dmidecode + file + ]); + +} diff --git a/system-modules/bluetooth.nix b/system-modules/bluetooth.nix new file mode 100644 index 0000000..b04a08f --- /dev/null +++ b/system-modules/bluetooth.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }@all: with all; { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + package = pkgs.bluez5-experimental; + settings.Policy.AutoEnable = "true"; + settings.General.Enable = "Source,Sink,Media,Socket"; + }; + services.blueman.enable = true; +} diff --git a/system-modules/boot.nix b/system-modules/boot.nix index 0bbf8e9..c6d8345 100644 --- a/system-modules/boot.nix +++ b/system-modules/boot.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, inputs, ... }: +{ pkgs, ... }@all: with all; let grub-theme-ascii-diana = (pkgs.fetchFromGitea { domain = "git.${hyper.domain}"; @@ -7,70 +7,64 @@ let rev = "0.5.0"; hash = "sha256-e+55NYsSsWY6GPbYUtdVEB9krueuCAWT3Ce/Ghops1g="; }); -in -{ + device-boot = if hyper.host == "NxNORTH" then { + kernelPackages = pkgs.linuxPackages_zen; + environment.systemPackages = with pkgs; [ sbctl ]; + lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; + loader.systemd-boot = { + enable = false; # let lanzaboote install systemd-boot + consoleMode = "max"; + configurationLimit = 10; + }; + } else if hyper.host == "NxXPS" then { + kernelPackages = pkgs.linuxPackages_latest; + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + kernelModules = [ "v4l2loopback" ]; + extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1''; + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + configurationLimit = 30; + device = "nodev"; + # useOSProber = true; + efiSupport = true; + theme = grub-theme-ascii-diana; + font = "${grub-theme-ascii-diana}/unicode.pf2"; + fontSize = 50; + extraEntries = '' + menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' { + insmod part_gpt + insmod fat + search --no-floppy --fs-uuid --set=root 0A97-7A2D + chainloader /EFI/Microsoft/Boot/bootmgfw.efi + } + ''; + }; + }; + } else if hyper.host == "NxACE" then { + kernelPackages = pkgs.linuxPackages_6_12; + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + device = "nodev"; + devices = []; + efiSupport = true; + }; + }; + } else assert 1 == "Unknown host"; {}; +in { imports = if hyper.host == "NxNORTH" then [ inputs.lanzaboote.nixosModules.lanzaboote ] else []; - config = if hyper.host == "NxNORTH" then { - # I have to boot with secureboot becasue of the chinese spyware called Vanguard - - environment.systemPackages = with pkgs; [ sbctl ]; - boot = { - lanzaboote = { - enable = true; - pkiBundle = "/var/lib/sbctl"; - }; - loader.systemd-boot = { - enable = false; # let lanzaboote install systemd-boot - consoleMode = "max"; - configurationLimit = 10; - }; - kernelPackages = pkgs.linuxPackages_zen; - extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; - kernelModules = [ "v4l2loopback" ]; - extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1''; - }; - security.polkit.enable = true; - } else if hyper.host == "NxXPS" then { - boot = { - loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - configurationLimit = 30; - device = "nodev"; - # useOSProber = true; - efiSupport = true; - theme = grub-theme-ascii-diana; - font = "${grub-theme-ascii-diana}/unicode.pf2"; - fontSize = 50; - extraEntries = '' - menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' { - insmod part_gpt - insmod fat - search --no-floppy --fs-uuid --set=root 0A97-7A2D - chainloader /EFI/Microsoft/Boot/bootmgfw.efi - } - ''; - }; - }; - kernelPackages = pkgs.linuxPackages_latest; - extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; - kernelModules = [ "v4l2loopback" ]; - extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1''; - }; - } else { # NxACE - boot = { - loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - device = "nodev"; - efiSupport = true; - }; - }; - kernelPackages = pkgs.linuxPackages_6_12; - }; - }; + config.boot = { + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + kernelModules = [ "v4l2loopback" ]; + extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1''; + tmp.useTmpfs = false; + } // device-boot; } diff --git a/system-modules/cache.nix b/system-modules/cache.nix new file mode 100644 index 0000000..df98863 --- /dev/null +++ b/system-modules/cache.nix @@ -0,0 +1,11 @@ +{ ... }: { + nix.settings = { + substitute = true; + substituters = [ + "https://yazi.cachix.org" + ]; + trusted-public-keys = [ + "yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k=" + ]; + }; +} diff --git a/system-modules/calendar-dicos.nix b/system-modules/calendar/dicos.nix similarity index 99% rename from system-modules/calendar-dicos.nix rename to system-modules/calendar/dicos.nix index 694a8a3..0947cf5 100644 --- a/system-modules/calendar-dicos.nix +++ b/system-modules/calendar/dicos.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { systemd.timers."nx_cal_dicos" = { enable = true; diff --git a/system-modules/calendar-lec.nix b/system-modules/calendar/lec.nix similarity index 98% rename from system-modules/calendar-lec.nix rename to system-modules/calendar/lec.nix index 3e3998b..b00c8fc 100644 --- a/system-modules/calendar-lec.nix +++ b/system-modules/calendar/lec.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { systemd.timers."nx_cal_lec" = { enable = true; diff --git a/system-modules/calendar-lr.nix b/system-modules/calendar/lr.nix similarity index 98% rename from system-modules/calendar-lr.nix rename to system-modules/calendar/lr.nix index 6605ea8..f81f5ab 100644 --- a/system-modules/calendar-lr.nix +++ b/system-modules/calendar/lr.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { systemd.timers."nx_cal_lr" = { enable = true; diff --git a/system-modules/calendar-publish.nix b/system-modules/calendar/publish.nix similarity index 99% rename from system-modules/calendar-publish.nix rename to system-modules/calendar/publish.nix index 68c648e..a4ddd32 100644 --- a/system-modules/calendar-publish.nix +++ b/system-modules/calendar/publish.nix @@ -1,9 +1,7 @@ -{ pkgs, hyper, ... }: -let +{ pkgs, hyper, ... }@all: with all; let radicale-root = "/var/lib/radicale"; web-root = "/var/nginx/webroot"; -in -{ +in { systemd.timers."nx_cal_publish" = { enable = true; wantedBy = [ "timers.target" ]; diff --git a/system-modules/davmail.nix b/system-modules/davmail.nix index 3960811..39e3427 100644 --- a/system-modules/davmail.nix +++ b/system-modules/davmail.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = with pkgs; [ diff --git a/system-modules/dm.nix b/system-modules/dm.nix index ba22c88..21919d8 100644 --- a/system-modules/dm.nix +++ b/system-modules/dm.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { services.greetd = { enable = true; diff --git a/system-modules/docker.nix b/system-modules/docker.nix index 7d9d8f7..7ac2530 100644 --- a/system-modules/docker.nix +++ b/system-modules/docker.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = with pkgs; [ diff --git a/system-modules/editor.nix b/system-modules/editor.nix new file mode 100644 index 0000000..795a9b0 --- /dev/null +++ b/system-modules/editor.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + environment = { + variables = { + EDITOR = "hx"; + VISUAL = "hx"; + }; + systemPackages = with pkgs; [ + helix + vim + ]; + }; +} diff --git a/system-modules/fcitx5.nix b/system-modules/fcitx5.nix index aba40d0..7c90b01 100644 --- a/system-modules/fcitx5.nix +++ b/system-modules/fcitx5.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { # i18n.inputMethod = { # type = "fcitx5"; diff --git a/system-modules/fonts.nix b/system-modules/fonts.nix index 4b237d2..5c77519 100644 --- a/system-modules/fonts.nix +++ b/system-modules/fonts.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, ... }@all: with all; { fonts.packages = with pkgs; [ noto-fonts diff --git a/system-modules/fuse.nix b/system-modules/fuse.nix index 2cd4b24..1d32922 100644 --- a/system-modules/fuse.nix +++ b/system-modules/fuse.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ...}: +{ pkgs, ... }@all: with all; { environment = { diff --git a/system-modules/games.nix b/system-modules/games.nix index cee2618..5d90705 100644 --- a/system-modules/games.nix +++ b/system-modules/games.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host == "NxNORTH" || hyper.host == "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host == "NxNORTH" || hyper.host == "NxACE") { programs = { steam = { diff --git a/system-modules/gpg.nix b/system-modules/gpg.nix index a483e0b..8075bd3 100644 --- a/system-modules/gpg.nix +++ b/system-modules/gpg.nix @@ -1,7 +1,8 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = with pkgs; [ gnupg + gpg-tui ]; programs.gnupg = { diff --git a/system-modules/gui.nix b/system-modules/gui.nix new file mode 100644 index 0000000..94fb4b6 --- /dev/null +++ b/system-modules/gui.nix @@ -0,0 +1,7 @@ +{ ... }: { + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + services.xserver.enable = true; +} diff --git a/system-modules/hardware-configuration.nix b/system-modules/hardware-configuration.nix index 4217bdb..57a9a4a 100644 --- a/system-modules/hardware-configuration.nix +++ b/system-modules/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, modulesPath, ... }: +{ pkgs, ... }@all: with all; { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -29,19 +29,19 @@ { device = "/dev/disk/by-label/swap"; } ]; - networking.useDHCP = pkgs.lib.mkDefault true; + networking.useDHCP = lib.mkDefault true; - hardware.cpu.intel.updateMicrocode = pkgs.lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # from nixos-hardware - services.thermald.enable = pkgs.lib.mkDefault true; + services.thermald.enable = lib.mkDefault true; boot.extraModprobeConfig = if hyper.host == "NxXPS" then '' options iwlwifi 11n_disable=8 '' else ""; boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else []; environment.variables = if hyper.host == "NxXPS" then { - VDPAU_DRIVER = pkgs.lib.mkIf config.hardware.graphics.enable (pkgs.lib.mkDefault "va_gl"); + VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); } else {}; hardware.graphics.extraPackages = if hyper.host == "NxXPS" then with pkgs; [ diff --git a/system-modules/health_reminder.nix b/system-modules/health_reminder.nix index e7f0f17..68772f4 100644 --- a/system-modules/health_reminder.nix +++ b/system-modules/health_reminder.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host != "NxACE") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host != "NxACE") { systemd.timers."health_reminder" = { enable = true; diff --git a/system-modules/hsmw.nix b/system-modules/hsmw.nix index e0255dd..18b1492 100644 --- a/system-modules/hsmw.nix +++ b/system-modules/hsmw.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, host, secrets, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = with pkgs; [ strongswanNM diff --git a/system-modules/hugo.nix b/system-modules/hugo.nix index 0c1ee73..761947d 100644 --- a/system-modules/hugo.nix +++ b/system-modules/hugo.nix @@ -1,9 +1,8 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; let p = pkgs; in { environment.systemPackages = with p; [ hugo - dart-sass ]; users = { diff --git a/system-modules/input.nix b/system-modules/input.nix new file mode 100644 index 0000000..24f18ee --- /dev/null +++ b/system-modules/input.nix @@ -0,0 +1,11 @@ +{ ... }: { + services = { + xserver.xkb = { + layout = "de"; + options = "eurosign:e,caps:escape"; + }; + libinput.enable = true; + }; + hardware.uinput.enable = true; +} + diff --git a/system-modules/kanata.nix b/system-modules/kanata.nix index 6347ff5..e6259f0 100644 --- a/system-modules/kanata.nix +++ b/system-modules/kanata.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { services.kanata = { enable = true; diff --git a/system-modules/kodi.nix b/system-modules/kodi.nix index 8b2ec09..e592fd4 100644 --- a/system-modules/kodi.nix +++ b/system-modules/kodi.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, host, ... }: +{ pkgs, ... }@all: with all; lib.mkIf (host == "NxACE") {} # { diff --git a/system-modules/networking.nix b/system-modules/networking.nix index 9224f26..0092696 100644 --- a/system-modules/networking.nix +++ b/system-modules/networking.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, secrets, ... }: +{ pkgs, ... }@all: with all; { # sops.secrets = { # "wireless-networking.env" = {}; diff --git a/system-modules/nvidia.nix b/system-modules/nvidia.nix index bb81d13..c899f9c 100644 --- a/system-modules/nvidia.nix +++ b/system-modules/nvidia.nix @@ -1,5 +1,5 @@ -{ config, pkgs, hyper, ... }: -pkgs.lib.mkIf hyper.nvidia.enable +{ pkgs, ... }@all: with all; +lib.mkIf hyper.nvidia.enable { environment.systemPackages = with pkgs; [ lshw @@ -21,7 +21,7 @@ pkgs.lib.mkIf hyper.nvidia.enable hardware = { nvidia = { - prime = pkgs.lib.mkIf hyper.nvidia.prime { + prime = lib.mkIf hyper.nvidia.prime { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; offload = { diff --git a/system-modules/nx2site.nix b/system-modules/nx2site.nix index 993c8f4..795994b 100644 --- a/system-modules/nx2site.nix +++ b/system-modules/nx2site.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, secrets, ... }: +{ pkgs, ... }@all: with all; let dns-user = "cloudflare"; in { sops.secrets = { diff --git a/system-modules/nx2site/audiobookshelf.nix b/system-modules/nx2site/audiobookshelf.nix index 9efedf6..5398a80 100644 --- a/system-modules/nx2site/audiobookshelf.nix +++ b/system-modules/nx2site/audiobookshelf.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { services = { audiobookshelf = { diff --git a/system-modules/nx2site/dyn_dns.nix b/system-modules/nx2site/dyn_dns.nix index 4b66574..f245bab 100644 --- a/system-modules/nx2site/dyn_dns.nix +++ b/system-modules/nx2site/dyn_dns.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { sops.secrets = { # "nx2site/namecheap.pw" = { }; diff --git a/system-modules/nx2site/gitea.nix b/system-modules/nx2site/gitea.nix index 96bdb10..9afb95a 100644 --- a/system-modules/nx2site/gitea.nix +++ b/system-modules/nx2site/gitea.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, secrets, ... }: +{ pkgs, ... }@all: with all; let git-user = "git"; in { sops.secrets = { diff --git a/system-modules/nx2site/nextcloud.nix b/system-modules/nx2site/nextcloud.nix index 37d067c..eb0148d 100644 --- a/system-modules/nx2site/nextcloud.nix +++ b/system-modules/nx2site/nextcloud.nix @@ -1,4 +1,4 @@ -{ config, hyper, ... }: +{ pkgs, ...}@all: with all; { sops.secrets = { "nx2site/nextcloud/admin-pass" = { owner = "nextcloud"; }; @@ -9,6 +9,7 @@ services = { nextcloud = { enable = true; + package = pkgs.nextcloud; hostName = "nc.${hyper.domain}"; https = true; configureRedis = true; diff --git a/system-modules/nx2site/open-web-calendar.nix b/system-modules/nx2site/open-web-calendar.nix index 756aa7b..2a8967f 100644 --- a/system-modules/nx2site/open-web-calendar.nix +++ b/system-modules/nx2site/open-web-calendar.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { services = { open-web-calendar = { diff --git a/system-modules/nx2site/paperless.nix b/system-modules/nx2site/paperless.nix index 7ff6604..cf8f3f3 100644 --- a/system-modules/nx2site/paperless.nix +++ b/system-modules/nx2site/paperless.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, secrets, ... }: +{ pkgs, ... }@all: with all; let paperless-user = "paperless"; in { sops.secrets = { diff --git a/system-modules/nx2site/proxy.nix b/system-modules/nx2site/proxy.nix index ff80f32..f2678c7 100644 --- a/system-modules/nx2site/proxy.nix +++ b/system-modules/nx2site/proxy.nix @@ -1,4 +1,4 @@ -{ config, hyper, pkgs, ... }: +{ pkgs, ...}@all: with all; { sops.secrets = { "nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; }; @@ -9,7 +9,7 @@ acceptTerms = true; defaults = { email = "acme@${hyper.domain}"; - webroot = "/var/nginx/webroot"; + webroot = config.services.nginx.virtualHosts."${hyper.domain}".root; group = "nginx"; }; certs = { @@ -44,7 +44,7 @@ # appendConfig = ''''; clientMaxBodySize = "20m"; defaultHTTPListenPort = 80; - defaultListenAddresses = [ "0.0.0.0" ] ++ pkgs.lib.optional config.networking.enableIPv6 "[::0]"; + defaultListenAddresses = [ "0.0.0.0" ] ++ lib.optional config.networking.enableIPv6 "[::0]"; defaultListen = dl; defaultMimeTypes = "${pkgs.mailcap}/etc/nginx/mime.types"; defaultSSLListenPort = 443; @@ -77,22 +77,24 @@ }; in { "${hyper.domain}" = vh // { - root = "/var/nginx/webroot"; + # root = "/var/nginx/webroot"; + root = "/var/lib/hugo/nx2site/public"; default = true; listen = dl; locations = { "/" = { extraConfig = '' index index.html; - if ($request_uri ~ ^/(.*)\.html(\?|$)) { - return 301 /$1; - } - try_files $uri $uri.html $uri/ /404.html =404; ''; }; "~^(/ba)$" = { return = "301 /BA.pdf"; }; "/.well-known/matrix/client" = { return = "502"; }; "/.well-known/matrix/server" = { return = "502"; }; + "/phone" = { return = "301 /en/cards/phone"; }; + "/about-me" = { return = "301 /en/slides/about-me"; }; + "/about-this-site" = { return = "301 /en/slides/about-this-site"; }; + "/gpg" = { return = "301 /en/cards/gpg"; }; + "/contact" = { return = "301 /en/cards/contact"; }; }; }; "matrix.${hyper.domain}" = { @@ -121,7 +123,7 @@ }; "sync.${hyper.domain}" = vh // { listen = dl; - locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; }; + locations = { "/" = { proxyPass = "http://127.0.0.1:8384"; }; }; }; # "git.${hyper.domain}" = vh // { # listen = dl; @@ -130,13 +132,21 @@ "git.${hyper.domain}" = vh // { http2 = false; listen = dl; - locations = { "/" = { proxyPass = "http://127.0.0.1:3000"; }; }; + locations = { + "/" = { proxyPass = "http://127.0.0.1:3000"; }; + "/robots.txt" = { + extraConfig = '' + default_type text/plain; + return 200 "User-agent: *\nDisallow: /\nAllow: /explore/repos\nAllow: /nx2/dotdiles\nAllow: /nx2"; + ''; + }; + }; }; "doc.${hyper.domain}" = vh // { listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; }; }; - "dav.${hyper.domain}" = pkgs.lib.mkIf config.services.radicale.enable (vh // { + "dav.${hyper.domain}" = lib.mkIf config.services.radicale.enable (vh // { listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; }; }); @@ -157,8 +167,9 @@ proxyWebsockets = true; }; }; - "wip.${hyper.domain}" = vh // { + "old.${hyper.domain}" = vh // { listen = dl; + root = "/var/nginx/webroot"; }; "dev.${hyper.domain}" = vh // { listen = dl; diff --git a/system-modules/nx2site/radicale.nix b/system-modules/nx2site/radicale.nix index 56861df..b805c53 100644 --- a/system-modules/nx2site/radicale.nix +++ b/system-modules/nx2site/radicale.nix @@ -1,4 +1,4 @@ -{ config, hyper, ... }: +{ pkgs, ...}@all: with all; { sops.secrets = { "nx2site/radicale/htpasswd" = { @@ -10,6 +10,7 @@ radicale = { # is run by user radicale enable = true; + package = pkgs.radicale; settings = { server.hosts = let port = builtins.toString 5232; diff --git a/system-modules/nx2site/rallly.nix b/system-modules/nx2site/rallly.nix index da4a9a5..c5a811d 100644 --- a/system-modules/nx2site/rallly.nix +++ b/system-modules/nx2site/rallly.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = [ (pkgs.mkYarnPackage { diff --git a/system-modules/nx2site/vaultwarden.nix b/system-modules/nx2site/vaultwarden.nix index 8917ca6..3ef04c5 100644 --- a/system-modules/nx2site/vaultwarden.nix +++ b/system-modules/nx2site/vaultwarden.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hyper, secrets, ... }: +{ pkgs, ... }@all: with all; { sops.secrets = { "nx2site/vaultwarden.env" = { diff --git a/system-modules/ollama.nix b/system-modules/ollama.nix index 3c9c9c6..9fe38d3 100644 --- a/system-modules/ollama.nix +++ b/system-modules/ollama.nix @@ -1,9 +1,9 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { services.ollama = { package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; enable = true; - acceleration = pkgs.lib.mkIf hyper.nvidia.enable "cuda"; + acceleration = lib.mkIf hyper.nvidia.enable "cuda"; host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1"; port = 11434; environmentVariables = { diff --git a/system-modules/postgres.nix b/system-modules/postgres.nix index 39c3f15..b441bca 100644 --- a/system-modules/postgres.nix +++ b/system-modules/postgres.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, ... }@all: with all; { services = { postgresql = { diff --git a/system-modules/printing.nix b/system-modules/printing.nix new file mode 100644 index 0000000..f97bb93 --- /dev/null +++ b/system-modules/printing.nix @@ -0,0 +1,3 @@ +{ ... }: { + services.printing.enable = true; # CUPS +} diff --git a/system-modules/qmk.nix b/system-modules/qmk.nix index 136662f..12b97d3 100644 --- a/system-modules/qmk.nix +++ b/system-modules/qmk.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { hardware.keyboard.qmk.enable = true; diff --git a/system-modules/scanning.nix b/system-modules/scanning.nix index ed066fa..63bcff3 100644 --- a/system-modules/scanning.nix +++ b/system-modules/scanning.nix @@ -3,7 +3,7 @@ hardware.sane = { enable = true; }; - services.avahi = { + services.avahi.nssmdns4 = { enable = true; nssmdns = true; }; diff --git a/system-modules/security.nix b/system-modules/security.nix new file mode 100644 index 0000000..391a55a --- /dev/null +++ b/system-modules/security.nix @@ -0,0 +1,6 @@ +{ ... }: { + security = { + polkit.enable = true; + rtkit.enable = true; + }; +} diff --git a/system-modules/sops.nix b/system-modules/sops.nix index f3271ac..14ef60e 100644 --- a/system-modules/sops.nix +++ b/system-modules/sops.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { environment.systemPackages = with pkgs; [ age diff --git a/system-modules/sound.nix b/system-modules/sound.nix index 762e312..29afad5 100644 --- a/system-modules/sound.nix +++ b/system-modules/sound.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, ... }@all: with all; { services.pipewire = { diff --git a/system-modules/terminal.nix b/system-modules/terminal.nix new file mode 100644 index 0000000..fb298dd --- /dev/null +++ b/system-modules/terminal.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }@all: with all; { + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "de"; + }; +} diff --git a/system-modules/tuda.nix b/system-modules/tuda.nix index e4f3674..c56591f 100644 --- a/system-modules/tuda.nix +++ b/system-modules/tuda.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, ... }@all: with all; { environment.etc = { "ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt"; diff --git a/system-modules/tz.nix b/system-modules/tz.nix new file mode 100644 index 0000000..a33a822 --- /dev/null +++ b/system-modules/tz.nix @@ -0,0 +1,4 @@ +{ ... }: { + time.timeZone = "Europe/Berlin"; +} + diff --git a/system-modules/users.nix b/system-modules/users.nix index 361d09b..22a9ab3 100644 --- a/system-modules/users.nix +++ b/system-modules/users.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish diff --git a/system-modules/virtualisation.nix b/system-modules/virtualisation.nix index 9fa1b9e..79c4bf4 100644 --- a/system-modules/virtualisation.nix +++ b/system-modules/virtualisation.nix @@ -1,7 +1,7 @@ -{ pkgs, hyper, ... }: +{ pkgs, ... }@all: with all; { - config = pkgs.lib.mkIf (hyper.host == "NxNORTH") { + config = lib.mkIf (hyper.host == "NxNORTH") { environment.systemPackages = with pkgs; [ virtiofsd ]; diff --git a/system-modules/ydotool.nix b/system-modules/ydotool.nix index 98d213a..a5100fb 100644 --- a/system-modules/ydotool.nix +++ b/system-modules/ydotool.nix @@ -1,5 +1,5 @@ -{ pkgs, hyper, ... }: -pkgs.lib.mkIf (hyper.host == "NxXPS") +{ pkgs, ... }@all: with all; +lib.mkIf (hyper.host == "NxXPS") { programs.ydotool.enable = true; }