diff --git a/index.html b/index.html index 1347bb4..7d178a9 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configuration @@ -209,7 +209,7 @@
  • 2.3. let
  • 2.4. General (outputs)
  • 2.5. Pre-commit-hooks (Checks)
  • -
  • 2.6. Templates
  • +
  • 2.6. Templates
  • 2.7. nixosConfigurations
  • 2.8. darwinConfigurations
  • 2.9. homeConfigurations
  • @@ -280,21 +280,25 @@
  • 3.2.1.8. e
  • 3.2.1.9. command-not-found
  • 3.2.1.10. swarselcheck
  • -
  • 3.2.1.11. waybarupdate
  • -
  • 3.2.1.12. opacitytoggle
  • -
  • 3.2.1.13. fs-diff
  • -
  • 3.2.1.14. update-checker
  • -
  • 3.2.1.15. github-notifications
  • -
  • 3.2.1.16. screenshare
  • -
  • 3.2.1.17. swarsel-bootstrap
  • -
  • 3.2.1.18. swarsel-rebuild
  • -
  • 3.2.1.19. swarsel-install
  • -
  • 3.2.1.20. swarsel-postinstall
  • -
  • 3.2.1.21. t2ts
  • -
  • 3.2.1.22. ts2t
  • -
  • 3.2.1.23. vershell
  • -
  • 3.2.1.24. eontimer
  • -
  • 3.2.1.25. project
  • +
  • 3.2.1.11. swarselzellij
  • +
  • 3.2.1.12. waybarupdate
  • +
  • 3.2.1.13. opacitytoggle
  • +
  • 3.2.1.14. fs-diff
  • +
  • 3.2.1.15. update-checker
  • +
  • 3.2.1.16. github-notifications
  • +
  • 3.2.1.17. screenshare
  • +
  • 3.2.1.18. swarsel-bootstrap
  • +
  • 3.2.1.19. swarsel-rebuild
  • +
  • 3.2.1.20. swarsel-install
  • +
  • 3.2.1.21. swarsel-postinstall
  • +
  • 3.2.1.22. t2ts
  • +
  • 3.2.1.23. ts2t
  • +
  • 3.2.1.24. vershell
  • +
  • 3.2.1.25. eontimer
  • +
  • 3.2.1.26. project
  • +
  • 3.2.1.27. fhs
  • +
  • 3.2.1.28. swarsel-displaypower
  • +
  • 3.2.1.29. swarsel-mgba
  • 3.2.2. Overlays (additions, overrides, nixpkgs-stable)
  • @@ -302,11 +306,9 @@ @@ -345,41 +348,35 @@
  • 3.3.1.10. Enable automatic store optimisation
  • 3.3.1.11. Reduce systemd timeouts
  • 3.3.1.12. Hardware settings
  • -
  • 3.3.1.13. Pipewire
  • -
  • 3.3.1.14. Common network settings
  • -
  • 3.3.1.15. Time, locale settings
  • -
  • 3.3.1.16. sops
  • -
  • 3.3.1.17. Theme (stylix)
  • -
  • 3.3.1.18. Programs (including zsh setup) +
  • 3.3.1.13. Pulseaudio
  • +
  • 3.3.1.14. Pipewire
  • +
  • 3.3.1.15. Common network settings
  • +
  • 3.3.1.16. Time, locale settings
  • +
  • 3.3.1.17. sops
  • +
  • 3.3.1.18. Theme (stylix)
  • +
  • 3.3.1.19. Programs (including zsh setup)
  • -
  • 3.3.1.19. Services +
  • 3.3.1.20. Services -
  • -
  • 3.3.1.20. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules
  • -
  • 3.3.1.21. System Login
  • -
  • 3.3.1.22. nix-ld
  • -
  • 3.3.1.23. Impermanence
  • -
  • 3.3.1.24. Summary of nixos-rebuild diff
  • -
  • 3.3.1.25. gnome-keyring
  • -
  • 3.3.1.26. Sway
  • -
  • 3.3.1.27. xdg-portal
  • -
  • 3.3.1.28. safeeyes
  • +
  • 3.3.1.21. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules
  • +
  • 3.3.1.22. System Login
  • +
  • 3.3.1.23. nix-ld
  • +
  • 3.3.1.24. Impermanence
  • +
  • 3.3.1.25. Summary of nixos-rebuild diff
  • +
  • 3.3.1.26. gnome-keyring
  • +
  • 3.3.1.27. Sway
  • +
  • 3.3.1.28. xdg-portal
  • 3.3.1.29. Podmam (distrobox)
  • 3.3.1.30. Handle lid switch correctly
  • 3.3.1.31. Low battery notification
  • @@ -484,7 +481,7 @@
  • 3.4.2. Server
  • 3.4.3. Darwin @@ -528,9 +525,7 @@
  • 4.2.1.11. org-mode: Upon-save actions (Auto-tangle, export to html, formatting)
  • 4.2.1.12. org-mode: Fold current heading
  • 4.2.1.13. corfu: Do not interrupt navigation
  • -
  • 4.2.1.14. Nix common prefix bracketer
  • -
  • 4.2.1.15. Nix formatters
  • -
  • 4.2.1.16. Disable garbace collection while minibuffer is active
  • +
  • 4.2.1.14. Disable garbace collection while minibuffer is active
  • 4.2.2. Custom Keybindings
  • @@ -555,7 +550,8 @@
  • 4.3.7.4. evil-cleverparens
  • 4.3.7.5. evil-surround
  • 4.3.7.6. evil-visual-mark-mode
  • -
  • 4.3.7.7. evil-textobj-tree-sitter
  • +
  • 4.3.7.7. evil-textobj-tree-sitter
  • +
  • 4.3.7.8. evil-textobj-tree-sitter
  • 4.3.8. ispell
  • @@ -612,65 +608,64 @@
  • 4.4.2. Nix Mode
  • 4.4.3. HCL Mode
  • 4.4.4. Jenkinsfile/Groovy
  • -
  • 4.4.5. Dockerfile
  • -
  • 4.4.6. Terraform Mode
  • -
  • 4.4.7. nixpkgs-fmt
  • -
  • 4.4.8. shfmt
  • -
  • 4.4.9. Markdown Mode +
  • 4.4.5. Ansible
  • +
  • 4.4.6. Dockerfile
  • +
  • 4.4.7. Terraform Mode
  • +
  • 4.4.8. nixpkgs-fmt
  • +
  • 4.4.9. shfmt
  • +
  • 4.4.10. Markdown Mode
  • -
  • 4.4.10. elfeed
  • -
  • 4.4.11. Ripgrep
  • -
  • 4.4.12. Tree-sitter
  • -
  • 4.4.13. direnv (envrc)
  • -
  • 4.4.14. avy
  • -
  • 4.4.15. devdocs
  • -
  • 4.4.16. Projectile
  • -
  • 4.4.17. Magit
  • -
  • 4.4.18. Yubikey support
  • -
  • 4.4.19. Forge
  • -
  • 4.4.20. git-timemachine
  • -
  • 4.4.21. Delimiters (brackets): rainbow-delimiters, highlight-parentheses
  • -
  • 4.4.22. rainbow-mode
  • -
  • 4.4.23. Corfu
  • -
  • 4.4.24. cape
  • -
  • 4.4.25. rust
  • -
  • 4.4.26. Tramp
  • -
  • 4.4.27. diff-hl
  • -
  • 4.4.28. Commenting
  • -
  • 4.4.29. eglot
  • -
  • 4.4.30. sideline-flymake
  • -
  • 4.4.31. Prevent breaking of hardlinks
  • -
  • 4.4.32. Dirvish
  • -
  • 4.4.33. undo-tree
  • -
  • 4.4.34. Hydra +
  • 4.4.11. elfeed
  • +
  • 4.4.12. Ripgrep
  • +
  • 4.4.13. Tree-sitter
  • +
  • 4.4.14. direnv (envrc)
  • +
  • 4.4.15. avy
  • +
  • 4.4.16. devdocs
  • +
  • 4.4.17. Projectile
  • +
  • 4.4.18. Magit
  • +
  • 4.4.19. Yubikey support
  • +
  • 4.4.20. Forge
  • +
  • 4.4.21. git-timemachine
  • +
  • 4.4.22. Delimiters (brackets): rainbow-delimiters, highlight-parentheses
  • +
  • 4.4.23. rainbow-mode
  • +
  • 4.4.24. Corfu
  • +
  • 4.4.25. cape
  • +
  • 4.4.26. rust
  • +
  • 4.4.27. Tramp
  • +
  • 4.4.28. diff-hl
  • +
  • 4.4.29. Commenting
  • +
  • 4.4.30. eglot
  • +
  • 4.4.31. lsp-mode & company
  • +
  • 4.4.32. lsp-bridge
  • +
  • 4.4.33. sideline-flymake
  • +
  • 4.4.34. Prevent breaking of hardlinks
  • +
  • 4.4.35. Dirvish
  • +
  • 4.4.36. undo-tree
  • +
  • 4.4.37. Hydra
  • -
  • 4.4.35. Email +
  • 4.4.38. Email
  • -
  • 4.4.36. Calendar
  • -
  • 4.4.37. Dashboard: emacs startup screen
  • -
  • 4.4.38. vterm
  • -
  • 4.4.39. multiple cursors
  • -
  • 4.4.40. Less logging
  • +
  • 4.4.39. Calendar
  • +
  • 4.4.40. Dashboard: emacs startup screen
  • +
  • 4.4.41. vterm
  • +
  • 4.4.42. multiple cursors
  • +
  • 4.4.43. Less logging
  • -
  • 5. Appendix A: Noweb-Ref blocks - -
  • +
  • 5. Appendix A: Noweb-Ref blocks
  • 6. Appendix B: Supplementary Files @@ -749,7 +744,7 @@ system-configuration-options
    ---prefix=/nix/store/hzdmp1fxycaibbpk8lr0imjzi8n7yr4i-emacs-pgtk-20241230.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --without-xwidgets --with-dbus --with-selinux
    +--prefix=/nix/store/n5jvxqgs8pv4zfs8qvabcnns87ckccmk-emacs-pgtk-20250223.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --without-xwidgets --with-dbus --with-selinux
     
    @@ -864,7 +859,7 @@ In outputs = inputs@ [...], the inputs@ makes it so th inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; systems.url = "github:nix-systems/default-linux"; home-manager = { url = "github:nix-community/home-manager"; @@ -940,38 +935,13 @@ In outputs = inputs@ [...], the inputs@ makes it so th inherit (self) outputs; lib = (nixpkgs.lib // home-manager.lib).extend (_: _: { swarselsystems = import ./lib { inherit self lib inputs outputs systems; }; }); - - # NixOS modules that can only be used on NixOS systems - nixModules = [ - inputs.stylix.nixosModules.stylix - inputs.lanzaboote.nixosModules.lanzaboote - inputs.disko.nixosModules.disko - inputs.impermanence.nixosModules.impermanence - inputs.sops-nix.nixosModules.sops - inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm - inputs.nix-topology.nixosModules.default - ./profiles/common/nixos - ]; - - # Home-Manager modules wanted on non-NixOS systems - homeModules = [ - inputs.stylix.homeManagerModules.stylix - ]; - - # Home-Manager modules wanted on both NixOS and non-NixOS systems - mixedModules = [ - inputs.sops-nix.homeManagerModules.sops - inputs.nix-index-database.hmModules.nix-index - ./profiles/common/home - ]; - in { - inherit lib nixModules mixedModules homeModules; + inherit lib; nixosModules = import ./modules/nixos { inherit lib; }; - homeManagerModules = import ./modules/home { inherit lib; }; + homeModules = import ./modules/home { inherit lib; }; packages = lib.swarselsystems.forEachSystem (pkgs: import ./pkgs { inherit lib pkgs; }); formatter = lib.swarselsystems.forEachSystem (pkgs: pkgs.nixpkgs-fmt); overlays = import ./overlays { inherit self lib inputs; }; @@ -1021,11 +991,12 @@ In outputs = inputs@ [...], the inputs@ makes it so th checks = lib.swarselsystems.forAllSystems (system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = lib.swarselsystems.pkgsFor.${system}; in import ./checks { inherit self inputs system pkgs; } ); + nixosConfigurations = lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos"; homeConfigurations = @@ -1052,6 +1023,7 @@ In outputs = inputs@ [...], the inputs@ makes it so th lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "android" lib.swarselsystems.pkgsFor.aarch64-linux; + topology = lib.swarselsystems.forEachSystem (pkgs: import inputs.nix-topology { @@ -1143,7 +1115,7 @@ This automatically creates a topology diagram of my configuration.
  •  nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    -nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
    +nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
     systems.url = "github:nix-systems/default-linux";
     home-manager = {
       url = "github:nix-community/home-manager";
    @@ -1214,22 +1186,11 @@ nix-topology.url = "github:oddlama/nix-topology";
     

    2.3. let

    -Here I define a few variables that I need for my system specifications. First and foremost, pkgs, which gets passed the emacs-overlay, nur, and nixgl modules to it. With this, I can grab all these packages by referencing pkgs.<name> instead of having to put e.g. nixgl.auto.nixGLDefault. -

    - -

    -I also define some common module lists that I can simply load depending on the fundamental system (NixOS vs. non-NixOS) - nixModules, homeModules, and mixedModules. -

    - -

    -The interesting part is in the start: +Here I define a few variables that I need for my system specifications. There used to be more here, but I managed to optimize my configuration, and only two things remain:

      -
    • first, I define pkgsFor. This function reads all available systems from nixpkgs and generates pkgs for them.
    • -
    • next, forEachSystem is a function that can be called to declare an output for each such defined system.
    • -
    • forAllSystems is a crude function that I use for expressions that depend on system, as the prior two attributes already consumed it at that stage. This is only really used to generate the checks in their own file.
    • -
    • mkFullHost is a function that takes a hostname as well as a boolean whether it is NixOS or not, and returns a matching nixosSystem or darwinSystem. This function is only used for systems that can use both NixOS and home-manager options (darwin still counts here as it can use some NixOS options).
    • -
    • mkFullHostConfigs is the function that dynamically creates all definded hosts. The hosts are defined by placing a directory in hosts/ under either the nixos/ or darwin/ directory. These directories are being read by readHosts and delivered to this funtion in the later call in nixosConfigurations or darwinConfigurations.
    • +
    • outputs, which is needed for lib
    • +
    • lib: This exposes a common lib for NixOS and home-manager that is extended by my own personal lib functions.
    @@ -1237,31 +1198,6 @@ The interesting part is in the start: inherit (self) outputs; lib = (nixpkgs.lib // home-manager.lib).extend (_: _: { swarselsystems = import ./lib { inherit self lib inputs outputs systems; }; }); - -# NixOS modules that can only be used on NixOS systems -nixModules = [ - inputs.stylix.nixosModules.stylix - inputs.lanzaboote.nixosModules.lanzaboote - inputs.disko.nixosModules.disko - inputs.impermanence.nixosModules.impermanence - inputs.sops-nix.nixosModules.sops - inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm - inputs.nix-topology.nixosModules.default - ./profiles/common/nixos -]; - -# Home-Manager modules wanted on non-NixOS systems -homeModules = [ - inputs.stylix.homeManagerModules.stylix -]; - -# Home-Manager modules wanted on both NixOS and non-NixOS systems -mixedModules = [ - inputs.sops-nix.homeManagerModules.sops - inputs.nix-index-database.hmModules.nix-index - ./profiles/common/home -]; -
    @@ -1275,7 +1211,7 @@ In this section I am creating some attributes that define general concepts of my
    -
    { self, inputs, outputs, lib, ... }:
    +
    { self, inputs, lib, ... }:
     let
       profilesPath = "${self}/profiles";
     in
     {
       imports = [
     
    -    inputs.sops-nix.nixosModules.sops
    -    "${profilesPath}/server/nixos"
    +    "${profilesPath}/nixos/server"
         ./hardware-configuration.nix
     
         inputs.home-manager.nixosModules.home-manager
         {
           home-manager.users.swarsel.imports = [
    -        "${profilesPath}/server/home"
    -      ] ++ (builtins.attrValues outputs.homeManagerModules);
    +        "${profilesPath}/home/server"
    +      ];
         }
    -
    -  ] ++ (builtins.attrValues outputs.nixosModules);
    +  ];
     
       sops = {
         defaultSopsFile = lib.mkForce "/root/.dotfiles/secrets/sync/secrets.yaml";
       };
     
    -
       services.nginx = {
         virtualHosts = {
           "sync.swarsel.win" = {
    @@ -2465,6 +2373,7 @@ in
       zramSwap.enable = false;
     
       networking = {
    +    nftables.enable = lib.mkForce false;
         firewall.allowedTCPPorts = [ 8384 22000 ];
         firewall.allowedUDPPorts = [ 21027 22000 ];
         hostName = "sync";
    @@ -2534,40 +2443,35 @@ let
       profilesPath = "${self}/profiles";
       sharedOptions = {
         isBtrfs = true;
    +    isLinux = true;
       };
     in
     {
     
       imports = [
    -    inputs.disko.nixosModules.disko
         "${self}/hosts/nixos/toto/disk-config.nix"
         ./hardware-configuration.nix
     
    -    inputs.sops-nix.nixosModules.sops
    -    inputs.impermanence.nixosModules.impermanence
    -    inputs.lanzaboote.nixosModules.lanzaboote
    -
    -    "${profilesPath}/optional/nixos/autologin.nix"
    -    "${profilesPath}/common/nixos/settings.nix"
    -    "${profilesPath}/common/nixos/home-manager.nix"
    -    "${profilesPath}/common/nixos/xserver.nix"
    -    "${profilesPath}/common/nixos/users.nix"
    -    "${profilesPath}/common/nixos/impermanence.nix"
    -    "${profilesPath}/common/nixos/lanzaboote.nix"
    -    "${profilesPath}/common/nixos/sops.nix"
    -    "${profilesPath}/server/nixos/ssh.nix"
    +    "${profilesPath}/nixos/optional/autologin.nix"
    +    "${profilesPath}/nixos/common/settings.nix"
    +    "${profilesPath}/nixos/common/home-manager.nix"
    +    "${profilesPath}/nixos/common/xserver.nix"
    +    "${profilesPath}/nixos/common/users.nix"
    +    "${profilesPath}/nixos/common/impermanence.nix"
    +    "${profilesPath}/nixos/common/lanzaboote.nix"
    +    "${profilesPath}/nixos/common/sops.nix"
    +    "${profilesPath}/nixos/server/ssh.nix"
     
         inputs.home-manager.nixosModules.home-manager
         {
           home-manager.users.swarsel.imports = [
             inputs.sops-nix.homeManagerModules.sops
    -        "${profilesPath}/common/home/settings.nix"
    -        "${profilesPath}/common/home/sops.nix"
    -        "${profilesPath}/common/home/ssh.nix"
    -
    -      ] ++ (builtins.attrValues outputs.homeManagerModules);
    +        "${profilesPath}/home/common/settings.nix"
    +        "${profilesPath}/home/common/sops.nix"
    +        "${profilesPath}/home/common/ssh.nix"
    +      ] ++ (builtins.attrValues outputs.homeModules);
         }
    -  ] ++ (builtins.attrValues outputs.nixosModules);
    +  ] ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules);
     
     
       environment.systemPackages = with pkgs; [
    @@ -2602,7 +2506,6 @@ in
           isCrypted = true;
           isSecureBoot = false;
           isSwap = true;
    -      isLinux = true;
           swapSize = "8G";
           # rootDisk = "/dev/nvme0n1";
           rootDisk = "/dev/vda";
    @@ -2802,11 +2705,6 @@ in
     {
     
       imports = [
    -
    -    inputs.lanzaboote.nixosModules.lanzaboote
    -    inputs.disko.nixosModules.disko
    -    inputs.impermanence.nixosModules.impermanence
    -    inputs.sops-nix.nixosModules.sops
         "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
         "${modulesPath}/installer/cd-dvd/channel.nix"
     
    @@ -2815,8 +2713,8 @@ in
         inputs.home-manager.nixosModules.home-manager
         {
           home-manager.users.swarsel.imports = [
    -        "${self}/profiles/common/home/settings.nix"
    -      ] ++ (builtins.attrValues outputs.homeManagerModules);
    +        "${self}/profiles/home/common/settings.nix"
    +      ] ++ (builtins.attrValues outputs.homeModules);
         }
       ];
     
    @@ -2926,7 +2824,12 @@ This is the "reference implementation" of a setup that runs without NixOS, only
     
    { self, outputs, config, ... }:
     {
     
    -  imports = outputs.homeModules ++ outputs.mixedModules ++ (builtins.attrValues outputs.homeManagerModules);
    +  imports = [
    +    inputs.stylix.homeManagerModules.stylix
    +    inputs.sops-nix.homeManagerModules.sops
    +    inputs.nix-index-database.hmModules.nix-index
    +    ./profiles/home/common
    +  ] ++ (builtins.attrValues outputs.homeModules);
     
       nixpkgs = {
         overlays = [ outputs.overlays.default ];
    @@ -2974,31 +2877,16 @@ I also set the WLR_RENDERER_ALLOW_SOFTWARE=1 to allow this configur
     
     
     
    -
    { self, inputs, outputs, pkgs, lib, ... }:
    +
    { self, pkgs, lib, ... }:
     let
       profilesPath = "${self}/profiles";
     in
     {
     
    -  imports = outputs.nixModules ++ [
    -
    +  imports = [
         ./hardware-configuration.nix
    -
    -    "${profilesPath}/optional/nixos/autologin.nix"
    -
    -    inputs.home-manager.nixosModules.home-manager
    -    {
    -      home-manager.users.swarsel.imports = outputs.mixedModules ++ (builtins.attrValues outputs.homeManagerModules);
    -    }
    -  ] ++ (builtins.attrValues outputs.nixosModules);
    -
    -
    -  nixpkgs = {
    -    overlays = [ outputs.overlays.default ];
    -    config = {
    -      allowUnfree = true;
    -    };
    -  };
    +    "${profilesPath}/nixos/optional/autologin.nix"
    +  ];
     
       environment.variables = {
         WLR_RENDERER_ALLOW_SOFTWARE = 1;
    @@ -3081,32 +2969,7 @@ Note: The structure of generating the packages was changed in commit 2cf03
     
    { lib, pkgs, ... }:
     let
    -  packageNames = [
    -    "pass-fuzzel"
    -    "cura5"
    -    "hm-specialisation"
    -    "cdw"
    -    "cdb"
    -    "bak"
    -    "timer"
    -    "e"
    -    "swarselcheck"
    -    "waybarupdate"
    -    "opacitytoggle"
    -    "fs-diff"
    -    "update-checker"
    -    "github-notifications"
    -    "screenshare"
    -    "swarsel-bootstrap"
    -    "swarsel-rebuild"
    -    "swarsel-install"
    -    "swarsel-postinstall"
    -    "t2ts"
    -    "ts2t"
    -    "vershell"
    -    "eontimer"
    -    "project"
    -  ];
    +  packageNames = lib.swarselsystems.readNix "pkgs";
     in
     lib.swarselsystems.mkPackages packageNames pkgs
     
    @@ -3476,7 +3339,7 @@ if [[ $kitty -eq 1 ]]; then
         STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep kittyterm || true)
         CHECK=$(swaymsg -t get_tree | grep kittyterm || true)
         if [ "$CHECK" == "" ]; then
    -        exec kitty -T kittyterm &
    +        exec kitty -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm &
             sleep 1
         fi
         if [ "$STR" == "" ]; then
    @@ -3522,12 +3385,38 @@ writeShellApplication {
       text = builtins.readFile "${self}/scripts/${name}.sh";
     }
     
    +
    +
    +
    +
    +
    +
    3.2.1.11. swarselzellij
    +
    +
    +
    KITTIES=$(($(pgrep -P 1 kitty | wc -l) - 1))
    +
    +if [[ $KITTIES -lt 1 ]]; then
    +    exec kitty -o confirm_os_window_close=0 zellij attach --create main
    +else
    +    exec kitty -o confirm_os_window_close=0 zellij attach --create "temp $KITTIES"
    +fi
    +
    +
    + +
    +
    { self, name, writeShellApplication, kitty }:
    +writeShellApplication {
    +  inherit name;
    +  runtimeInputs = [ kitty ];
    +  text = builtins.readFile "${self}/scripts/${name}.sh";
    +}
    +
     
    -
    3.2.1.11. waybarupdate
    +
    3.2.1.12. waybarupdate

    This scripts checks if there are uncommited changes in either my dotfile repo, my university repo, or my passfile repo. In that case a warning will be shown in waybar. @@ -3574,7 +3463,7 @@ writeShellApplication {

    -
    3.2.1.12. opacitytoggle
    +
    3.2.1.13. opacitytoggle

    This app quickly toggles between 5% and 0% transparency. @@ -3601,7 +3490,7 @@ writeShellApplication {

    -
    3.2.1.13. fs-diff
    +
    3.2.1.14. fs-diff

    This utility is used to compare the current state of the root directory with the blanket state that is stored in /root-blank (the snapshot that is restored on each reboot of an impermanence machine). Using this, I can find files that I will lose once I reboot - if there are important files in that list, I can then easily add them to the persist options. @@ -3642,7 +3531,7 @@ writeShellApplication {

    -
    3.2.1.14. update-checker
    +
    3.2.1.15. update-checker

    This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version. @@ -3678,7 +3567,7 @@ writeShellApplication {

    -
    3.2.1.15. github-notifications
    +
    3.2.1.16. github-notifications

    This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version. @@ -3704,7 +3593,7 @@ writeShellApplication {

    -
    3.2.1.16. screenshare
    +
    3.2.1.17. screenshare
    SHARESCREEN="$(nix eval --raw ~/.dotfiles#nixosConfigurations."$(hostname)".config.home-manager.users."$(whoami)".swarselsystems.sharescreen)"
    @@ -3740,7 +3629,7 @@ writeShellApplication {
     
    -
    3.2.1.17. swarsel-bootstrap
    +
    3.2.1.18. swarsel-bootstrap

    This program sets up a new NixOS host remotely. It also takes care of secret management on the new host. @@ -4102,7 +3991,7 @@ writeShellApplication {

    -
    3.2.1.18. swarsel-rebuild
    +
    3.2.1.19. swarsel-rebuild

    This program builds a configuration locally. @@ -4213,7 +4102,7 @@ writeShellApplication {

    -
    3.2.1.19. swarsel-install
    +
    3.2.1.20. swarsel-install

    This program sets up a new NixOS host locally. @@ -4400,7 +4289,7 @@ writeShellApplication {

    -
    3.2.1.20. swarsel-postinstall
    +
    3.2.1.21. swarsel-postinstall

    This program sets up a new NixOS host locally. @@ -4498,7 +4387,7 @@ writeShellApplication {

    -
    3.2.1.21. t2ts
    +
    3.2.1.22. t2ts

    This script allows for quick git branch switching. @@ -4520,7 +4409,7 @@ writeShellApplication {

    -
    3.2.1.22. ts2t
    +
    3.2.1.23. ts2t

    This script allows for quick git branch switching. @@ -4542,7 +4431,7 @@ writeShellApplication {

    -
    3.2.1.23. vershell
    +
    3.2.1.24. vershell

    This script allows for quick git branch switching. @@ -4564,32 +4453,44 @@ writeShellApplication {

    -
    3.2.1.24. eontimer
    +
    3.2.1.25. eontimer

    This script allows for quick git branch switching.

    -
    { pkgs, python3Packages, ... }:
    -
    -python3Packages.buildPythonApplication rec {
    +
    { lib
    +, python3
    +, fetchFromGitHub
    +, makeDesktopItem
    +, writeShellScript
    +, ...
    +}:
    +let
    +  wrapper = writeShellScript "eontimer-wrapper" ''
    +    export QT_QPA_PLATFORM=xcb
    +    exec @out@/bin/EonTimer
    +  '';
    +in
    +python3.pkgs.buildPythonApplication rec {
       pname = "eontimer";
    -  version = "3.0.0";
    +  version = "3.0.0-rc.6";
       pyproject = true;
     
    -  src = pkgs.fetchFromGitHub {
    +  src = fetchFromGitHub {
         owner = "DasAmpharos";
         repo = "EonTimer";
    -    rev = "9449e6158f0aa6eaa24b3b1d0a427aa198b5c0e4";
    +    rev = version;
         hash = "sha256-+XN/VGGlEg2gVncRZrWDOZ2bfxt8xyIu22F2wHlG6YI=";
       };
     
    -  build-system = with python3Packages; [
    -    setuptools
    +  build-system = [
    +    python3.pkgs.setuptools
    +    python3.pkgs.wheel
       ];
     
    -  dependencies = with python3Packages; [
    +  dependencies = with python3.pkgs; [
         altgraph
         certifi
         charset-normalizer
    @@ -4609,25 +4510,59 @@ python3Packages.buildPythonApplication rec {
         urllib3
       ];
     
    +  nativeBuildInputs = [
    +    python3.pkgs.pyinstaller
    +  ];
    +
       buildPhase = ''
    -    ${pkgs.python3Packages.pyinstaller}/bin/pyinstaller EonTimer.spec
    +    runHook preBuild
    +
    +    pyinstaller --clean --noconfirm EonTimer.spec
    +
    +    runHook postBuild
       '';
     
       installPhase = ''
    +    runHook preInstall
    +
         mkdir -p $out/bin
    +    mkdir -p $out/share/applications
         cp dist/EonTimer $out/bin/
    +    install -Dm755 -T ${wrapper} $out/bin/eontimer
    +    substituteInPlace $out/bin/eontimer --subst-var out
    +
    +    runHook postInstall
    +  '';
    +
    +  postInstall = ''
    +    install -Dm755 -t $out/share/applications ${
    +         makeDesktopItem {
    +           name = "eontimer";
    +           desktopName = "EonTimer";
    +           comment = "Start EonTimer";
    +           exec = "eontimer";
    +         }
    +       }/share/applications/eontimer.desktop
       '';
     
     
    +
    +  meta = {
    +    description = "Pokémon RNG Timer";
    +    homepage = "https://github.com/DasAmpharos/EonTimer";
    +    license = lib.licenses.mit;
    +    maintainers = with lib.maintainers; [ ];
    +    mainProgram = "eon-timer";
    +  };
     }
     
     
    -
    -
    3.2.1.25. project
    -
    +
    +
    3.2.1.26. project
    +
    set -euo pipefail
     
    @@ -4645,6 +4580,84 @@ writeShellApplication {
       inherit name;
       text = builtins.readFile "${self}/scripts/${name}.sh";
     }
    +
    +
    +
    +
    +
    +
    3.2.1.27. fhs
    +
    +
    +
    { name, pkgs, ... }:
    +let
    +  base = pkgs.appimageTools.defaultFhsEnvArgs;
    +in
    +pkgs.buildFHSEnv (base // {
    +  name = "fhs";
    +  targetPkgs = pkgs: (base.targetPkgs pkgs) ++ [ pkgs.pkg-config ];
    +  profile = "export FHS=1";
    +  runScript = "zsh";
    +  extraOutputsToInstall = [ "dev" ];
    +})
    +
    +
    +
    +
    +
    +
    3.2.1.28. swarsel-displaypower
    +
    +

    +A crude script to power on all displays that might be attached. Needed because sometimes displays do not awake from sleep. +

    + +
    +
    swaymsg output eDP-1 power on > /dev/null 2>&1 || true
    +swaymsg output eDP-2 power on > /dev/null 2>&1 || true
    +
    +
    + +
    +
    { self, name, writeShellApplication, sway }:
    +writeShellApplication {
    +  inherit name;
    +  runtimeInputs = [ sway ];
    +  text = builtins.readFile "${self}/scripts/${name}.sh";
    +}
    +
    +
    +
    +
    +
    +
    +
    3.2.1.29. swarsel-mgba
    +
    +

    +AppImage version of mgba in which the lua scripting works. +

    + + +
    +
    { appimageTools, fetchurl, ... }:
    +let
    +  pname = "mgba";
    +  version = "0.10.4";
    +  src = fetchurl {
    +    url = "https://github.com/mgba-emu/mgba/releases/download/${version}/mGBA-${version}-appimage-x64.appimage";
    +    hash = "sha256-rDihDfuA8DqxvCe6UeavCzpjeU+fSqUbFnyTNC2dc1I=";
    +  };
    +  appimageContents = appimageTools.extractType2 { inherit pname version src; };
    +in
    +appimageTools.wrapType2 {
    +  inherit pname version src;
    +  extraInstallCommands = ''
    +    install -Dm444 ${appimageContents}/io.mgba.mGBA.desktop -t $out/share/applications
    +    substituteInPlace $out/share/applications/io.mgba.mGBA.desktop \
    +      --replace-fail 'Exec=mgba-qt %f' 'Exec=mgba'
    +    cp -r ${appimageContents}/usr/share/icons $out/share
    +  '';
    +
    +}
    +
     
    @@ -4667,7 +4680,7 @@ When adding a new entry here, do not forget to add it in the default output of t let additions = final: _: import "${self}/pkgs" { pkgs = final; inherit lib; }; - modifications = _: prev: { + modifications = final: prev: { vesktop = prev.vesktop.override { withSystemVencord = true; }; @@ -4680,6 +4693,8 @@ let ]; }; + mgba = final.swarsel-mgba; + retroarch = prev.retroarch.withCores (cores: with cores; [ snes9x # snes nestopia # nes @@ -4756,42 +4771,15 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
    { lib, ... }:
     let
    -  moduleNames = [
    -    "wallpaper"
    -    "hardware"
    -    "setup"
    -    "server"
    -    "input"
    -  ];
    +  moduleNames = lib.swarselsystems.readNix "modules/nixos";
     in
     lib.swarselsystems.mkModules moduleNames "nixos"
     
     
    -
    -
    3.2.3.1.1. Wallpaper
    -
    -

    -This lets me set the wallpaper that I want to use. Duplicated with home-manager options because mixing system and user level configuration is not a good idea. -

    - -
    -
    { lib, ... }:
    -
    -{
    -  options.swarselsystems.wallpaper = lib.mkOption {
    -    type = lib.types.path;
    -    default = "";
    -  };
    -}
    -
    -
    -
    -
    -
    -
    3.2.3.1.2. Hardware
    +
    3.2.3.1.1. Hardware

    This lets me set some basic flags about the hardware of the configured systems. @@ -4814,7 +4802,7 @@ This lets me set some basic flags about the hardware of the configured systems.

    -
    3.2.3.1.3. Setup
    +
    3.2.3.1.2. Setup

    I usually use mutableUsers = false in my NixOS configuration. However, on a new system where sops-keys have not been deployed, this would immediately lock me out of the system. Hence this flag can be used until sops-keys are created. @@ -4827,10 +4815,6 @@ I usually use mutableUsers = false in my NixOS configuration. Howev type = lib.types.str; default = "swarsel"; }; - options.swarselsystems.flakePath = lib.mkOption { - type = lib.types.str; - default = ""; - }; options.swarselsystems.withHomeManager = lib.mkOption { type = lib.types.bool; default = true; @@ -4848,11 +4832,8 @@ I usually use mutableUsers = false in my NixOS configuration. Howev default = ""; }; options.swarselsystems.isCrypted = lib.mkEnableOption "uses full disk encryption"; - options.swarselsystems.isPublic = lib.mkEnableOption "is a public machine (no secrets)"; options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)"; - options.swarselsystems.isLinux = lib.mkEnableOption "whether this is a linux machine"; - options.swarselsystems.isBtrfs = lib.mkEnableOption "use btrfs filesystem"; options.swarselsystems.isImpermanence = lib.mkEnableOption "use impermanence on this system"; options.swarselsystems.isSecureBoot = lib.mkEnableOption "use secure boot on this system"; } @@ -4861,7 +4842,7 @@ I usually use mutableUsers = false in my NixOS configuration. Howev

    -
    3.2.3.1.4. Server
    +
    3.2.3.1.3. Server
    { lib, ... }:
    @@ -4890,25 +4871,6 @@ I usually use mutableUsers = false in my NixOS configuration. Howev
     
    -
    -
    3.2.3.1.5. Input
    -
    -

    -This section is for everything input-related on the NixOS side. At the moment, this is only used to define shell aliases for servers. -

    - -
    -
    { lib, ... }:
    -{
    -  options.swarselsystems.shellAliases = lib.mkOption {
    -    type = lib.types.attrsOf lib.types.str;
    -    default = { };
    -  };
    -}
    -
    -
    -
    -
    3.2.3.2. home-manager
    @@ -4920,19 +4882,7 @@ This holds modules that are to be used on most hosts. These are also the most im
    { lib, ... }:
     let
    -  moduleNames = [
    -    "laptop"
    -    "hardware"
    -    "monitors"
    -    "input"
    -    "nixos"
    -    "darwin"
    -    "waybar"
    -    "startup"
    -    "wallpaper"
    -    "filesystem"
    -    "firefox"
    -  ];
    +  moduleNames = lib.swarselsystems.readNix "modules/home";
     in
     lib.swarselsystems.mkModules moduleNames "home"
     
    @@ -4942,8 +4892,14 @@ lib.swarselsystems.mkModules moduleNames "home"
    3.2.3.2.1. Laptop

    -Laptops are not always plugged in, so they should show a battery icon in Waybar. Also, most laptops have a touchpad which usually needs to be configured. +Laptops are not always plugged in, so they should show a battery icon in Waybar. Also, most laptops have a touchpad which usually needs to be configured:

    +
      +
    • Tapping should be enabled.
    • +
    • The touchpad should be disabled while typing (dwt option).
    • +
    • Natural scrolling should be enabled.
    • +
    • Tag-and-drag lock should be disbled - it gets in my way too much.
    • +
    { lib, config, ... }:
    @@ -4955,6 +4911,7 @@ Laptops are not always plugged in, so they should show a battery icon in Waybar.
           tap = "enabled";
           natural_scroll = "enabled";
           middle_emulation = "enabled";
    +      drag_lock = "disabled";
         };
       };
       config.swarselsystems.waybarModules = lib.mkIf config.swarselsystems.isLaptop [
    @@ -5183,7 +5140,7 @@ These are some extra options that will be used if the machine also runs NixOS. F
     
    -
    3.2.3.2.7. darwin
    +
    3.2.3.2.7. setup

    Provides settings related to nix-darwin systems. At the moment, I am only making use of a isDarwin flag. @@ -5193,6 +5150,7 @@ Provides settings related to nix-darwin systems. At the moment, I am only making

    { lib, ... }:
     {
       options.swarselsystems.isDarwin = lib.mkEnableOption "darwin host";
    +  options.swarselsystems.isLinux = lib.mkEnableOption "whether this is a linux machine";
     }
     
    @@ -5249,11 +5207,11 @@ Again, I set the wallpaper here for stylix.

    -
    { lib, ... }:
    +
    { self, lib, ... }:
     {
       options.swarselsystems.wallpaper = lib.mkOption {
         type = lib.types.path;
    -    default = "";
    +    default = self + /wallpaper/lenovowp.png;
       };
     }
     
    @@ -5303,50 +5261,52 @@ in
         default = {
           isDefault = false;
           userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css";
    -      extensions = with pkgs.nur.repos.rycee.firefox-addons; [
    -        tridactyl
    -        tampermonkey
    -        sidebery
    -        browserpass
    -        clearurls
    -        darkreader
    -        enhancer-for-youtube
    -        istilldontcareaboutcookies
    -        translate-web-pages
    -        ublock-origin
    -        reddit-enhancement-suite
    -        sponsorblock
    -        web-archives
    -        onepassword-password-manager
    -        single-file
    -        widegithub
    -        enhanced-github
    -        unpaywall
    -        don-t-fuck-with-paste
    -        plasma-integration
    -        (buildFirefoxXpiAddon {
    -          pname = "shortkeys";
    -          version = "4.0.2";
    -          addonId = "Shortkeys@Shortkeys.com";
    -          url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi";
    -          sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c";
    -          meta = with lib;
    -            {
    -              description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys";
    -              mozPermissions = [
    -                "tabs"
    -                "downloads"
    -                "clipboardWrite"
    -                "browsingData"
    -                "storage"
    -                "bookmarks"
    -                "sessions"
    -                "<all_urls>"
    -              ];
    -              platforms = platforms.all;
    -            };
    -        })
    -      ];
    +      extensions = {
    +        packages = with pkgs.nur.repos.rycee.firefox-addons; [
    +          tridactyl
    +          tampermonkey
    +          sidebery
    +          browserpass
    +          clearurls
    +          darkreader
    +          enhancer-for-youtube
    +          istilldontcareaboutcookies
    +          translate-web-pages
    +          ublock-origin
    +          reddit-enhancement-suite
    +          sponsorblock
    +          web-archives
    +          onepassword-password-manager
    +          single-file
    +          widegithub
    +          enhanced-github
    +          unpaywall
    +          don-t-fuck-with-paste
    +          plasma-integration
    +          (buildFirefoxXpiAddon {
    +            pname = "shortkeys";
    +            version = "4.0.2";
    +            addonId = "Shortkeys@Shortkeys.com";
    +            url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi";
    +            sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c";
    +            meta = with lib;
    +              {
    +                description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys";
    +                mozPermissions = [
    +                  "tabs"
    +                  "downloads"
    +                  "clipboardWrite"
    +                  "browsingData"
    +                  "storage"
    +                  "bookmarks"
    +                  "sessions"
    +                  "<all_urls>"
    +                ];
    +                platforms = platforms.all;
    +              };
    +          })
    +        ];
    +      };
     
           settings =
             {
    @@ -5438,6 +5398,64 @@ in
       };
     
     
    +}
    +
    +
    +
    +
    +
    +
    3.2.3.2.12. stylix
    +
    +
    +
    { self, lib, pkgs, ... }:
    +{
    +  options.swarselsystems.stylix = lib.mkOption {
    +    type = lib.types.attrs;
    +    default = {
    +      enable = true;
    +      base16Scheme = "${self}/programs/stylix/swarsel.yaml";
    +      polarity = "dark";
    +      opacity.popups = 0.5;
    +      cursor = {
    +        package = pkgs.banana-cursor;
    +        # package = pkgs.capitaine-cursors;
    +        name = "Banana";
    +        # name = "capitaine-cursors";
    +        size = 16;
    +      };
    +      fonts = {
    +        sizes = {
    +          terminal = 10;
    +          applications = 11;
    +        };
    +        serif = {
    +          # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    +          package = pkgs.cantarell-fonts;
    +          # package = pkgs.montserrat;
    +          name = "Cantarell";
    +          # name = "FiraCode Nerd Font Propo";
    +          # name = "Montserrat";
    +        };
    +        sansSerif = {
    +          # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    +          package = pkgs.cantarell-fonts;
    +          # package = pkgs.montserrat;
    +          name = "Cantarell";
    +          # name = "FiraCode Nerd Font Propo";
    +          # name = "Montserrat";
    +        };
    +        monospace = {
    +          package = pkgs.nerd-fonts.fira-mono; # has overrides
    +          name = "FiraCode Nerd Font Mono";
    +        };
    +        emoji = {
    +          package = pkgs.noto-fonts-emoji;
    +          name = "Noto Color Emoji";
    +        };
    +      };
    +    };
    +  };
    +
     }
     
    @@ -5456,6 +5474,22 @@ This section defines all functions of my own that I add to lib. The A breakdown of each function:

    +

    +The interesting part is in the start: +

    +
    +

    +TODO +

    +
    { self, lib, systems, inputs, outputs, ... }:
     {
    @@ -5490,7 +5524,50 @@ A breakdown of each function:
           in
           systemFunc {
             specialArgs = { inherit inputs outputs lib self; };
    -        modules = [ "${self}/hosts/${type}/${host}" ];
    +        modules = [
    +          # put inports here that are for all hosts
    +          inputs.disko.nixosModules.disko
    +          inputs.sops-nix.nixosModules.sops
    +          inputs.impermanence.nixosModules.impermanence
    +          inputs.lanzaboote.nixosModules.lanzaboote
    +          "${self}/hosts/${type}/${host}"
    +        ] ++
    +        (if (host == "toto" || host == "iso") then [ ] else
    +        ([
    +          # put nixos imports here that are for all servers and normal hosts
    +          inputs.nix-topology.nixosModules.default
    +        ] ++
    +        (if (host == "winters" || host == "sync") then [ ] else [
    +          # put nixos imports here that are for all normal hosts
    +          "${self}/profiles/${type}/common"
    +          inputs.stylix.nixosModules.stylix
    +          inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
    +        ]) ++ (if (type == "nixos") then [
    +          inputs.home-manager.nixosModules.home-manager
    +          {
    +            home-manager.users.swarsel.imports = (
    +              if (host == "winters" || host == "sync") then [ ] else [
    +                # put home-manager imports here that are for all normal hosts
    +                "${self}/profiles/home/common"
    +              ]
    +            ) ++ [
    +              # put home-manager imports here that are for all servers and normal hosts
    +              inputs.sops-nix.homeManagerModules.sops
    +              inputs.nix-index-database.hmModules.nix-index
    +            ] ++ (builtins.attrValues outputs.homeModules);
    +          }
    +        ] else [
    +          # put nixos imports here that are for darwin hosts
    +          "${self}/profiles/darwin/nixos/common"
    +          inputs.home-manager.darwinModules.home-manager
    +          {
    +            home-manager.users."leon.schwarzaeugl".imports = [
    +              # put home-manager imports here that are for darwin hosts
    +              "${self}/profiles/darwin/home"
    +            ] ++ (builtins.attrValues outputs.homeModules);
    +          }
    +        ]) ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules)
    +        ));
           };
       };
     
    @@ -5499,11 +5576,12 @@ A breakdown of each function:
           let
             systemFunc = if (type == "home") then inputs.home-manager.lib.homeManagerConfiguration else inputs.nix-on-droid.lib.nixOnDroidConfiguration;
           in
    -      systemFunc {
    -        inherit pkgs;
    -        extraSpecialArgs = { inherit inputs outputs lib self; };
    -        modules = [ "${self}/hosts/${type}/${host}" ];
    -      };
    +      systemFunc
    +        {
    +          inherit pkgs;
    +          extraSpecialArgs = { inherit inputs outputs lib self; };
    +          modules = [ "${self}/hosts/${type}/${host}" ];
    +        };
       };
     
       mkFullHostConfigs = hosts: type: lib.foldl (acc: set: acc // set) { } (lib.map (host: lib.swarselsystems.mkFullHost host type) hosts);
    @@ -5511,6 +5589,7 @@ A breakdown of each function:
       mkHalfHostConfigs = hosts: type: pkgs: lib.foldl (acc: set: acc // set) { } (lib.map (host: lib.swarselsystems.mkHalfHost host type pkgs) hosts);
     
       readHosts = type: lib.attrNames (builtins.readDir "${self}/hosts/${type}");
    +  readNix = type: lib.filter (name: name != "default.nix") (lib.attrNames (builtins.readDir "${self}/${type}"));
     
       mkApps = system: names: self: builtins.listToAttrs (map
         (name: {
    @@ -5533,7 +5612,7 @@ A breakdown of each function:
       mkModules = names: type: builtins.listToAttrs (map
         (name: {
           inherit name;
    -      value = import "${self}/modules/${type}/${name}.nix";
    +      value = import "${self}/modules/${type}/${name}";
         })
         names);
     
    @@ -5547,6 +5626,8 @@ A breakdown of each function:
         })
         names);
     
    +  mkImports = names: baseDir: lib.map (name: "${self}/${baseDir}/${name}") names;
    +
       eachMonitor = _: monitor: {
         inherit (monitor) name;
         value = builtins.removeAttrs monitor [ "workspace" "name" "output" ];
    @@ -5585,53 +5666,17 @@ This section is for setting things that should be used on hosts that are using t
     

    -
    _:
    +
    { lib, ... }:
    +let
    +  importNames = lib.swarselsystems.readNix "profiles/nixos/common";
    +in
     {
    -  imports = [
    -    ./settings.nix
    -    ./home-manager.nix
    -    ./xserver.nix
    -    ./users.nix
    -    ./env.nix
    -    ./stylix.nix
    -    ./polkit.nix
    -    ./gc.nix
    -    ./store.nix
    -    ./systemd.nix
    -    ./network.nix
    -    ./time.nix
    -    ./hardware.nix
    -    ./pipewire.nix
    -    ./sops.nix
    -    ./packages.nix
    -    ./programs.nix
    -    ./zsh.nix
    -    ./syncthing.nix
    -    ./blueman.nix
    -    ./networkdevices.nix
    -    ./gvfs.nix
    -    ./interceptiontools.nix
    -    ./hardwarecompatibility.nix
    -    ./login.nix
    -    ./stylix.nix
    -    ./power-profiles-daemon.nix
    -    # ./impermanence.nix
    -    ./nvd-rebuild.nix
    -    ./nix-ld.nix
    -    ./gnome-keyring.nix
    -    ./sway.nix
    -    ./xdg-portal.nix
    -    # ./yubikey-touch-detector.nix
    -    # ./safeeyes.nix
    -    ./distrobox.nix
    -    ./lid.nix
    -    ./lowbattery.nix
    -    ./lanzaboote.nix
    -  ];
    +  imports = lib.swarselsystems.mkImports importNames "profiles/nixos/common";
     
       nixpkgs.config.permittedInsecurePackages = [
         "jitsi-meet-1.0.8043"
         "electron-29.4.6"
    +    "SDL_ttf-2.0.11"
       ];
     
     }
    @@ -5822,7 +5867,7 @@ Mostly used to install some compilers and lsp's that I want to have available wh
         # cudatoolkit
         # ansible
         # ansible-lint
    -    # ansible-language-server
    +    ansible-language-server
         # molecule
         #lsp-bridge / python
         # gcc
    @@ -6075,12 +6120,6 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
     
         keyboard.qmk.enable = true;
     
    -
    -    pulseaudio = {
    -      enable = lib.mkIf (!config.services.pipewire.enable) true;
    -      package = pkgs.pulseaudioFull;
    -    };
    -
         enableAllFirmware = true;
     
         bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
    @@ -6101,8 +6140,29 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
     
    +
    +
    3.3.1.13. Pulseaudio
    +
    +

    +This is only used on systems not running Pipewire. +

    + + +
    +
    { config, pkgs, lib, ... }: {
    +
    +  services.pulseaudio = {
    +    enable = lib.mkIf (!config.services.pipewire.enable) true;
    +    package = pkgs.pulseaudioFull;
    +  };
    +
    +}
    +
    +
    +
    +
    -
    3.3.1.13. Pipewire
    +
    3.3.1.14. Pipewire

    Pipewire handles communication on Wayland. This enables several sound tools as well as screen sharing in combinaton with xdg-desktop-portal-wlr. @@ -6129,7 +6189,7 @@ Pipewire handles communication on Wayland. This enables several sound tools as w

    -
    3.3.1.14. Common network settings
    +
    3.3.1.15. Common network settings

    Here I only enable networkmanager and a few default networks. The rest of the network config is done separately in System specific configuration. @@ -6386,7 +6446,7 @@ Here I only enable networkmanager and a few default networks. The r

    -
    3.3.1.15. Time, locale settings
    +
    3.3.1.16. Time, locale settings

    Setup timezone and locale. I want to use the US layout, but have the rest adapted to my country and timezone. Also, there is an issue with running Windows/Linux dualboot on the same machine where the hardware clock desyncs between the two OS'es. We fix that bug here as well. @@ -6420,7 +6480,7 @@ Setup timezone and locale. I want to use the US layout, but have the rest adapte

    -
    3.3.1.16. sops
    +
    3.3.1.17. sops

    I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine: @@ -6498,59 +6558,22 @@ in

    -
    3.3.1.17. Theme (stylix)
    +
    3.3.1.18. Theme (stylix)

    By default, stylix wants to style GRUB as well. However, I think that looks horrible. -theme is defined in Theme (stylix). +theme is defined in [BROKEN LINK: h:5bc1b0c9-dc59-4c81-b5b5-e60699deda78].

    -
    { self, pkgs, home-manager, config, ... }:
    +
    { lib, config, ... }:
     {
    -  stylix = {
    -    enable = true;
    -    base16Scheme = "${self}/programs/stylix/swarsel.yaml";
    -    polarity = "dark";
    -    opacity.popups = 0.5;
    -    cursor = {
    -      package = pkgs.capitaine-cursors;
    -      name = "capitaine-cursors";
    -      size = 16;
    -    };
    -    fonts = {
    -      sizes = {
    -        terminal = 10;
    -        applications = 11;
    -      };
    -      serif = {
    -        # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    -        package = pkgs.cantarell-fonts;
    -        # package = pkgs.montserrat;
    -        name = "Cantarell";
    -        # name = "FiraCode Nerd Font Propo";
    -        # name = "Montserrat";
    -      };
    -      sansSerif = {
    -        # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    -        package = pkgs.cantarell-fonts;
    -        # package = pkgs.montserrat;
    -        name = "Cantarell";
    -        # name = "FiraCode Nerd Font Propo";
    -        # name = "Montserrat";
    -      };
    -      monospace = {
    -        package = pkgs.nerd-fonts.fira-mono; # has overrides
    -        name = "FiraCode Nerd Font Mono";
    -      };
    -      emoji = {
    -        package = pkgs.noto-fonts-emoji;
    -        name = "Noto Color Emoji";
    -      };
    -    };
    -    targets.grub.enable = false; # the styling makes grub more ugly
    -    image = config.swarselsystems.wallpaper;
    -  };
    +  stylix = lib.recursiveUpdate
    +    {
    +      targets.grub.enable = false; # the styling makes grub more ugly
    +      image = config.swarselsystems.wallpaper;
    +    }
    +    config.swarselsystems.stylix;
       home-manager.users.swarsel = {
         stylix = {
           targets = {
    @@ -6565,7 +6588,7 @@ By default, stylix wants to style
     
    -
    3.3.1.18. Programs (including zsh setup)
    +
    3.3.1.19. Programs (including zsh setup)

    Some programs profit from being installed through dedicated NixOS settings on system-level; these go here. Notably the zsh setup goes here and cannot be deleted under any circumstances. @@ -6584,7 +6607,7 @@ Some programs profit from being installed through dedicated NixOS settings on sy

    -
    3.3.1.18.1. zsh
    +
    3.3.1.19.1. zsh

    Do not touch this. @@ -6603,10 +6626,10 @@ Do not touch this.

    -
    3.3.1.18.2. syncthing
    +
    3.3.1.19.2. syncthing
    -
    _:
    +
    { lib, ... }:
     {
       services.syncthing = {
         enable = true;
    @@ -6627,7 +6650,7 @@ Do not touch this.
             };
           };
           folders = {
    -        "Default Folder" = {
    +        "Default Folder" = lib.mkDefault {
               path = "/home/swarsel/Sync";
               devices = [ "sync (@oracle)" "magicant" "winters" ];
               id = "default";
    @@ -6662,14 +6685,14 @@ Do not touch this.
     
    -
    3.3.1.19. Services
    +
    3.3.1.20. Services

    Setting up some hardware services as well as keyboard related settings. Here we make sure that we can use the CAPS key as a ESC/CTRL double key, which is a lifesaver.

    -
    3.3.1.19.1. blueman
    +
    3.3.1.20.1. blueman

    Enables the blueman service including the nice system tray icon. @@ -6686,17 +6709,16 @@ Enables the blueman service including the nice system tray icon.

    -
    3.3.1.19.2. Network devices
    +
    3.3.1.20.2. Network devices

    In this section we enable compatibility with several network devices I have at home, mainly printers and scanners.

    -
    -
    -3.3.1.19.2.1. Scanners -
    +

    This allows me to use my big scanner/printer's scanning function over the network. +This also allows me to use my big scanner/printer's printing function over the network. Most of the settings are driver related. +Avahi is the service used for the network discovery.

    @@ -6707,59 +6729,35 @@ This allows me to use my big scanner/printer's scanning function over the networ enable = true; extraBackends = [ pkgs.sane-airscan ]; }; - -
    -
    -
    -
    -3.3.1.19.2.2. Printers -
    -

    -This allows me to use my big scanner/printer's printing function over the network. Most of the settings are driver related. -

    -
    -
    -# enable discovery and usage of network devices (esp. printers)
    -services.printing = {
    -  enable = true;
    -  drivers = [
    -    pkgs.gutenprint
    -    pkgs.gutenprintBin
    -  ];
    -  browsedConf = ''
    -    BrowseDNSSDSubTypes _cups,_print
    -    BrowseLocalProtocols all
    -    BrowseRemoteProtocols all
    -    CreateIPPPrinterQueues All
    -    BrowseProtocols all
    -  '';
    -};
    -
    -
    -
    -
    -
    -3.3.1.19.2.3. Avahi (device discovery) -
    -

    -Avahi is the service used for the network discovery. -

    + # enable discovery and usage of network devices (esp. printers) + services.printing = { + enable = true; + drivers = [ + pkgs.gutenprint + pkgs.gutenprintBin + ]; + browsedConf = '' + BrowseDNSSDSubTypes _cups,_print + BrowseLocalProtocols all + BrowseRemoteProtocols all + CreateIPPPrinterQueues All + BrowseProtocols all + ''; + }; -
    -
    services.avahi = {
    -  enable = true;
    -  nssmdns4 = true;
    -  openFirewall = true;
    -};
    +  services.avahi = {
    +    enable = true;
    +    nssmdns4 = true;
    +    openFirewall = true;
    +  };
     }
     
    -
    -
    3.3.1.19.3. enable GVfs
    +
    3.3.1.20.3. enable GVfs

    This is being set to allow myself to use all functions of nautilus in NixOS @@ -6775,7 +6773,7 @@ This is being set to allow myself to use all functions of nautilus in NixOS

    -
    3.3.1.19.4. interception-tools: Make CAPS work as ESC/CTRL
    +
    3.3.1.20.4. interception-tools: Make CAPS work as ESC/CTRL

    This is a super-convenient package that lets my remap my CAPS key to ESC if pressed shortly, and CTRL if being held. @@ -6816,7 +6814,7 @@ This is a super-convenient package that lets my remap my CAPS key t

    -
    3.3.1.19.5. power-profiles-daemon
    +
    3.3.1.20.5. power-profiles-daemon

    This enables power profile management. The available modes are: @@ -6843,7 +6841,7 @@ Most of the time I am using power-saver, however, it is good to be

    -
    3.3.1.20. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules
    +
    3.3.1.21. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules

    It makes sense to house these settings in their own section, since they are all needed really. Note that the starting of the gpg-agent is done in the sway settings, to also perform this step of the setup for non NixOS-machines at the same time. @@ -6883,7 +6881,7 @@ Also, this is a good place to setup the udev rules.

    -
    3.3.1.21. System Login
    +
    3.3.1.22. System Login

    This section houses the greetd related settings. I do not really want to use a display manager, but it is useful to have setup in some ways - in my case for starting sway on system startup. Notably the default user login setting that is commented out here goes into the system specific settings, make sure to update it there @@ -6916,7 +6914,7 @@ This section houses the greetd related settings. I do not really want to use a d

    -
    3.3.1.22. nix-ld
    +
    3.3.1.23. nix-ld

    This provides libraries for binaries that are not patched for use on NixOS. This really makes the biggest gripe with NixOS go away, that being having to run a binary that is only found in a single spot. It is most of the times possible to patch such a file, but this makes such a situation take much less time to resolve. @@ -7046,7 +7044,7 @@ When a program does not work, start with nix-ldd <program>. T

    -
    3.3.1.23. Impermanence
    +
    3.3.1.24. Impermanence

    This is where the impermanence magic happens. When this is enabled, the root directory is rolled back to a blanket state on each reboot. @@ -7072,7 +7070,7 @@ in # So if it doesn't run, the btrfs system effectively acts like a normal system # Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix - boot.initrd.systemd.enable = true; + boot.initrd.systemd.enable = lib.mkIf config.swarselsystems.isImpermanence true; boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.isImpermanence { description = "Rollback BTRFS root subvolume to a pristine state"; @@ -7152,7 +7150,7 @@ in

    -
    3.3.1.24. Summary of nixos-rebuild diff
    +
    3.3.1.25. Summary of nixos-rebuild diff

    This snipped is added to the activation script that is run after every rebuild and shows what packages have been added and removed. This is actually not the optimal place to add that snipped, but the correct spot is in some perl file that I have not had the leisure to take a look at yet. @@ -7174,7 +7172,7 @@ This snipped is added to the activation script that is run after every rebuild a

    -
    3.3.1.25. gnome-keyring
    +
    3.3.1.26. gnome-keyring

    Used for storing sessions in e.g. Nextcloud. Using this on a system level keeps the login information when logging out of the session as well. @@ -7194,7 +7192,7 @@ Used for storing sessions in e.g. Nextcloud. Using this on a system level keeps

    -
    3.3.1.26. Sway
    +
    3.3.1.27. Sway

    This is used to better integrate Sway into the system on NixOS hosts. On the home-manager side, the package attribute will be null for such an host, using the systems derivation instead. @@ -7229,7 +7227,7 @@ This is used to better integrate Sway into the system on NixOS hosts. On the hom

    -
    3.3.1.27. xdg-portal
    +
    3.3.1.28. xdg-portal

    This allows me to use screen sharing on Wayland. The implementation is a bit crude and only the whole screen can be shared. However, most of the time that is all I need to do anyways. @@ -7259,22 +7257,6 @@ This allows me to use screen sharing on Wayland. The implementation is a bit cru

    -
    -
    3.3.1.28. safeeyes
    -
    -

    -A friend of mine used this service and I used to make fun of him. But I have to admit this is actually a nice program. It forces you to look away from the screen from time to time, reducing eye strain. -

    - -
    -
    _:
    -{
    -  services.safeeyes.enable = true;
    -}
    -
    -
    -
    -
    3.3.1.29. Podmam (distrobox)
    @@ -7357,7 +7339,7 @@ Since I hide the waybar completely during normal operation, I run the risk of no Type = "simple"; ExecStart = pkgs.writeShellScript "battery-low-notification" '' - if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+"))); + if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 )); then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")"; fi; ''; @@ -7422,45 +7404,21 @@ Also, the system state version is set here. No need to touch it.

    -
    { self, ... }:
    +
    { self, lib, ... }:
     let
    +  importNames = lib.swarselsystems.readNix "profiles/nixos/server";
       profilesPath = "${self}/profiles";
     in
     {
    -  imports = [
    -    "${profilesPath}/common/nixos/settings.nix"
    -    "${profilesPath}/common/nixos/home-manager.nix"
    -    "${profilesPath}/common/nixos/xserver.nix"
    -    "${profilesPath}/common/nixos/gc.nix"
    -    "${profilesPath}/common/nixos/store.nix"
    -    "${profilesPath}/common/nixos/time.nix"
    -    "${profilesPath}/common/nixos/users.nix"
    -    "${profilesPath}/common/nixos/nix-ld.nix"
    -    ./settings.nix
    -    ./packages.nix
    -    ./sops.nix
    -    ./ssh.nix
    -    ./nfs.nix
    -    ./nginx.nix
    -    ./kavita.nix
    -    ./jellyfin.nix
    -    ./navidrome.nix
    -    ./spotifyd.nix
    -    ./mpd.nix
    -    ./matrix.nix
    -    ./pipewire.nix
    -    ./nextcloud.nix
    -    ./immich.nix
    -    ./paperless.nix
    -    ./transmission.nix
    -    ./syncthing.nix
    -    ./restic.nix
    -    ./monitoring.nix
    -    ./jenkins.nix
    -    ./emacs.nix
    -    ./forgejo.nix
    -    ./ankisync.nix
    -    ./freshrss.nix
    +  imports = lib.swarselsystems.mkImports importNames "profiles/nixos/server" ++ [
    +    "${profilesPath}/nixos/common/settings.nix"
    +    "${profilesPath}/nixos/common/home-manager.nix"
    +    "${profilesPath}/nixos/common/xserver.nix"
    +    "${profilesPath}/nixos/common/gc.nix"
    +    "${profilesPath}/nixos/common/store.nix"
    +    "${profilesPath}/nixos/common/time.nix"
    +    "${profilesPath}/nixos/common/users.nix"
    +    "${profilesPath}/nixos/common/nix-ld.nix"
       ];
     }
     
    @@ -7495,6 +7453,8 @@ Here we just define some aliases for rebuilding the system, and we allow some in "aspnetcore-runtime-6.0.36" "dotnet-sdk-wrapped-6.0.428" "dotnet-sdk-6.0.428" + # + "SDL_ttf-2.0.11" ]; } @@ -8354,6 +8314,7 @@ in config = { adminuser = "admin"; adminpassFile = config.sops.secrets.nextcloudadminpass.path; + dbtype = "sqlite"; }; }; @@ -8670,7 +8631,7 @@ in }; }; folders = { - "Default Folder" = { + "Default Folder" = lib.mkForce { path = "/Vault/data/syncthing/Sync"; type = "receiveonly"; versioning = null; @@ -9184,14 +9145,8 @@ This section sets up all the imports that are used in the home-manager section.

    -
    { self, ... }:
    -let
    -  profilesPath = "${self}/profiles";
    -in
    +
    _:
     {
    -  imports = [
    -    "${profilesPath}/nixos/home-manager.nix"
    -  ];
     
       nix.settings.experimental-features = "nix-command flakes";
       nixpkgs = {
    @@ -9253,7 +9208,7 @@ This opens a few gaming ports and installs the steam configuration suite for gam
     
           programs.steam = {
             enable = true;
    -        package = pkgs.stable.steam;
    +        package = pkgs.steam;
             extraCompatPackages = [
               pkgs.proton-ge-bin
             ];
    @@ -9418,7 +9373,14 @@ in
         };
       };
     
    -  networking.firewall.trustedInterfaces = [ "virbr0" ];
    +  networking = {
    +    firewall.trustedInterfaces = [ "virbr0" ];
    +    search = [
    +      "vbc.ac.at"
    +      "clip.vbc.ac.at"
    +      "imp.univie.ac.at"
    +    ];
    +  };
     
       virtualisation = {
         docker.enable = true;
    @@ -9455,6 +9417,7 @@ in
         libisoburn
         govc
         terraform
    +    graphviz
     
         # vm
         virt-manager
    @@ -9608,43 +9571,12 @@ This section sets up all the imports that are used in the home-manager section.
     

    -
    _:
    +
    { lib, ... }:
    +let
    +  importNames = lib.swarselsystems.readNix "profiles/home/common";
    +in
     {
    -  imports = [
    -    ./settings.nix
    -    ./packages.nix
    -    ./custom-packages.nix
    -    ./sops.nix
    -    ./ssh.nix
    -    ./stylix.nix
    -    ./desktop.nix
    -    ./symlink.nix
    -    ./env.nix
    -    ./programs.nix
    -    ./nix-index.nix
    -    ./password-store.nix
    -    ./direnv.nix
    -    ./eza.nix
    -    ./git.nix
    -    ./fuzzel.nix
    -    ./starship.nix
    -    ./kitty.nix
    -    ./zsh.nix
    -    ./mail.nix
    -    ./emacs.nix
    -    ./waybar.nix
    -    ./firefox.nix
    -    ./gnome-keyring.nix
    -    ./kdeconnect.nix
    -    ./mako.nix
    -    ./sway.nix
    -    ./gpg-agent.nix
    -    ./gammastep.nix
    -    # ./safeeyes.nix
    -    ./yubikey-touch-detector.nix
    -    ./zellij.nix
    -    ./tmux.nix
    -  ];
    +  imports = lib.swarselsystems.mkImports importNames "profiles/home/common";
     }
     
    @@ -9658,36 +9590,32 @@ Again, we adapt nix to our needs, enable the home-manager command f

    -
    { lib, inputs, config, ... }:
    +
    { lib, config, ... }:
     {
    -  nix =
    -    let
    -      flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
    -    in
    -    lib.mkIf (!config.swarselsystems.isNixos) {
    -      settings = {
    -        experimental-features = [
    -          "nix-command"
    -          "flakes"
    -          "ca-derivations"
    -          "cgroups"
    -          "pipe-operators"
    -        ];
    -        trusted-users = [ "@wheel" "swarsel" ];
    -        connect-timeout = 5;
    -        bash-prompt-prefix = "$SHLVL:\\w ";
    -        bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"\"; else printf \"\"; fi)\[\e[1m\]λ\[\e[0m\] ";
    -        fallback = true;
    -        min-free = 128000000;
    -        max-free = 1000000000;
    -        flake-registry = "";
    -        auto-optimise-store = true;
    -        warn-dirty = false;
    -        max-jobs = 1;
    -        use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
    -      };
    -      registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
    +  nix = lib.mkIf (!config.swarselsystems.isNixos) {
    +    settings = {
    +      experimental-features = [
    +        "nix-command"
    +        "flakes"
    +        "ca-derivations"
    +        "cgroups"
    +        "pipe-operators"
    +      ];
    +      trusted-users = [ "@wheel" "swarsel" ];
    +      connect-timeout = 5;
    +      bash-prompt-prefix = "$SHLVL:\\w ";
    +      bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"\"; else printf \"\"; fi)\[\e[1m\]λ\[\e[0m\] ";
    +      fallback = true;
    +      min-free = 128000000;
    +      max-free = 1000000000;
    +      auto-optimise-store = true;
    +      warn-dirty = false;
    +      max-jobs = 1;
    +      use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
         };
    +  };
    +
    +  nixpkgs.overlays = lib.mkIf config.swarselsystems.isNixos (lib.mkForce null);
     
       programs.home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
     
    @@ -9744,6 +9672,7 @@ This holds packages that I can use as provided, or with small modifications (as
         audacity
         sox
         stable.feishin
    +    calibre
     
         # printing
         cups
    @@ -9754,6 +9683,7 @@ This holds packages that I can use as provided, or with small modifications (as
     
         # browser
         vieb
    +    mgba
     
         # utilities
         util-linux
    @@ -9772,6 +9702,10 @@ This holds packages that I can use as provided, or with small modifications (as
         deadnix
         statix
         nix-tree
    +    nix-diff
    +    nix-visualize
    +    nix-init
    +    nix-inspect
         manix
         comma
     
    @@ -9798,7 +9732,7 @@ This holds packages that I can use as provided, or with small modifications (as
         spotify-player
         element-desktop
         nicotine-plus
    -    stable.transmission
    +    stable.transmission_3
         mktorrent
         hexchat
         hugo
    @@ -9844,7 +9778,7 @@ This holds packages that I can use as provided, or with small modifications (as
         unzip
     
         #nautilus
    -    nautilus
    +    stable.nautilus
         xfce.tumbler
         libgsf
     
    @@ -9861,7 +9795,7 @@ This holds packages that I can use as provided, or with small modifications (as
         # the following packages are used (in some way) by waybar
         playerctl
         pavucontrol
    -    pamixer
    +    stable.pamixer
         # gnome.gnome-clocks
         # wlogout
         # jdiskreport
    @@ -9932,8 +9866,10 @@ This is just a separate container for derivations defined in Theme (stylix).
    +theme is defined in [BROKEN LINK: h:5bc1b0c9-dc59-4c81-b5b5-e60699deda78].
     

    -
    { self, lib, config, pkgs, ... }:
    +
    { lib, config, ... }:
     {
    -  stylix = lib.mkIf (!config.swarselsystems.isNixos) {
    -    enable = true;
    -    base16Scheme = "${self}/programs/stylix/swarsel.yaml";
    -    polarity = "dark";
    -    opacity.popups = 0.5;
    -    cursor = {
    -      package = pkgs.capitaine-cursors;
    -      name = "capitaine-cursors";
    -      size = 16;
    -    };
    -    fonts = {
    -      sizes = {
    -        terminal = 10;
    -        applications = 11;
    +  stylix = lib.mkIf (!config.swarselsystems.isNixos) (lib.recursiveUpdate
    +    {
    +      image = config.swarselsystems.wallpaper;
    +      targets = {
    +        emacs.enable = false;
    +        waybar.enable = false;
           };
    -      serif = {
    -        # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    -        package = pkgs.cantarell-fonts;
    -        # package = pkgs.montserrat;
    -        name = "Cantarell";
    -        # name = "FiraCode Nerd Font Propo";
    -        # name = "Montserrat";
    -      };
    -      sansSerif = {
    -        # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
    -        package = pkgs.cantarell-fonts;
    -        # package = pkgs.montserrat;
    -        name = "Cantarell";
    -        # name = "FiraCode Nerd Font Propo";
    -        # name = "Montserrat";
    -      };
    -      monospace = {
    -        package = pkgs.nerd-fonts.fira-mono; # has overrides
    -        name = "FiraCode Nerd Font Mono";
    -      };
    -      emoji = {
    -        package = pkgs.noto-fonts-emoji;
    -        name = "Noto Color Emoji";
    -      };
    -    };
    -    image = config.swarselsystems.wallpaper;
    -    targets = {
    -      emacs.enable = false;
    -      waybar.enable = false;
    -    };
    -  };
    +    }
    +    config.swarselsystems.stylix);
     }
     
    @@ -10217,11 +10117,16 @@ This section should be used in order to symlink already existing configuration f As for the `home.sessionVariables`, it should be noted that environment variables that are needed at system start should NOT be loaded here, but instead in `programs.zsh.config.extraSessionCommands` (in the home-manager programs section). This is also where all the wayland related variables are stored.

    +

    +Also, we link some files to the users XDG configuration home: +Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.stylesheets` to true. +

    +
    -
    { self, ... }:
    +
    { self, lib, ... }:
     {
       home.file = {
    -    "init.el" = {
    +    "init.el" = lib.mkDefault {
           source = self + /programs/emacs/init.el;
           target = ".emacs.d/init.el";
         };
    @@ -10238,25 +10143,13 @@ As for the `home.sessionVariables`, it should be noted that environment variable
           source = self + /programs/git/.gitmessage;
           target = ".gitmessage";
         };
    -    "swayidle/config" = {
    -      source = self + /programs/swayidle/config;
    -      target = ".config/swayidle/config";
    -    };
       };
     
    -
    -
    - -

    -Also, we link some files to the users XDG configuration home: -Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.stylesheets` to true. -

    - -
    -
    xdg.configFile = {
    -  "tridactyl/tridactylrc".source = self + /programs/firefox/tridactyl/tridactylrc;
    -  "tridactyl/themes/base16-codeschool.css".source = self + /programs/firefox/tridactyl/themes/base16-codeschool.css;
    -};
    +  xdg.configFile = {
    +    "tridactyl/tridactylrc".source = self + /programs/firefox/tridactyl/tridactylrc;
    +    "tridactyl/themes/base16-codeschool.css".source = self + /programs/firefox/tridactyl/themes/base16-codeschool.css;
    +    "swayidle/config".source = self + /programs/swayidle/config;
    +  };
     }
     
    @@ -10274,6 +10167,7 @@ Sets environment variables. Here I am only setting the EDITOR variable, most var { home.sessionVariables = { EDITOR = "e -w"; + DISPLAY = ":0"; SWARSEL_LO_RES = config.swarselsystems.lowResolution; SWARSEL_HI_RES = config.swarselsystems.highResolution; }; @@ -10332,8 +10226,8 @@ nix-index provides a way to find out which packages are provided by which deriva mkdir -p $out/etc/profile.d substitute ${self + /scripts/command-not-found.sh} \ $out/etc/profile.d/command-not-found.sh \ - --replace @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \ - --replace @tput@ ${pkgs.ncurses}/bin/tput + --replace-fail @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \ + --replace-fail @tput@ ${pkgs.ncurses}/bin/tput ''; in @@ -10686,11 +10580,15 @@ Here we set some aliases (some of them should be shellApplications instead) as w cd-orig = "cd"; cat-orig = "cat"; cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\""; + nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd"; nix-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd"; + nix-ldd-locate = "nix-locate --minimal --top-level -w "; + nix-store-search = "ls /nix/store | grep"; fs-diff = "sudo mount -o subvol=/ /dev/mapper/cryptroot /mnt ; fs-diff"; lt = "eza -las modified --total-size"; boot-diff = "nix store diff-closures /run/*-system"; gen-diff = "nix profile diff-closures --profile /nix/var/nix/profiles/system"; + cc = "wl-copy"; } config.swarselsystems.shellAliases; autosuggestion.enable = true; @@ -10769,205 +10667,21 @@ Here we set some aliases (some of them should be shellApplications instead) as w
    3.4.1.20. zellij
    -
    _:
    -# { pkgs, config, ... }:
    -# let
    -# inherit (config.lib.stylix) colors;
    -#   sesh = pkgs.writeScriptBin "sesh" ''
    -#     #! /usr/bin/env sh
    -
    -#     # Taken from https://github.com/zellij-org/zellij/issues/884#issuecomment-1851136980
    -#     # select a directory using zoxide
    -#     ZOXIDE_RESULT=$(zoxide query --interactive)
    -#     # checks whether a directory has been selected
    -#     if [[ -z "$ZOXIDE_RESULT" ]]; then
    -#     	# if there was no directory, select returns without executing
    -#     	exit 0
    -#     fi
    -#     # extracts the directory name from the absolute path
    -#     SESSION_TITLE=$(echo "$ZOXIDE_RESULT" | sed 's#.*/##')
    -
    -#     # get the list of sessions
    -#     SESSION_LIST=$(zellij list-sessions -n | awk '{print $1}')
    -
    -#     # checks if SESSION_TITLE is in the session list
    -#     if echo "$SESSION_LIST" | grep -q "^$SESSION_TITLE$"; then
    -#     	# if so, attach to existing session
    -#     	zellij attach "$SESSION_TITLE"
    -#     else
    -#     	# if not, create a new session
    -#     	echo "Creating new session $SESSION_TITLE and CD $ZOXIDE_RESULT"
    -#     	cd $ZOXIDE_RESULT
    -#     	zellij attach -c "$SESSION_TITLE"
    -#     fi
    -#   '';
    -
    -# in
    +
    { self, config, pkgs, ... }:
     {
    +
       programs.zellij = {
         enable = true;
       };
    -  home.packages = [
    -    # pkgs.tmate
    -    # sesh
    +
    +  home.packages = with pkgs; [
    +    zjstatus
       ];
    -  #   xdg.configFile."zellij/config.kdl".source = ../../../programs/zellij/config.kdl;
    -  #   xdg.configFile."zellij/layouts/default.kdl".text = ''
    -  #     layout {
    -  #         swap_tiled_layout name="vertical" {
    -  #             tab max_panes=5 {
    -  #                 pane split_direction="vertical" {
    -  #                     pane
    -  #                     pane { children; }
    -  #                 }
    -  #             }
    -  #             tab max_panes=8 {
    -  #                 pane split_direction="vertical" {
    -  #                     pane { children; }
    -  #                     pane { pane; pane; pane; pane; }
    -  #                 }
    -  #             }
    -  #             tab max_panes=12 {
    -  #                 pane split_direction="vertical" {
    -  #                     pane { children; }
    -  #                     pane { pane; pane; pane; pane; }
    -  #                     pane { pane; pane; pane; pane; }
    -  #                 }
    -  #             }
    -  #         }
    -
    -  #         swap_tiled_layout name="horizontal" {
    -  #             tab max_panes=5 {
    -  #                 pane
    -  #                 pane
    -  #             }
    -  #             tab max_panes=8 {
    -  #                 pane {
    -  #                     pane split_direction="vertical" { children; }
    -  #                     pane split_direction="vertical" { pane; pane; pane; pane; }
    -  #                 }
    -  #             }
    -  #             tab max_panes=12 {
    -  #                 pane {
    -  #                     pane split_direction="vertical" { children; }
    -  #                     pane split_direction="vertical" { pane; pane; pane; pane; }
    -  #                     pane split_direction="vertical" { pane; pane; pane; pane; }
    -  #                 }
    -  #             }
    -  #         }
    -
    -  #         swap_tiled_layout name="stacked" {
    -  #             tab min_panes=5 {
    -  #                 pane split_direction="vertical" {
    -  #                     pane
    -  #                     pane stacked=true { children; }
    -  #                 }
    -  #             }
    -  #         }
    -
    -  #         swap_floating_layout name="staggered" {
    -  #             floating_panes
    -  #         }
    -
    -  #         swap_floating_layout name="enlarged" {
    -  #             floating_panes max_panes=10 {
    -  #                 pane { x "5%"; y 1; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 2; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 3; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 4; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 5; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 6; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 7; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 8; width "90%"; height "90%"; }
    -  #                 pane { x "5%"; y 9; width "90%"; height "90%"; }
    -  #                 pane focus=true { x 10; y 10; width "90%"; height "90%"; }
    -  #             }
    -  #         }
    -
    -  #         swap_floating_layout name="spread" {
    -  #             floating_panes max_panes=1 {
    -  #                 pane {y "50%"; x "50%"; }
    -  #             }
    -  #             floating_panes max_panes=2 {
    -  #                 pane { x "1%"; y "25%"; width "45%"; }
    -  #                 pane { x "50%"; y "25%"; width "45%"; }
    -  #             }
    -  #             floating_panes max_panes=3 {
    -  #                 pane focus=true { y "55%"; width "45%"; height "45%"; }
    -  #                 pane { x "1%"; y "1%"; width "45%"; }
    -  #                 pane { x "50%"; y "1%"; width "45%"; }
    -  #             }
    -  #             floating_panes max_panes=4 {
    -  #                 pane { x "1%"; y "55%"; width "45%"; height "45%"; }
    -  #                 pane focus=true { x "50%"; y "55%"; width "45%"; height "45%"; }
    -  #                 pane { x "1%"; y "1%"; width "45%"; height "45%"; }
    -  #                 pane { x "50%"; y "1%"; width "45%"; height "45%"; }
    -  #             }
    -  #         }
    -
    -  #         default_tab_template {
    -  #             pane size=2 borderless=true {
    -  #                 plugin location="file://${pkgs.zjstatus}/bin/zjstatus.wasm" {
    -  #                     format_left   "{mode}#[bg=#${colors.base00}] {tabs}"
    -  #                     format_center ""
    -  #                     format_right  "#[bg=#${colors.base00},fg=#${colors.base0D}]#[bg=#${colors.base0D},fg=#${colors.base01},bold] #[bg=#${colors.base02},fg=#${colors.base05},bold] {session} #[bg=#${colors.base03},fg=#${colors.base05},bold]"
    -  #                     format_space  ""
    -  #                     format_hide_on_overlength "true"
    -  #                     format_precedence "crl"
    -
    -  #                     border_enabled  "false"
    -  #                     border_char     "─"
    -  #                     border_format   "#[fg=#6C7086]{char}"
    -  #                     border_position "top"
    -
    -  #                     mode_normal        "#[bg=#${colors.base0B},fg=#${colors.base02},bold] NORMAL#[bg=#${colors.base03},fg=#${colors.base0B}]█"
    -  #                     mode_locked        "#[bg=#${colors.base04},fg=#${colors.base02},bold] LOCKED #[bg=#${colors.base03},fg=#${colors.base04}]█"
    -  #                     mode_resize        "#[bg=#${colors.base08},fg=#${colors.base02},bold] RESIZE#[bg=#${colors.base03},fg=#${colors.base08}]█"
    -  #                     mode_pane          "#[bg=#${colors.base0D},fg=#${colors.base02},bold] PANE#[bg=#${colors.base03},fg=#${colors.base0D}]█"
    -  #                     mode_tab           "#[bg=#${colors.base07},fg=#${colors.base02},bold] TAB#[bg=#${colors.base03},fg=#${colors.base07}]█"
    -  #                     mode_scroll        "#[bg=#${colors.base0A},fg=#${colors.base02},bold] SCROLL#[bg=#${colors.base03},fg=#${colors.base0A}]█"
    -  #                     mode_enter_search  "#[bg=#${colors.base0D},fg=#${colors.base02},bold] ENT-SEARCH#[bg=#${colors.base03},fg=#${colors.base0D}]█"
    -  #                     mode_search        "#[bg=#${colors.base0D},fg=#${colors.base02},bold] SEARCHARCH#[bg=#${colors.base03},fg=#${colors.base0D}]█"
    -  #                     mode_rename_tab    "#[bg=#${colors.base07},fg=#${colors.base02},bold] RENAME-TAB#[bg=#${colors.base03},fg=#${colors.base07}]█"
    -  #                     mode_rename_pane   "#[bg=#${colors.base0D},fg=#${colors.base02},bold] RENAME-PANE#[bg=#${colors.base03},fg=#${colors.base0D}]█"
    -  #                     mode_session       "#[bg=#${colors.base0E},fg=#${colors.base02},bold] SESSION#[bg=#${colors.base03},fg=#${colors.base0E}]█"
    -  #                     mode_move          "#[bg=#${colors.base0F},fg=#${colors.base02},bold] MOVE#[bg=#${colors.base03},fg=#${colors.base0F}]█"
    -  #                     mode_prompt        "#[bg=#${colors.base0D},fg=#${colors.base02},bold] PROMPT#[bg=#${colors.base03},fg=#${colors.base0D}]█"
    -  #                     mode_tmux          "#[bg=#${colors.base09},fg=#${colors.base02},bold] TMUX#[bg=#${colors.base03},fg=#${colors.base09}]█"
    -
    -  #                     // formatting for inactive tabs
    -  #                     tab_normal              "#[bg=#${colors.base03},fg=#${colors.base0D}]█#[bg=#${colors.base0D},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{floating_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -  #                     tab_normal_fullscreen   "#[bg=#${colors.base03},fg=#${colors.base0D}]█#[bg=#${colors.base0D},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{fullscreen_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -  #                     tab_normal_sync         "#[bg=#${colors.base03},fg=#${colors.base0D}]█#[bg=#${colors.base0D},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{sync_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -
    -  #                     // formatting for the current active tab
    -  #                     tab_active              "#[bg=#${colors.base03},fg=#${colors.base09}]█#[bg=#${colors.base09},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{floating_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -  #                     tab_active_fullscreen   "#[bg=#${colors.base03},fg=#${colors.base09}]█#[bg=#${colors.base09},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{fullscreen_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -  #                     tab_active_sync         "#[bg=#${colors.base03},fg=#${colors.base09}]█#[bg=#${colors.base09},fg=#${colors.base02},bold]{index} #[bg=#${colors.base02},fg=#${colors.base05},bold] {name}{sync_indicator}#[bg=#${colors.base03},fg=#${colors.base02},bold]█"
    -
    -  #                     // separator between the tabs
    -  #                     tab_separator           "#[bg=#${colors.base00}] "
    -
    -  #                     // indicators
    -  #                     tab_sync_indicator       " "
    -  #                     tab_fullscreen_indicator " 󰊓"
    -  #                     tab_floating_indicator   " 󰹙"
    -
    -  #                     command_git_branch_command     "git rev-parse --abbrev-ref HEAD"
    -  #                     command_git_branch_format      "#[fg=blue] {stdout} "
    -  #                     command_git_branch_interval    "10"
    -  #                     command_git_branch_rendermode  "static"
    -
    -  #                     datetime        "#[fg=#6C7086,bold] {format} "
    -  #                     datetime_format "%A, %d %b %Y %H:%M"
    -  #                     datetime_timezone "Europe/London"
    -  #                 }
    -  #             }
    -  #             children
    -  #         }
    -  #     }
    -  #   '';
     
    +  xdg.configFile = {
    +    "zellij/config.kdl".text = import "${self}/programs/zellij/config.kdl.nix" { inherit config; };
    +    "zellij/layouts/default.kdl".text = import "${self}/programs/zellij/layouts/default.kdl.nix" { inherit config pkgs; };
    +  };
     
     }
     
    @@ -11254,7 +10968,7 @@ Lastly, I am defining some more packages here that the parser has problems findi extraEmacsPackages = epkgs: [ epkgs.mu4e epkgs.use-package - # epkgs.lsp-bridge + epkgs.lsp-bridge epkgs.doom-themes epkgs.vterm epkgs.treesit-grammars.with-all-grammars @@ -11768,52 +11482,61 @@ in id = 0; isDefault = true; userChrome = builtins.readFile (self + /programs/firefox/chrome/userChrome.css); - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - tridactyl - tampermonkey - sidebery - browserpass - clearurls - darkreader - enhancer-for-youtube - istilldontcareaboutcookies - translate-web-pages - ublock-origin - reddit-enhancement-suite - sponsorblock - web-archives - single-file - widegithub - enhanced-github - unpaywall - don-t-fuck-with-paste - plasma-integration - (buildFirefoxXpiAddon { - pname = "shortkeys"; - version = "4.0.2"; - addonId = "Shortkeys@Shortkeys.com"; - url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi"; - sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c"; - meta = with lib; - { - description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys"; - mozPermissions = [ - "tabs" - "downloads" - "clipboardWrite" - "browsingData" - "storage" - "bookmarks" - "sessions" - "<all_urls>" - ]; - platforms = platforms.all; - }; - }) - ]; + extensions = { + packages = with pkgs.nur.repos.rycee.firefox-addons; [ + tridactyl + tampermonkey + sidebery + browserpass + clearurls + darkreader + enhancer-for-youtube + istilldontcareaboutcookies + translate-web-pages + ublock-origin + reddit-enhancement-suite + sponsorblock + web-archives + single-file + widegithub + enhanced-github + unpaywall + don-t-fuck-with-paste + plasma-integration + + # configure the default the same as trusted in order not to be annoyed + noscript + + # configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut + (buildFirefoxXpiAddon { + pname = "shortkeys"; + version = "4.0.2"; + addonId = "Shortkeys@Shortkeys.com"; + url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi"; + sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c"; + meta = with lib; + { + description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys"; + mozPermissions = [ + "tabs" + "downloads" + "clipboardWrite" + "browsingData" + "storage" + "bookmarks" + "sessions" + "<all_urls>" + ]; + platforms = platforms.all; + }; + }) + + ]; + }; settings = { "extensions.autoDisableScopes" = 0; + "browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com"; "browser.bookmarks.showMobileBookmarks" = lock-true; "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; "browser.search.suggest.enabled" = lock-false; @@ -12064,7 +11787,7 @@ in wrapperFeatures.gtk = true; config = rec { modifier = "Mod4"; - terminal = "kitty"; + # terminal = "kitty"; menu = "fuzzel"; bars = [{ command = "waybar"; @@ -12148,9 +11871,10 @@ in "${modifier}+Shift+Down" = "move down 40px"; "${modifier}+Shift+Up" = "move up 40px"; "${modifier}+Ctrl+Shift+c" = "reload"; + "${modifier}+Ctrl+Shift+r" = "exec swarsel-displaypower"; "${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "${modifier}+r" = "mode resize"; - "${modifier}+Return" = "exec kitty"; + "${modifier}+Return" = "exec swarselzellij"; "${modifier}+Print" = "exec screenshare"; # "XF86AudioRaiseVolume" = "exec pa 5%"; "XF86AudioRaiseVolume" = "exec pamixer -i 5"; @@ -12179,9 +11903,14 @@ in input = config.swarselsystems.standardinputs; workspaceOutputAssign = workplaceOutputs; startup = config.swarselsystems.startup ++ [ - { command = "kitty -T kittyterm"; } + { command = "kitty -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm"; } { command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player"; } ]; + seat = { + "*" = { + hide_cursor = "when-typing enable"; + }; + }; window = { border = 1; titlebar = false; @@ -12310,29 +12039,30 @@ in swayfxSettings = config.swarselsystems.swayfxConfig; in " - exec_always autotiling - set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\" + exec_always autotiling + set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\" - mode $exit { - bindsym --to-code { - s exec \"systemctl suspend\", mode \"default\" - l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize && systemctl suspend \", mode \"default \" - p exec \"systemctl poweroff\" - r exec \"systemctl reboot\" - u exec \"swaymsg exit\" + mode $exit { + bindsym --to-code { + s exec \"systemctl suspend\", mode \"default\" + l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\" + p exec \"systemctl poweroff\" + r exec \"systemctl reboot\" + u exec \"swaymsg exit\" - Return mode \"default\" - Escape mode \"default\" - ${modifier}+Escape mode \"default\" - } - } + Return mode \"default\" + Escape mode \"default\" + ${modifier}+Escape mode \"default\" + } + } - exec systemctl --user import-environment - exec swayidle -w + exec systemctl --user import-environment + exec swayidle -w + seat * hide_cursor 2000 - ${swayfxSettings} - "; + ${swayfxSettings} + "; }; }
    @@ -12419,14 +12149,14 @@ This section sets up all the imports that are used in the home-manager section.

    -
    { self, ... }:
    +
    { self, lib, ... }:
     let
    +  importNames = lib.swarselsystems.readNix "profiles/home/server";
       profilesPath = "${self}/profiles";
     in
     {
    -  imports = [
    -    "${profilesPath}/common/home/settings.nix"
    -    ./symlink.nix
    +  imports = lib.swarselsystems.mkImports importNames "profiles/home/server" ++ [
    +    "${profilesPath}/home/common/settings.nix"
       ];
     }
     
    @@ -12434,7 +12164,7 @@ in
    -
    3.4.2.2. Linking dotfiles
    +
    3.4.2.2. Symlinking dotfiles

    This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`. @@ -12445,10 +12175,10 @@ As for the `home.sessionVariables`, it should be noted that environment variable

    -
    { self, ... }:
    +
    { self, lib, ... }:
     {
       home.file = {
    -    "init.el" = {
    +    "init.el" = lib.mkForce {
           source = self + /programs/emacs/server.el;
           target = ".emacs.d/init.el";
         };
    @@ -12477,7 +12207,7 @@ let
     in
     {
       imports = [
    -    "${profilesPath}/common/home/settings.nix"
    +    "${profilesPath}/home/common/settings.nix"
       ];
     }
     
    @@ -12505,14 +12235,14 @@ The rest of the settings is at
    -
    -
    4.2.1.14. Nix common prefix bracketer
    -
    -

    -This function searches for common delimiters in region and removes them, summarizing all captured lines by it. -

    - -
    -
    -(defun swarsel/prefix-block (start end)
    -  (interactive "r")
    -  (save-excursion
    -    (goto-char start)
    -    (setq start (line-beginning-position))
    -    (goto-char end)
    -    (setq end (line-end-position))
    -    (let ((common-prefix (save-excursion
    -                           (goto-char start)
    -                           (if (re-search-forward "^\\([^.\n]+\\)\\." end t)
    -                               (match-string 1)
    -                             (error "No common prefix found")))))
    -      (save-excursion
    -        (goto-char start)
    -        (insert common-prefix " = {\n")
    -        (goto-char (+ end (length common-prefix) 6))
    -        (insert "};\n")
    -        (goto-char start)
    -        (while (re-search-forward (concat "^" (regexp-quote common-prefix) "\\.") end t)
    -          (replace-match ""))))))
    -
    -
    -
    -
    -
    -
    -
    4.2.1.15. Nix formatters
    -
    -

    -This formats the org code block at point in accordance to the nixpkgs-fmt formatter -

    - -
    -
    -(defun swarsel/org-nixpkgs-fmt-block-lite ()
    -  (interactive)
    -  (org-babel-mark-block)
    -  (call-interactively 'nixpkgs-fmt-region))
    -
    -
    -(defun swarsel/org-nixpkgs-fmt-block ()
    -  (interactive)
    -  (save-excursion
    -    (let* ((element (org-element-at-point))
    -           (begin (org-element-property :begin element))
    -           (end (org-element-property :end element))
    -           (lang (org-element-property :language element)))
    -      (when lang
    -        (goto-char begin)
    -        (forward-line)
    -        (insert "{")
    -        (goto-char end)
    -        (forward-line -1)
    -        (beginning-of-line)
    -        (forward-char -1)
    -        (insert "}")
    -        (org-babel-mark-block)
    -        (call-interactively 'nixpkgs-fmt-region)))))
    -
    -
    -
    -
    -
    4.2.1.16. Disable garbace collection while minibuffer is active
    +
    4.2.1.14. Disable garbace collection while minibuffer is active
    @@ -13517,7 +13209,6 @@ I also define some keybinds to some combinations directly. Those are used mostly
      "C-c C-<" 'mc/mark-all-like-this
      )
     
    -
     
    @@ -13662,6 +13353,7 @@ Here I set up some things that are too minor to put under other categories. password-cache-expiry nil ) (setq browse-url-browser-function 'browse-url-firefox) +(setenv "DISPLAY" ":0") ;; disable a keybind that does more harm than good (global-set-key [remap suspend-frame] (lambda () @@ -13702,6 +13394,10 @@ Normally when switching themes in emacs, the user will be warned that themes can When Emacs compiles stuff, it often shows a bunch of warnings that I do not need to deal with. Here we silence those. Some will be disabled completely, and some only when we have native compilation available (which should be most of the time, however).

    +

    +This is really not needed anymore ever since I started managing my emacs packages with nix, but I still keep this around in case I ever move away from it. +

    +
     (setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local))
    @@ -13718,7 +13414,7 @@ When Emacs compiles stuff, it often shows a bunch of warnings that I do not need
     

    4.3.4. Better garbage collection

    -This sets up automatic garbage collection when the frame is unused. +This sets up automatic garbage collection when the frame is unused. There is a lot of discussion on whether it is smart to tamper with garbage collection - in my eyes it is worth running this, because I often times switch away from Emacs for a while when researching. That times can be then used to run GC.

    @@ -13960,9 +13656,17 @@ This minor-mode adds functionality for doing better surround-commands; for examp
    -
    -
    4.3.7.7. evil-textobj-tree-sitter
    +
    +
    4.3.7.7. evil-textobj-tree-sitter
    +

    +This adds support for tree-sitter objects. This allows for the following chords: +

    +
      +
    • "…af" around function
    • +
    • "…if" inside function
    • +
    +
     (use-package evil-textobj-tree-sitter)
    @@ -13972,7 +13676,19 @@ This minor-mode adds functionality for doing better surround-commands; for examp
     (define-key evil-inner-text-objects-map "f" (evil-textobj-tree-sitter-get-textobj "function.inner"))
     
     ;; You can also bind multiple items and we will match the first one we can find
    -(define-key evil-outer-text-objects-map "a" (evil-textobj-tree-sitter-get-textobj ("conditional.outer" "loop.outer")))
    +(define-key evil-outer-text-objects-map "a" (evil-textobj-tree-sitter-get-textobj ("if_statement.outer" "conditional.outer" "loop.outer") '((python-mode . ((if_statement.outer) @if_statement.outer)) (python-ts-mode . ((if_statement.outer) @if_statement.outer)))))
    +
    +
    +
    +
    +
    +
    +
    4.3.7.8. evil-textobj-tree-sitter
    +
    +
    +
    +(use-package evil-numbers)
    +
     
    @@ -14961,12 +14677,23 @@ This adds support for Groovy, which I specifically need to work with Jenkinsfile (use-package jenkinsfile-mode :mode "Jenkinsfile") +
    +
    +
    +
    +
    +

    4.4.5. Ansible

    +
    +
    +
    +(use-package ansible)
    +
     
    -

    4.4.5. Dockerfile

    +

    4.4.6. Dockerfile

    This adds support for Dockerfiles. I need this at work. @@ -14982,7 +14709,7 @@ This adds support for Dockerfiles. I need this at work.

    -

    4.4.6. Terraform Mode

    +

    4.4.7. Terraform Mode

    This adds support for Terraform configuration files. I need this at work. @@ -15003,7 +14730,7 @@ This adds support for Terraform configuration files. I need this at work.

    -

    4.4.7. nixpkgs-fmt

    +

    4.4.8. nixpkgs-fmt

    Adds functions for formatting nix code. @@ -15018,7 +14745,7 @@ Adds functions for formatting nix code.

    -

    4.4.8. shfmt

    +

    4.4.9. shfmt

    Adds functions for formatting shellscripts. @@ -15036,11 +14763,11 @@ Adds functions for formatting shellscripts.

    -

    4.4.9. Markdown Mode

    +

    4.4.10. Markdown Mode

    -
    4.4.9.1. Mode
    +
    4.4.10.1. Mode
    @@ -15058,7 +14785,7 @@ Adds functions for formatting shellscripts.
     
    -
    4.4.9.2. LaTeX in Markdown
    +
    4.4.10.2. LaTeX in Markdown
    @@ -15074,7 +14801,7 @@ Adds functions for formatting shellscripts.
     
    -

    4.4.10. elfeed

    +

    4.4.11. elfeed

    @@ -15111,7 +14838,7 @@ Adds functions for formatting shellscripts.
     
    -

    4.4.11. Ripgrep

    +

    4.4.12. Ripgrep

    This is the ripgrep command for Emacs. @@ -15126,7 +14853,7 @@ This is the ripgrep command for Emacs.

    -

    4.4.12. Tree-sitter

    +

    4.4.13. Tree-sitter

    Tree-sitter is a parsing library integrated into Emacs to provide better syntax highlighting and code analysis. It generates concrete syntax trees for source code, enabling more accurate and efficient text processing. Emacs' tree-sitter integration enhances language support, offering features like incremental parsing and precise syntax-aware editing. This improves the development experience by providing robust and dynamic syntax features, making it easier for me to navigate and manipulate code. @@ -15187,7 +14914,7 @@ In order to update the language grammars, run the next command below.

    -

    4.4.13. direnv (envrc)

    +

    4.4.14. direnv (envrc)

    In emacs, there are two packages for managing dev environments - emacs-direnv (direnv) and envrc. Direnv uses the global Emacs environment whereas envrc is buffer-local. I do not really care about this difference. What is more important to me is that emacs should not block upon handling a bigger flake.nix while setting up the dev environment. This seems to be better handled by envrc. @@ -15207,7 +14934,7 @@ In emacs, there are two packages for managing dev environments - emacs-direnv (d

    -

    4.4.14. avy

    +

    4.4.15. avy

    avy provides the ability to search for any character on the screen (not only in the current buffer!) - I enjoy this utility a lot and use it possibly even more often than the native vim commands. @@ -15226,7 +14953,7 @@ In emacs, there are two packages for managing dev environments - emacs-direnv (d

    -

    4.4.15. devdocs

    +

    4.4.16. devdocs

    devdocs is a very nice package that provides documentation from https:devdocs.io. This is very useful since e.g. pyright provides only a very bad documentation and I do not want to leave Emacs all the time just to read documentation. @@ -15262,7 +14989,7 @@ To install a documentation, use the devdocs=install command and sel

    -

    4.4.16. Projectile

    +

    4.4.17. Projectile

    projectile is useful for keeping track of your git projects within Emacs. I mostly use it to quickly switch between projects. @@ -15288,7 +15015,7 @@ projectile is useful for keeping track of your git projects within Emacs. I most

    -

    4.4.17. Magit

    +

    4.4.18. Magit

    magit is the best git utility I have ever used - it has a beautiful interface and is very verbose. Here I mostly just setup the list of repositories that I want to expost to magit. @@ -15312,7 +15039,7 @@ Also, Emacs needs a little extra love to accept my Yubikey for git commits etc.

    -

    4.4.18. Yubikey support

    +

    4.4.19. Yubikey support

    The following settings are needed to make sure emacs works for magit commits and pushes. It is not a beautiful solution since commiting uses pinentry-emacs and pushing uses pinentry-gtk2, but it works for now at least. @@ -15332,7 +15059,7 @@ The following settings are needed to make sure emacs works for magit commits and

    -

    4.4.19. Forge

    +

    4.4.20. Forge

    NOTE: Make sure to configure a GitHub token before using this package! @@ -15362,7 +15089,7 @@ create classic token with repo; user; read:org permissions

    -

    4.4.20. git-timemachine

    +

    4.4.21. git-timemachine

    This is just a nice utility to browse different versions of a file of a git project within Emacs. @@ -15379,7 +15106,7 @@ This is just a nice utility to browse different versions of a file of a git proj

    -

    4.4.21. Delimiters (brackets): rainbow-delimiters, highlight-parentheses

    +

    4.4.22. Delimiters (brackets): rainbow-delimiters, highlight-parentheses

    • rainbow-delimiters colors all delimiters, also ones not in current selection
    • @@ -15422,7 +15149,7 @@ I am not completely sure on electric-pair-mode yet, sometimes it is very helpful
    -

    4.4.22. rainbow-mode

    +

    4.4.23. rainbow-mode

    Complimentary to the delimiters-packages above, this package sets the background color of the delimiters, which makes it easier to see at a glance where we are in a delimiter-tree. @@ -15438,7 +15165,7 @@ Complimentary to the delimiters-packages above, this package sets the background

    -

    4.4.23. Corfu

    +

    4.4.24. Corfu

    -

    4.4.25. rust

    +

    4.4.26. rust

    This sets up rustic-mode with tree-sitter support - there is still one issue to iron out with automatic adding of dependency crates, but everything else works fine now. @@ -15566,7 +15293,7 @@ This sets up rustic-mode with tree-sitter support - there is still one issue to

    -

    4.4.26. Tramp

    +

    4.4.27. Tramp

    Tramp allows for SSH access of files over Emacs. I have no ideas what the options here mean, but this is a recommended configuration that I found (sadly I lost the link). I need to research more what these options really do. @@ -15606,7 +15333,7 @@ Tramp allows for SSH access of files over Emacs. I have no ideas what the option

    -

    4.4.27. diff-hl

    +

    4.4.28. diff-hl

    This is a simple highlighting utility that uses the margin to visually show the differences since the last git commit. @@ -15628,7 +15355,7 @@ This is a simple highlighting utility that uses the margin to visually show the

    -

    4.4.28. Commenting

    +

    4.4.29. Commenting

    This package allows for swift commenting out and in of code snippets. For some reason, it is a bit broken in my config, as it sometimes comments out too much, sometimes too little, and sometimes it splits lines during commenting. Also, in org-mode when inside a src-block, it often times jumps to the top of the block. @@ -15648,19 +15375,42 @@ Still, this is avery convenient package.

    -

    4.4.29. eglot

    +

    4.4.30. eglot

    -After having tried out lsp-mode and lsp-bridge for a while each, I must say that eglot feels the most clean and fast to me. +Up comes the section of lsp clients for Emacs. For a longer time, I thought that I had to choose one only, and after having started with lsp-mode I had tried out lsp-booster and then went to eglot. My requirements are as follow: +

    + +

    +Must have: +

    +
      +
    • mostly unintrusive, non-blocking
    • +
    • fast (configurable) completion
    • +
    • xref (or similar)
    • +
    + +

    +Nice to have: +

    +
      +
    • Debugger
    • +
    • Multi-lsp support (running two lsp's on a single project)
    • +
    • Native Emacs support
    • +
    + +

    +eglot fills most items on the first list except for the non-blocking issue initially. It blocks sometimes on bigger projects as well as when entering directories using (nix-)direnv and the lsp is not yet loaded. The first issue is solved by using eglot-booster, which increases the parsing speed by what feels like a huge margin (but I never ran any actual tests). The second issue is solved with eglot-sync-connect, which avoids blocking the interface while the server is starting. +

    + +

    +A blocking issue can still occur while entering a direnv that has a longer evaluation/build time. That issue can only be fixed by using Mic92's emacs-direnv fork, which calls direnv asynchronously, which in turn avoids the blocking. I am not using this on a daily basis however, since my environments are normally cached anyways and most of them (except for the LaTeX one) are not blocking for long enough for this to be worth it. However, I am considering spinning up my own fork of this at some point.

     (use-package eglot
    -  :config
    -  (add-to-list 'eglot-server-programs
    -               '(yaml-ts-mode . ("ansible-language-server" "--stdio")))
       :hook
       ((python-mode
         python-ts-mode
    @@ -15674,7 +15424,6 @@ After having tried out lsp-mode and lsp-bridge for a w
         rustic-mode
         tex-mode
         LaTeX-mode
    -    yaml-ts-mode
         ) . (lambda () (progn
                          (eglot-ensure)
                          (add-hook 'before-save-hook 'eglot-format nil 'local))))
    @@ -15700,12 +15449,52 @@ After having tried out lsp-mode and lsp-bridge for a w
     
     (defalias 'start-lsp-server #'eglot)
     
    +
    +
    +
    +
    +
    +

    4.4.31. lsp-mode & company

    +
    +
    +
    +(use-package lsp-bridge
    +  :ensure nil)
    +
    +(use-package lsp-mode
    +  :init
    +  ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
    +  (setq lsp-keymap-prefix "C-c l")
    +  :commands lsp)
    +
    +(use-package company)
    +
    +
    +
    +
    +
    +
    +

    4.4.32. lsp-bridge

    +
    +
    +
    +(use-package lsp-bridge
    +  :ensure nil)
    +
    +(use-package lsp-mode
    +  :init
    +  ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
    +  (setq lsp-keymap-prefix "C-c l")
    +  :commands lsp)
    +
    +(use-package company)
    +
     
    -

    4.4.30. sideline-flymake

    +

    4.4.33. sideline-flymake

    This brings back warnings and errors on the sideline for eglot; a feature that I have been missing from lsp-mode for a while. @@ -15725,7 +15514,7 @@ This brings back warnings and errors on the sideline for eglot; a feature that I

    -

    4.4.31. Prevent breaking of hardlinks

    +

    4.4.34. Prevent breaking of hardlinks

    This setting ensures that hard links are preserved during the backup process, which is useful for maintaining the integrity of files that are linked in multiple locations. @@ -15740,7 +15529,7 @@ This setting ensures that hard links are preserved during the backup process, wh

    -

    4.4.32. Dirvish

    +

    4.4.35. Dirvish

    Dirvish is an improvement upon the dired-framework and has more features like file preview etc. Sadly it has an incompatibility with openwith which is why I have disabled that package. @@ -15804,7 +15593,7 @@ Dirvish is an improvement upon the dired-framework and has more features like fi

    -

    4.4.33. undo-tree

    +

    4.4.36. undo-tree

    Base emacs undo logic is very useful, but not easy to understand for me. I prefer undo-tree, which makes switching between branches easier and also allows quickly switching back to a much older state using the visualizer. @@ -15839,7 +15628,7 @@ While we are at it, we are also setting up a persistent undo-file for every file

    -

    4.4.34. Hydra

    +

    4.4.37. Hydra

    Hydra allows for the writing of macro-style functions. I have not yet looked into this all too much, but it seems to be a potent feature. @@ -15853,7 +15642,7 @@ Hydra allows for the writing of macro-style functions. I have not yet looked int

    -
    4.4.34.1. Text scaling
    +
    4.4.37.1. Text scaling

    I only wrote this in order to try out hydra; rarely do I really need this. However, it can be useful for Presentations. It simply scales the text size. @@ -15875,11 +15664,11 @@ I only wrote this in order to try out hydra; rarely do I really need this. Howev

    -

    4.4.35. Email

    +

    4.4.38. Email

    -
    4.4.35.1. mu4e
    +
    4.4.38.1. mu4e

    In this section we are setting up mu4e, a mail client for emacs using mu with mbsync as backend. The mail accounts themselves are setup in the NixOS configuration, so we only need to add Emacs specific settings here. @@ -15941,7 +15730,7 @@ The hook functions are defined here: -

    4.4.35.2. mu4e-alert
    +
    4.4.38.2. mu4e-alert

    This adds the simple utility of sending desktop notifications whenever a new mail is received. I am using libnotify because I want to use this with notify-send. @@ -15962,7 +15751,7 @@ This adds the simple utility of sending desktop notifications whenever a new mai

    -

    4.4.36. Calendar

    +

    4.4.39. Calendar

    This provides a beautiful calender to emacs. @@ -16030,7 +15819,7 @@ Yes, I am aware that I am exposing my university-calendar to the public here. I

    -

    4.4.37. Dashboard: emacs startup screen

    +

    4.4.40. Dashboard: emacs startup screen

    This sets up the dashboard, which is really quite useless. But, it looks cool and makes me happy whenever I start an emacsclient without a file name as argument :) @@ -16103,7 +15892,7 @@ This sets up the dashboard, which is really quite useless. But, it

    -

    4.4.38. vterm

    +

    4.4.41. vterm

    @@ -16115,7 +15904,7 @@ This sets up the dashboard, which is really quite useless. But, it
     
    -

    4.4.39. multiple cursors

    +

    4.4.42. multiple cursors

    @@ -16126,7 +15915,7 @@ This sets up the dashboard, which is really quite useless. But, it
     
    -

    4.4.40. Less logging

    +

    4.4.43. Less logging

    @@ -16155,10 +15944,7 @@ Originally, I used this method a lot throughout my configuration. However, as my
     

    This serves only to reduce code duplication in this file. The tangled files experience no size reduction, since noweb-ref only substitutes these blocks in.

    -
    -
    -

    5.1. Theme (stylix)

    -
    +

    For styling, I am using the stylix NixOS module, loaded by flake. This package is really great, as it adds nix expressions for basically everything. Ever since switching to this, I did not have to play around with theming anywhere else.

    @@ -16168,7 +15954,7 @@ The full list of nerd-fonts can be found here: firefox). The difference here is, however, that this block is used in a NixOS and a home-manager-only configuration, verbatim. If I were to use an attribute set, I would have to duplicate this block once each for NixOS and home-manager. Alas, this block stays (for now). +This is where the theme for the whole OS is defined. Originally, this noweb-ref section could not be copied to the general NixOS config since they are on different folder structure levels in the config, which would have made the flake impure. By now, I have found out that using the ${self} method for referencing the flake root, I could circumvent this problem. Also, the noweb-ref block could in general be replaced by a custom attribute set (see for example firefox). The difference here was, for a long time, that this block is used in a NixOS and a home-manager-only configuration, verbatim. If I were to use an attribute set, I would have to duplicate this block once each for NixOS and home-manager. Alas, this block stays (for now). However, I learned how to use an attribute set in a custom home-manager module and pass it to both NixOS and home-manager configurations, which also removed the need for that use of it.

    @@ -16178,8 +15964,10 @@ base16Scheme = "${self}/programs/stylix/swarsel.yaml"; polarity = "dark"; opacity.popups = 0.5; cursor = { - package = pkgs.capitaine-cursors; - name = "capitaine-cursors"; + package = pkgs.banana-cursor; + # package = pkgs.capitaine-cursors; + name = "Banana"; + # name = "capitaine-cursors"; size = 16; }; fonts = { @@ -16216,7 +16004,6 @@ fonts = {
    -

    6. Appendix B: Supplementary Files

    @@ -16325,6 +16112,9 @@ On my server, I use a reduced, self-contained emacs configuration that only serv This is the configuration file for tridactyl, which provides keyboard-driven navigation in firefox. Pay attention to the warnings in this file; depending on your browsing behaviour, you might expose yourself to some vulnerabilities by copying this configuration.

    +

    +The command command can be supplied with a -p flag that will take a single argmuent which is exposed as JS_ARG. I use this in a function that switches to an open tab if it exists and otherwise creates it. +

    @@ -16358,6 +16148,32 @@ bindurl ^http(s)?://news\.ycombinator\.com c hint -Jc [class="titleline"],[class
     bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label"]
     bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line
     
    +" Work
    +command tab_or_tabopen jsb -p (async () => { let tabs = await browser.tabs.query({}); let tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})()
    +
    +bind gwa tab_or_tabopen apic-impimba-1.m.imp.ac.at
    +bind gwA tab_or_tabopen artifactory.imp.ac.at
    +bind gwb tab_or_tabopen bitbucket.vbc.ac.at
    +bind gwc tab_or_tabopen vbc.atlassian.net/wiki
    +bind gwd tab_or_tabopen datadomain-impimba-2.imp.ac.at
    +bind gwe tab_or_tabopen exivity.vbc.ac.at
    +bind gwg tab_or_tabopen github.com
    +bind gwG tab_or_tabopen goc.egi.eu
    +bind gwh tab_or_tabopen jupyterhub.vbc.ac.at
    +bind gwH tab_or_tabopen test-jupyterhub.vbc.ac.at
    +bind gwj tab_or_tabopen jenkins.vbc.ac.at
    +bind gwJ tab_or_tabopen test-jenkins.vbc.ac.at
    +bind gwl tab_or_tabopen lucid.app
    +bind gwm tab_or_tabopen monitoring.vbc.ac.at/grafana
    +bind gwM tab_or_tabopen monitoring.vbc.ac.at/prometheus
    +bind gwn tab_or_tabopen netbox.vbc.ac.at
    +bind gwN tab_or_tabopen nap.imp.ac.at
    +bind gwo tab_or_tabopen outlook.office.com
    +bind gws tab_or_tabopen satellite.vbc.ac.at
    +bind gwt tab_or_tabopen tower.vbc.ac.at
    +bind gwv tab_or_tabopen vc-impimba-1.m.imp.ac.at/ui
    +bind gwx tab_or_tabopen xclarity.vbc.ac.at
    +
     " Search in page
     set findcase smart
     bind / fillcmdline find
    @@ -16721,32 +16537,32 @@ This file defines a few workflows that I often need to run when working on my co
     
     default:
    -@just --list
    +  @just --list
     
     check:
    -nix flake check --keep-going
    +  nix flake check --keep-going
     
     check-trace:
    -nix flake check --show-trace
    +  nix flake check --show-trace
     
     update:
    -nix flake update
    +  nix flake update
     
     iso:
    -rm -rf result
    -nix build .#nixosConfigurations.iso.config.system.build.isoImage && ln -sf result/iso/*.iso latest.iso
    +  rm -rf result
    +  nix build .#nixosConfigurations.iso.config.system.build.isoImage && ln -sf result/iso/*.iso latest.iso
     
     iso-flake FLAKE SYSTEM="x86_64" FORMAT="iso":
    -nixos-generate --flake .#{{FLAKE}} -f {{FORMAT}} --system {{SYSTEM}}
    +  nixos-generate --flake .#{{FLAKE}} -f {{FORMAT}} --system {{SYSTEM}}
     
     iso-install DRIVE: iso
    -sudo dd if=$(eza --sort changed result/iso/*.iso | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
    +  sudo dd if=$(eza --sort changed result/iso/*.iso | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
     
     dd DRIVE ISO:
    -sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
    +  sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
     
     sync USER HOST:
    -rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
    +  rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
     
     
    @@ -16779,7 +16595,7 @@ ignore = ['.direnv']

    Author: Leon Schwarzäugl

    -

    Created: 2024-12-31 Di 21:56

    +

    Created: 2025-02-26 Mi 01:02

    Validate