diff options
Diffstat (limited to '')
46 files changed, 846 insertions, 522 deletions
diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix index 6cf8a396..caabdf40 100644 --- a/modules/by-name/at/atuin/module.nix +++ b/modules/by-name/at/atuin/module.nix @@ -10,7 +10,8 @@ { config, lib, - pkgs, + externalBinaries, + system, ... }: let cfg = config.soispha.programs.atuin; @@ -22,11 +23,19 @@ in { }; config = lib.mkIf cfg.enable { - age.secrets.atuin_encryption_key = lib.mkIf cfg.enableAge { - file = ./secrets/encryption_key.age; - mode = "700"; - owner = "soispha"; - group = "users"; + age.secrets = { + atuin_encryption_key = lib.mkIf cfg.enableAge { + file = ./secrets/encryption_key.age; + mode = "700"; + owner = "soispha"; + group = "users"; + }; + atuin_user_id = lib.mkIf cfg.enableAge { + file = ./secrets/user_id.age; + mode = "700"; + owner = "soispha"; + group = "users"; + }; }; soispha.programs.zsh.integrations.atuin = ./atuin.zsh; @@ -35,24 +44,21 @@ in { programs.atuin = { enable = true; + package = externalBinaries.turtle.packages.${system}.default; + daemon.enable = true; # We can do this on our own. enableZshIntegration = false; settings = { - key_path = lib.mkMerge [ - (lib.mkIf cfg.enableAge "${config.age.secrets.atuin_encryption_key.path}") - (lib.mkIf (!cfg.enableAge) - "${config.home-manager.users.soispha.xdg.dataHome}/atuin/atuin_secret_key.key") - ]; - sync = lib.mkIf cfg.enableAge { - # The v2 sync API - records = true; + encryption_key_path = "${config.age.secrets.atuin_encryption_key.path}"; + user_id_path = "${config.age.secrets.atuin_user_id.path}"; + + auto = true; + address = "https://atuin-sync.vhack.eu"; }; - auto_sync = lib.mkIf cfg.enableAge true; - sync_address = lib.mkIf cfg.enableAge "https://atuin-sync.vhack.eu"; logs = { enabled = true; @@ -79,9 +85,6 @@ in { vim_normal = "blink-block"; }; - # Who wants software, that automatically calls home?! - update_check = false; - stats = { # This overrides the default value. ignored_commands = []; @@ -93,10 +96,6 @@ in { "n" = "select-previous"; "s" = "cursor-right"; }; - - # I currently don't want a sync deamon or a dotfiles manager running. - dotfiles.enable = false; - ai.enabled = false; }; }; }; diff --git a/modules/by-name/at/atuin/secrets/encryption_key.age b/modules/by-name/at/atuin/secrets/encryption_key.age index 4c2bb7b4..a69db402 100644 --- a/modules/by-name/at/atuin/secrets/encryption_key.age +++ b/modules/by-name/at/atuin/secrets/encryption_key.age @@ -1,15 +1,16 @@ -----BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqT1Y2RU9hQmkxWEoveitY -dDEzQU85QkVXOCsxS3JFb0xKMngrT08xMGswCkJzcm9GanVUbytKcmI1U1lzWVM0 -eGV5OUcwU2M4UGlzZ3ZpQUJtYUJxcTQKLT4gc3NoLWVkMjU1MTkgelpFb25nIElC -OExoMzVpV0U3czZ2aUp3a0ZDcUlTQnFhallxOTdhTE1YdnFrWVdPRzQKQmN6L1Z4 -S0ZWeWNSREFhMExMa0FOdWhnUTI5bXptVnU5SDFQZkk1R00vdwotPiBzc2gtZWQy -NTUxOSA3SGZGVXcgbm1LZ1VwRDdjRFh0SCtTT1I2ZDFsSmhsZzVBcHMxSXhWQlNM -cFVpU2kwRQpEUStYQVJiWSt1THA5ZEJlL2NnQ2NwZTlWWEVtYkpjb09RckxkaWdP -djFvCi0+ICktZ3JlYXNlIGsgZnRHZHhEIDxVLQo4SkZtRm8vTEJnYVRnZXAwK3Yv -eUQ0TGdYRVpOTmozSE52MlFqeG1HalVWb1JmZ2k5ZVJFNVpBUGdyMnlVZwotLS0g -UjI2WVhtU0lITzVMSU1Nc2RKcnJXZVUreWxnZXoxZnBRL0xpUmd3dDhtNArERqzQ -//hB8CunQlwCCYnISj6FaQphnWz8E3sIyi3FqH2ww9MQ4RzbVqLOOKgg4wVWRC8Y -RmFWPl1SfJoA8DIPoTEgqQZseB+PT7CYHo4LEwrpkcQ5cndOI2JbO+HzZdk9H+tM -GbsggKI= +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB1NkNRQUdYekxZaEF3WTdC +ZDBndHBMZUVPM2dObDcvazBjaXlQT3QrUmtVCkc1TUhMd1h1YWxtaXNncGZSODg0 +QWtUTDhybFltaDBVWTE3VVBoeUtubzQKLT4gc3NoLWVkMjU1MTkgelpFb25nIHEy +VGRMeUZDSUlGRmE0NzlnWSsvY3VHVmRxR1NpNGRmS1ZRWG9TcFdaQmsKcjhKb1VG +V2tNZkdXTXhSb25ETUplYlZWaHU0Y0grYUtjSVVHVzhmMzV5TQotPiBzc2gtZWQy +NTUxOSA3SGZGVXcgTTBhcUJISVVRVU1hNk5VZkNTNUZHUzY1TSs4a2ZNYytIdVVG +TG5mRjhBawpRVG50Wkl2S2NKdUxTeVhiOTJ0RG00NCswQ01jV1lYbVpYNC90N3V1 +WXZRCi0+IDEoIS1ncmVhc2UgSUZzazpsRCBCbi0gWQpxMUJtNk13ZHptVjladTAz +U2IxRjIyK0wvY3k1T3JiQ1ZFNlMvU0t3TWNyN09SVVlWc2FIQU9lZDZ0azIwT29z +CjRFREVXdGozNVhKWlE5L3NxTGdDZFVvL2NDYlpRTWtrd1J0cFZwcm9OVW1Vb1pz +SnptUWdvZ3E4VThHOXZRCi0tLSBUeW0zYnNVZkRYWDJoTTV0V2QveWpIY0p0UmxP +UXlSNHNPbllBYitjTWpVCgUpBZTJYd2sFY9GvDwJMKt0WVrDZVE2PF5jAww8Ml/w +rEycAm/dmIiMV5mfKOdU0aHNMl6RM/7PLHSa4G+wIRRrKQkoNcu8cqOziBRWgSOn +JKxVFCdwlEgAo+J+qtRHkwitjOJ0ce6OOg== -----END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/at/atuin/secrets/user_id.age b/modules/by-name/at/atuin/secrets/user_id.age new file mode 100644 index 00000000..6ac3bcd6 --- /dev/null +++ b/modules/by-name/at/atuin/secrets/user_id.age @@ -0,0 +1,14 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0T3hFUm1NZU1RU2IxNWsx +ZFh2ckVsTnNBZVVqMm9HaGFOTmtKMlh3M2xzClJ1N0RsbFJYYWhnYktpYnFaYWNY +c2VGRzZoMW1GOENsV3FoTEJ1OWVDQ00KLT4gc3NoLWVkMjU1MTkgelpFb25nIDlY +MnRoMFB4dTUyS0pIenVjelRxRERXZ2ptVURZWGttZWR5R25NMWYzekUKaVRDKzJj +cCtRY0F6VVFGUlIyeGhLSThXMVFvNEl2Y0tMdHpSOEI4cjVtTQotPiBzc2gtZWQy +NTUxOSA3SGZGVXcgbjNpdGZZa1NxbEw3YkV4UmxTb0dtSlFPM1htK1QzWXBaRGdv +ZUdTYkoxSQpMcHZCMnNPR0QySkovQ0I1THVPK3Z5RlFCbGJ5Zk5teDBKbUFvY1p4 +T3lzCi0+IGtrVXxkQlItZ3JlYXNlIDBRO3cKWnk5M2MyTUExRDBYd25RdkxRQWla +bnpTU1J0T1NMbVZldGpCbVZOTFZuV29ZRll0UDJwdHo0YWoKLS0tIFI5RG9WSDZu +am9RYnFONE9wZ3pVaG1tVnBLNTZqK3d4NFhhT1F1bWlORzAKz44Fafb+Ck5aMxJF +5/pNNcYE3IRUqjKTWjmSO+fBFVPnlfIIc6gKFhO4Nm05QIxqzSW08PbBhVYFH65u +ivRjFHUg+Gp3 +-----END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/au/ausweisapp/module.nix b/modules/by-name/au/ausweisapp/module.nix new file mode 100644 index 00000000..3a89db9d --- /dev/null +++ b/modules/by-name/au/ausweisapp/module.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + libraries, + ... +}: let + cfg = config.soispha.programs.ausweisapp; +in { + options.soispha.programs.ausweisapp = { + enable = libraries.base.options.mkEnable "AusweisApp"; + }; + + config = lib.mkIf cfg.enable { + soispha.impermanence.userDirectories = [ + ".config/AusweisApp" + ]; + }; +} diff --git a/modules/by-name/ba/backup/env.vars b/modules/by-name/ba/backup/env.vars new file mode 100644 index 00000000..339c5a5b --- /dev/null +++ b/modules/by-name/ba/backup/env.vars @@ -0,0 +1 @@ +RESTIC_COMPRESSION=max diff --git a/modules/by-name/ba/backup/module.nix b/modules/by-name/ba/backup/module.nix index 7a788764..031445cf 100644 --- a/modules/by-name/ba/backup/module.nix +++ b/modules/by-name/ba/backup/module.nix @@ -63,12 +63,23 @@ in { soispha.impermanence.directories = lib.mkMerge [ (lib.mkIf cfg.storagebox.enable [ "/var/cache/restic-backups-storagebox" + + # Generate the base systemd.mount from impermanence (we will override this, so it + # points to the non-admin one instead) + "/var/cache/restic-backups-storagebox-admin" ]) (lib.mkIf cfg.local.enable [ "/var/cache/restic-backups-local" ]) ]; + # TODO: Make this work (`systemd.mounts` is a list, so _this_ doesn't work.) <2026-07-07> + # systemd.mounts."/var/cache/restic-backups-storagebox-admin" = { + # # TODO: Don't hardcode the path, but use + # # `systemd.mounts."/var/cache/restic-backups-storagebox".what` instead <2026-07-07> + # what = "/srv/var/cache/restic-backups-storagebox"; + # }; + age.secrets = { resticStorageboxSshKey = lib.mkIf cfg.storagebox.enable { file = cfg.storagebox.sshKey; @@ -97,6 +108,8 @@ in { }; }; + programs.fuse.enable = cfg.storagebox.enable || cfg.local.enable; + systemd.services = { prepare-backup = { requires = []; @@ -154,16 +167,21 @@ in { ]; exclude = [ "${homeDir}/soispha/.cache" + "${homeDir}/soispha/.local/share/lutris/install" + "${homeDir}/soispha/.local/share/Steam/steamapps/common" ]; extraBackupArgs = [ + # Don't scan the filesystem to determine an estimate. + "--no-scan" "--verbose=2" ]; + environmentFile = "${./env.vars}"; in { local = lib.mkIf cfg.local.enable { inhibitsSleep = true; initialize = true; - inherit paths exclude extraBackupArgs; + inherit paths exclude extraBackupArgs environmentFile; passwordFile = config.age.secrets.resticLocalRepositoryPassword.path; @@ -177,7 +195,7 @@ in { inhibitsSleep = true; initialize = true; - inherit paths exclude extraBackupArgs; + inherit paths exclude extraBackupArgs environmentFile; passwordFile = config.age.secrets.resticStorageboxRepositoryPassword.path; extraOptions = [ @@ -186,7 +204,7 @@ in { # This setting is normally passed to rclone, but we force # the command on the remote. - # As such, the value does not matter and must only be parseable by restic. + # As such, the value does not matter and must only be parse-able by restic. repository = "rclone: "; timerConfig = { @@ -199,9 +217,13 @@ in { # This is only for listing, pruning and such stuff. storagebox-admin = lib.mkIf cfg.storagebox.enable { - inhibitsSleep = false; + inhibitsSleep = true; + + # Don't create the repository if it doesn't exist yet. initialize = false; + inherit paths exclude extraBackupArgs environmentFile; + passwordFile = config.age.secrets.resticStorageboxRepositoryPassword.path; extraOptions = [ "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de command_forced_on_remote'" @@ -209,7 +231,7 @@ in { # This setting is normally passed to rclone, but we force # the command on the remote. - # As such, the value does not matter and must only be parseable by restic. + # As such, the value does not matter and must only be parse-able by restic. repository = "rclone: "; timerConfig = null; diff --git a/modules/by-name/bo/boot/iso_entry/archlive_iso.nix b/modules/by-name/bo/boot/iso_entry/archlive_iso.nix deleted file mode 100644 index d0ae8457..00000000 --- a/modules/by-name/bo/boot/iso_entry/archlive_iso.nix +++ /dev/null @@ -1,86 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{pkgs ? (builtins.getFlake "nixpkgs").legacyPackages."x86_64-linux"}: let - signing_key = import ./signing_key.nix {inherit pkgs;}; - - checked_iso = pkgs.stdenv.mkDerivation { - pname = "archlinux-iso"; - version = "2024.05.01"; - - srcs = [ - (pkgs.fetchurl { - url = "https://archlinux.org/iso/2024.05.01/archlinux-2024.05.01-x86_64.iso.sig"; - hash = "sha256-QOGYng6a7zA5EJKGotDccJ7fD2MmPPXQEdVr1kjJvi4="; - }) - (pkgs.fetchurl { - url = "https://mirror.informatik.tu-freiberg.de/arch/iso/latest/archlinux-2024.05.01-x86_64.iso"; - hash = "sha256-G0oE74pzUIUqEwcO5JhEKwh6YHoYhAtN19mYZ+tfakw="; - }) - (pkgs.fetchurl { - url = "https://archlinux.org/iso/2024.05.01/b2sums.txt"; - hash = "sha256-HSMS13hHXFKKQsCA8spa7XtirHCBTmePwhOsStVPbHw="; - }) - ]; - - dontUnpack = true; - - nativeBuildInputs = with pkgs; [ - sequoia-sq - ]; - - buildPhase = - /* - bash - */ - '' - cp -r "${signing_key}" ./release-key.pgp - for src in $srcs; do - cp -r "$src" "$(stripHash "$src")" - done - - sed '2d;3d;4d' b2sums.txt > b2sums_clean.txt - - # As per the directions from: https://archlinux.org/download/ - - # blake hash check - b2sum -c ./b2sums_clean.txt - - # pgp signature check - sq verify --signer-file release-key.pgp --detached archlinux-2024.05.01-x86_64.iso.sig archlinux-2024.05.01-x86_64.iso - ''; - - installPhase = '' - cp archlinux-2024.05.01-x86_64.iso "$out"; - ''; - }; -in - pkgs.stdenv.mkDerivation { - name = "live_iso_boot_entry"; - - src = checked_iso; - - dontUnpack = true; - - nativeBuildInputs = with pkgs; [ - libarchive # for bsdtar - ]; - - buildPhase = '' - mkdir iso - bsdtar -xf "$src" -C iso - ''; - - installPhase = '' - install -D ./iso/arch/boot/x86_64/initramfs-linux.img "$out/live/initramfs-linux.img" - install -D ./iso/arch/boot/x86_64/vmlinuz-linux "$out/live/vmlinuz-linux" - - install -D "$src" "$out/archlinux.iso" - ''; - } diff --git a/modules/by-name/bo/boot/iso_entry/signing_key.nix b/modules/by-name/bo/boot/iso_entry/signing_key.nix deleted file mode 100644 index d9268d75..00000000 --- a/modules/by-name/bo/boot/iso_entry/signing_key.nix +++ /dev/null @@ -1,27 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{pkgs ? (builtins.getFlake "nixpkgs").legacyPackages."x86_64-linux"}: -pkgs.stdenv.mkDerivation { - name = "archlinux_signing_keys"; - - outputHash = "sha256-evGWzkxMaZw3rlixKsyWCS/ZvNuZ+OfXQb6sgiHz9XY="; - outputHashAlgo = "sha256"; - NIX_SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - - nativeBuildInputs = with pkgs; [ - sequoia-sq - ]; - - dontUnpack = true; - - buildPhase = '' - sq --verbose --no-cert-store --no-key-store network wkd fetch pierre@archlinux.org --output "$out" - ''; -} diff --git a/modules/by-name/bo/boot/module.nix b/modules/by-name/bo/boot/module.nix index 4b95aedf..8c8b2af1 100644 --- a/modules/by-name/bo/boot/module.nix +++ b/modules/by-name/bo/boot/module.nix @@ -12,139 +12,214 @@ lib, pkgs, modules, + modulesPath, + system, + specialArgs, ... }: let cfg = config.soispha.boot; + + tails = let + tailsPrefix = "/EFI/tails"; + in { + root = "${tailsPrefix}/tails.iso"; + initrd = "${tailsPrefix}/initrd.img"; + vmlinuz = "${tailsPrefix}/vmlinuz-linux"; + }; + + iso = pkgs.tails-iso; + + # From: + # - The extracted ISO's boot dir + # - Reverse engineered from: + # - `<tails iso squashfs>/usr/share/initramfs-tools/init` + # - `<tails iso squashfs>/usr/lib/live/boot/` + iso_options = + ## General options? + [ + "initrd=${tails.initrd}" + # "noprompt" + # "timezone=Etc/UTC" + # "config" + # "noautologin" + # "slab_nomerge" + # "slub_debug=FZ" + # "mce=0" + # "vsyscall=none" + # "init_on_free=1" + # "mds=full,nosmt" + # "page_alloc.shuffle=1" + # "randomize_kstack_offset=on" + # "efi_pstore.pstore_disable=1" + # "erst_disable" + # "spec_store_bypass_disable=on" + # "systemd.condition_needs_update=no" + ] + ## Systemd log options + ++ [ + # "systemd.log_level=debug" + # "systemd.log_target=console" + # "console=tty1" + # "systemd.journald.forward_to_console=1" + # "systemd.unit=rescue.target" + ] + ## Options for the first `init` script + ++ [ + # Use the `*-live` scripts + "boot=live" + + # "splash" + "plymouth.enable=0" + + # "quiet" + # "debug" + ] + ## Options for the `*-live` `init` scripts + ++ [ + "module=Tails" + + # TODO: RO-makes the fromiso not work <2026-06-08> + # "live-boot.read-only=/dev/nvme0*" + + # Don't store things persistently + "nopersistence" + + "fromiso=/dev/nvme0n1p1/${tails.root}" + ]; in { options.soispha.boot = { enable = lib.mkEnableOption "Bootloader configuration"; - # TODO: Add this option <2024-05-16> - # enableIsoEntry = lib.mkEnableOption "an tails iso boot entry"; + enableIsoEntry = lib.mkEnableOption "an tails iso boot entry"; }; imports = [ modules.lanzaboote.nixosModules.lanzaboote ]; - config = lib.mkIf cfg.enable ( - # let - # cfg = config.boot.loader.systemd-boot; - # inherit (config.boot.loader) efi; - # - # esa = n: lib.strings.escapeShellArg n; - # - # bootMountPoint = - # if cfg.xbootldrMountPoint != null - # then cfg.xbootldrMountPoint - # else efi.efiSysMountPoint; - # - # nixosDir = "/EFI/nixos"; - # - # # FIXME: This system has two big problems: - # # 1. It does not updated files, which still have the same name - # # 2. It forgets about files, which were 'deleted' in this configuration (these just - # # stay on disk forever) <2024-05-11> - # copyExtraFiles = '' - # echo "[systemd-boot] copying files to ${bootMountPoint}" - # empty_file=$(mktemp boot_empty_file_XXX) - # - # ${lib.concatStrings (lib.mapAttrsToList (n: v: - # /* - # bash - # */ - # '' - # if ! [ -e ${esa "${bootMountPoint}/${n}"} ]; then - # install -Dp "${v}" ${esa "${bootMountPoint}/${n}"} - # install -D "$empty_file" ${esa "${bootMountPoint}/${nixosDir}/.extra-files/${n}"} - # fi - # '') - # cfg.extraFiles)} - # - # ${lib.concatStrings (lib.mapAttrsToList (n: v: - # /* - # bash - # */ - # '' - # # if ! [ -e ${esa "${bootMountPoint}/loader/entries/${n}"} ]; then - # install -Dp "${pkgs.writeText n v}" ${esa "${bootMountPoint}/loader/entries/${n}"} - # install -D "$empty_file" ${esa "${bootMountPoint}/${nixosDir}/.extra-files/loader/entries/${n}"} - # # fi - # '') - # cfg.extraEntries)} - # ''; - # in - { - # FIXME: Reactviate this whole iso thing when a disko redeploy is done. - # (and switch to tails instead of arch) <2024-05-12> - # - # system.activationScripts = { - # copyExtraFilesForBoot = copyExtraFiles; - # }; + config = lib.mkIf cfg.enable { + # This should only be necessary for `lanzaboote`, but that is the current default in + # this module. + soispha.impermanence.directories = [ + "/var/lib/sbctl" + ]; + + boot = { + initrd = { + kernelModules = ["nvme" "btrfs"]; + }; + + kernelPackages = pkgs.linuxPackages_latest; - # This should only be necessary for `lanzaboote`, but that is the current default in - # this module. - soispha.impermanence.directories = [ - "/var/lib/sbctl" - ]; + lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; - boot = { - initrd = { - kernelModules = ["nvme" "btrfs"]; + settings = { + # Disable editing the kernel command line (which could allow someone to become root) + editor = false; + default = "@saved"; }; + }; - kernelPackages = pkgs.linuxPackages_latest; + loader = { + external = lib.mkIf cfg.enableIsoEntry { + installHook = lib.mkForce (let + lanzabooteCfg = config.boot.lanzaboote; - lanzaboote = { - enable = true; - pkiBundle = "/var/lib/sbctl"; + lanzabooteInstallHook = import "${modulesPath}/../lib/eval-config.nix" { + inherit system specialArgs; + modules = [ + modules.lanzaboote.nixosModules.lanzaboote - settings = { - # Disable editing the kernel command line (which could allow someone to become root) - editor = false; - default = "@saved"; - }; + { + # Copy the relevant config into the eval-module context. + boot = { + inherit (config.boot) kernelPackages; + + lanzaboote = { + inherit (lanzabooteCfg) enable pkiBundle; + settings = { + inherit (lanzabooteCfg.settings) editor default; + }; + }; + + loader = { + inherit (config.boot.loader) timeout efi systemd-boot; + }; + }; + systemd.package = config.systemd.package; + } + ]; + }; + + install = pkgs.writeShellScript "wrapped-install-tails-iso-marker" '' + echo "[Wrapped bootloader install] Copying tails iso..." + ${copyExtraFiles} + + echo "[Wrapped bootloader install] Running original lanzaboote install..." + ${lanzabooteInstallHook.config.boot.loader.external.installHook} + ''; + + copyExtraFiles = let + systemdCfg = config.boot.loader.systemd-boot; + nixosDir = "EFI/nixos"; + + bootMountPoint = config.boot.loader.efi.efiSysMountPoint; + install = lib.getExe' pkgs.coreutils "install"; + + inherit (lib) mapAttrsToList; + inherit (lib.strings) escapeShellArg concatStrings; + in + pkgs.writeShellScript "copy-extra-files" '' + ${concatStrings ( + mapAttrsToList (n: v: '' + ${install} -Dp "${v}" "${bootMountPoint}/"${escapeShellArg n} + ${install} -D /dev/null "${bootMountPoint}/${nixosDir}/.extra-files/"${escapeShellArg n} + '') + systemdCfg.extraFiles + )} + + ${lib.getExe pkgs.sbctl} sign "${bootMountPoint}/${tails.vmlinuz}" + + ${concatStrings ( + mapAttrsToList (n: v: '' + ${install} -Dp "${pkgs.writeText n v}" "${bootMountPoint}/loader/entries/"${escapeShellArg n} + ${install} -D /dev/null "${bootMountPoint}/${nixosDir}/.extra-files/loader/entries/"${escapeShellArg n} + '') + systemdCfg.extraEntries + )} + ''; + in + install); }; - loader = { - systemd-boot = { - # Lanzaboote currently replaces the systemd-boot module. - # This setting is usually set to true in configuration.nix - # generated at installation time. So we force it to false - # for now. - enable = false; + systemd-boot = lib.mkIf cfg.enableIsoEntry { + # Lanzaboote currently replaces the systemd-boot module. + enable = false; - # extraEntries = { - # "live.conf" = '' - # title Archlinux Live ISO - # linux /live/vmlinuz-linux - # initrd /live/initramfs-linux.img - # options img_dev=${config.soispha.disks.disk} img_loop=/archlinux.iso copytoram - # ''; - # }; - # - # extraFiles = let - # iso = import ./archlive_iso.nix {inherit pkgs;}; - # in { - # "archlinux.iso" = "${iso}/archlinux.iso"; - # "live/initramfs-linux.img" = "${iso}/live/initramfs-linux.img"; - # "live/vmlinuz-linux" = "${iso}/live/vmlinuz-linux"; - # }; + extraEntries = { + "live.conf" = '' + title Tails ${iso.passthru.version} Live ISO + linux ${tails.vmlinuz} + initrd ${tails.initrd} + options ${builtins.concatStringsSep " " iso_options} + ''; }; - grub = { - enable = false; - # theme = pkgs.nixos-grub2-theme; - splashImage = ./boot_pictures/gnu.png; - efiSupport = true; - device = "nodev"; # only for efi + extraFiles = { + # TODO: Check that the ISO we use for booting is _actually_ still the one we + # copied there (someone might exchange it in between) <2026-06-09> + "${tails.root}" = "${iso}/tails.iso"; + "${tails.vmlinuz}" = "${iso}/live/vmlinuz-linux"; + "${tails.initrd}" = "${iso}/live/initrd.img"; }; + }; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; }; }; - } - ); + }; + }; } diff --git a/modules/by-name/ca/cargo/module.nix b/modules/by-name/ca/cargo/module.nix index d36a11e5..6a0675d3 100644 --- a/modules/by-name/ca/cargo/module.nix +++ b/modules/by-name/ca/cargo/module.nix @@ -27,8 +27,7 @@ in { cargoHome = "${config.home-manager.users.soispha.xdg.dataHome}/cargo"; settings = { - # {cargo-cache-home} means $CARGO_HOME - build.build-dir = "{cargo-cache-home}/shared-target/"; + build.build-dir = "${config.home-manager.users.soispha.xdg.cacheHome}/cargo/shared-target/"; }; }; }; diff --git a/modules/by-name/di/disks/module.nix b/modules/by-name/di/disks/module.nix index 3e9d4614..ed5c939a 100644 --- a/modules/by-name/di/disks/module.nix +++ b/modules/by-name/di/disks/module.nix @@ -14,10 +14,9 @@ modules, ... }: let - # FIXME: The iso redeploy requires a bigger efi partition <2024-05-12> cfg = config.soispha.disks; defaultMountOptions = [ - "compress=zstd:3" # This saves disk space, at a performance cost + "compress-force=zstd:15" # This saves disk space, at a performance cost "noatime" # should have some performance upsides, and I don't use it anyways "lazytime" # make time changes in memory ]; @@ -34,15 +33,10 @@ in { ssd = lib.mkEnableOption "ssd specific improvements, like trim"; swap = { - uuid = lib.mkOption { + ram_size = lib.mkOption { type = lib.types.str; - example = lib.literalExpression "d1d20ae7-3d8a-44da-86da-677dbbb10c89"; - description = "The uuid of the swapfile"; - }; - resumeOffset = lib.mkOption { - type = lib.types.str; - example = lib.literalExpression "134324224"; - description = "The resume offset of the swapfile"; + example = lib.literalExpression "16G"; + description = "The size of the ram (translates to the swapfile size)"; }; }; }; @@ -54,6 +48,12 @@ in { config = lib.mkIf cfg.enable { systemd = lib.recursiveUpdate (import ./hibernate.nix {inherit pkgs;}) (import ./fstrim.nix {inherit pkgs lib cfg;}); + services.btrfs.autoScrub = { + enable = true; + fileSystems = ["/srv" "/nix"]; + interval = "monthly"; + }; + disko.devices = { disk = { main = { @@ -61,21 +61,44 @@ in { content = { type = "gpt"; partitions = { + ESP = { + # 2GiB plus 512MiB for tails ISO and normal boot stuff + size = "2600M"; + + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; + + nix = { + size = "30G"; + content = { + type = "luks"; + name = "nixos-store"; + extraOpenArgs = ["--allow-discards"]; + content = { + type = "btrfs"; + extraArgs = ["-f" "--label nixos-store"]; # Override existing partitions + mountpoint = "/nix"; + mountOptions = defaultMountOptions; + }; + }; + }; + root = { size = "100%"; - name = "root"; content = { type = "luks"; - name = "nixos"; + name = "nixos-root"; extraOpenArgs = ["--allow-discards"]; content = { type = "btrfs"; - extraArgs = ["-f" "--label nixos"]; # Override existing partitions + extraArgs = ["-f" "--label nixos-root"]; # Override existing partitions subvolumes = { - "nix" = { - mountpoint = "/nix"; - mountOptions = defaultMountOptions; - }; "persistent-storage" = { mountpoint = "/srv"; mountOptions = defaultMountOptions; @@ -90,21 +113,17 @@ in { "noatime" # should have some performance upsides, and I don't use it anyways "lazytime" # make time changes in memory ]; + swap = { + swapfile = { + priority = -1; # lower than zramSwap, just in case + size = cfg.swap.ram_size; + }; + }; }; }; }; }; }; - boot = { - type = "EF00"; - size = "512M"; - name = "boot"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; }; }; }; @@ -130,6 +149,9 @@ in { }; }; fileSystems = { + "/nix" = { + neededForBoot = true; + }; "/srv" = { neededForBoot = true; }; @@ -137,23 +159,14 @@ in { neededForBoot = true; }; }; - swapDevices = [ - #{ - # device = "/swap/swapfile"; - # priority = 1; # lower than zramSwap, just in case - # # size = 2048; # TODO: can nixos create a btrfs swapfile correctly? - #} - ]; zramSwap = { enable = true; priority = 10; # needs to be higher than hardware-swap }; boot = { kernelParams = [ - "resume_offset=${cfg.swap.resumeOffset}" "zswap.enabled=0" # zswap and zram are not really compatible ]; - resumeDevice = "/dev/disk/by-uuid/${cfg.swap.uuid}"; }; }; } diff --git a/modules/by-name/fo/foot/module.nix b/modules/by-name/fo/foot/module.nix index d818aac0..74273b49 100644 --- a/modules/by-name/fo/foot/module.nix +++ b/modules/by-name/fo/foot/module.nix @@ -11,6 +11,7 @@ config, lib, libraries, + pkgs, ... }: let cfg = config.soispha.foot; @@ -20,25 +21,36 @@ in { }; config = lib.mkIf cfg.enable { + # TODO: Maybe we can use the xdg-autostart mechanism for this? <2026-06-23> + soispha.programs.river.init.autoStart = [ + ["${lib.getExe' pkgs.foot "footclient"}"] + ]; + home-manager.users.soispha = { + systemd.user.services.foot = { + # Don't restart the foot server (otherwise all my open foot terminals would exit + # too) + Unit.X-SwitchMethod = "keep-old"; + + # TODO: This should probably be added <2026-07-02> + # OOMScoreAdjust=-100; + }; + programs.foot = { enable = true; server.enable = true; settings = { main = { + include = "${./theme.ini}"; font = "SauceCodePro Nerd Font Mono:size=12"; - horizontal-letter-offset = -1; - vertical-letter-offset = -1; + letter-spacing = "-0.25"; }; - # environment = { - # COLORTERM = "truecolor"; - # }; "regex:hashes" = { regex = "([a-fA-F0-9]{7,128})"; launch = "git show \${match}"; }; "regex:paths" = { - regex = "([^ '\"`=:\\\\[\\\\(]*/)([^/: '\"`\\\\)\\\\]]*)"; + regex = "([^ '\"`=:\\\\[\\\\(]*/[^/: '\"`\\\\)\\\\]*)"; launch = "ll \${match}"; }; @@ -54,29 +66,6 @@ in { }; }; }; - - systemd.user.services = let - footCfg = config.home-manager.users.soispha.programs.foot; - inherit (footCfg.server) systemdTarget; - in { - foot-initial-term = { - Unit = { - Description = "Fast, lightweight and minimalistic Wayland terminal emulator."; - Documentation = "man:foot(1)"; - PartOf = [systemdTarget]; - After = [systemdTarget]; - ConditionEnvironment = "WAYLAND_DISPLAY"; - }; - - Service = { - ExecStart = "${lib.getExe' footCfg.package "footclient"}"; - }; - - Install = { - WantedBy = [systemdTarget]; - }; - }; - }; }; }; } diff --git a/modules/by-name/fo/foot/theme.ini b/modules/by-name/fo/foot/theme.ini new file mode 100644 index 00000000..f5f36039 --- /dev/null +++ b/modules/by-name/fo/foot/theme.ini @@ -0,0 +1,40 @@ +# From https://github.com/mbadolato/iTerm2-Color-Schemes/blob/75bc70670c28b5dc97625af38deb3ae49f4363e6/foot/Carbonfox.ini +# Other themes I considered: +# - ayu-mirage +# - catppuccin-mocha +# - chiba-dark +# - iterm +# - kitty +# - modus-vivendi +# - modus-vivendi-tinted +# - molokai +# - tokyonight-storm +# - visibone +# - xterm +# - poimandres +# -*- conf -*- +# VisiBone + +[colors-dark] +cursor=161616 f2f4f8 +foreground=f2f4f8 +background=161616 +regular0=282828 +regular1=ee5396 +regular2=25be6a +regular3=08bdba +regular4=78a9ff +regular5=be95ff +regular6=33b1ff +regular7=dfdfe0 +bright0=484848 +bright1=f16da6 +bright2=46c880 +bright3=2dc7c4 +bright4=8cb6ff +bright5=c8a5ff +bright6=52bdff +bright7=e4e4e5 +selection-foreground=f2f4f8 +selection-background=2a2a2a + diff --git a/modules/by-name/gi/git/module.nix b/modules/by-name/gi/git/module.nix index 64a64904..28e61ecb 100644 --- a/modules/by-name/gi/git/module.nix +++ b/modules/by-name/gi/git/module.nix @@ -9,6 +9,7 @@ # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { lib, + pkgs, config, ... }: let @@ -43,6 +44,14 @@ in { }; }; + # Add my custom git-scripts + home.packages = [ + pkgs.git-edit-index # Allows you to edit the indexed version of a file + pkgs.git-cm # A wrapper that re-adds the last commit's subject + pkgs.git-cgit # Allows fast cgit settings setup + pkgs.stamp # Add a license header to a file + ]; + programs.git = { enable = true; diff --git a/modules/by-name/i3/i3bar-river/module.nix b/modules/by-name/i3/i3bar-river/module.nix index 8a2203aa..982ec1e3 100644 --- a/modules/by-name/i3/i3bar-river/module.nix +++ b/modules/by-name/i3/i3bar-river/module.nix @@ -110,7 +110,26 @@ in { }; config = lib.mkIf cfg.enable { - soispha.programs.river.init.backgroundStart = [cfg.package]; + systemd.user.services."i3bar-river" = { + description = "Highly customizable Wayland bar for river"; + partOf = ["graphical-session.target"]; + after = ["graphical-session.target"]; + requisite = ["graphical-session.target"]; + + path = [ + pkgs.bash # `sh` is needed for starting the status command + + # TODO: This should be a wrapper of the status command <2026-06-23> + pkgs.btrfs-progs # `btrfs` is needed by the storage block in the status command + ]; + + serviceConfig = { + ExecStart = "${lib.getExe cfg.package}"; + ExecReload = "kill -SIGUSR2 $MAINPID"; + Restart = "on-failure"; + }; + wantedBy = ["graphical-session.target"]; + }; home-manager.users.soispha = { programs.i3bar-river = { diff --git a/modules/by-name/lf/lf/commands/default.nix b/modules/by-name/lf/lf/commands/default.nix index e8230556..42dc548e 100644 --- a/modules/by-name/lf/lf/commands/default.nix +++ b/modules/by-name/lf/lf/commands/default.nix @@ -16,7 +16,14 @@ pkgs.writeShellApplication { inherit name; text = builtins.readFile ./base.sh + builtins.readFile ./scripts/${name}.sh; - runtimeInputs = [pkgs.lf pkgs.mktemp pkgs.coreutils] ++ dependencies; + runtimeInputs = + [ + pkgs.lf + pkgs.mktemp + pkgs.coreutils + pkgs.gnused + ] + ++ dependencies; inheritPath = keepPath; } + "/bin/${name}"; @@ -72,6 +79,12 @@ in { name = "cd_project_root"; dependencies = [pkgs.git]; }; + cd_lf_make_map = shell { + name = "cd_lf_make_map"; + dependencies = [ + pkgs.lf-make-map + ]; + }; chmod = pipe { name = "chmod"; diff --git a/modules/by-name/lf/lf/commands/scripts/cd_lf_make_map.sh b/modules/by-name/lf/lf/commands/scripts/cd_lf_make_map.sh new file mode 100755 index 00000000..00befd3f --- /dev/null +++ b/modules/by-name/lf/lf/commands/scripts/cd_lf_make_map.sh @@ -0,0 +1,27 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. + +# shellcheck shell=sh + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +fx="$fx" +# shellcheck disable=SC2269 +fs="$fs" +# shellcheck disable=SC2269 +id="$id" + +root="$(lf-make-map --depth 4 interactive ~/media ~/repos ~/documents ~/.config ~/.local)" +if [ "$root" ]; then + lf_cmd cd "$root" || die "Bug: Failed to cd to selected path at '$root'" +fi + +# vim: ft=sh diff --git a/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix index d64c9572..a5fc2c50 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix @@ -94,6 +94,10 @@ pkgs.xz pkgs.zip + pkgs.cabextract + + pkgs.coreutils + # Unfree stuff # pkgs.lha # pkgs.rar diff --git a/modules/by-name/lf/lf/keybindings/default.nix b/modules/by-name/lf/lf/keybindings/default.nix index fbc33f6f..d7f8eb95 100644 --- a/modules/by-name/lf/lf/keybindings/default.nix +++ b/modules/by-name/lf/lf/keybindings/default.nix @@ -15,50 +15,69 @@ "'\"'" = null; ";" = null; "\"'\"" = null; - c = null; - d = null; - e = null; - j = null; - k = null; - m = null; - f = null; # Sorting - kn = ":set sortby natural; set info"; - ks = ":set sortby size; set info size"; - kt = ":set sortby time; set info time"; - ka = ":set sortby atime; set info atime"; - kc = ":set sortby ctime; set info ctime"; - ke = ":set sortby ext; set info"; + # k = null; + k = { + n = ":set sortby natural; set info"; + s = ":set sortby size; set info size"; + t = ":set sortby time; set info time"; + a = ":set sortby atime; set info atime"; + c = ":set sortby ctime; set info ctime"; + e = ":set sortby ext; set info"; + }; # Searching l = "search-next"; L = "search-prev"; - # File Openers - ee = "\$\$EDITOR \"$f\""; - es = "\$ nvim -S \"$f\""; + # File edit + # e = null; + e = { + e = "\$\$EDITOR \"$f\""; + s = "\$ nvim -S \"$f\""; + }; + u = "view_file"; - cc = "\$sudo -e \"$f\""; - fe = "execute"; - fl = "follow_link"; - cp = "set_clipboard_path"; + + # f = null; + f = { + e = "execute"; + l = "follow_link"; + }; + + # c = null; + c = { + p = "set_clipboard_path"; + s = "stripspace"; + h = "chmod"; + }; # Archive Mappings - au = "archive_decompress"; - aa = "archive_compress"; + a = { + u = "archive_decompress"; + a = "archive_compress"; + }; - # Trash Mappings - dd = "trash"; - jc = "trash_clear"; - jr = "trash_restore"; + D = { + D = "delete"; + }; + # d = null; + d = { + # Trash Mappings + d = "trash"; - # Dragon Mapping - dr = "dragon"; - ds = "dragon_stay"; - di = "dragon_individual"; + # Dragon Mapping + r = "dragon"; + s = "dragon_stay"; + i = "dragon_individual"; + }; - cs = "stripspace"; + # j = null; + j = { + c = "trash_clear"; + r = "trash_restore"; + }; # Vim keys h = "updir"; @@ -68,36 +87,36 @@ # Basic Functions "." = "set hidden!"; - DD = "delete"; p = "paste"; x = "cut"; y = "copy"; "<enter>" = "open"; - mk = "mk_link"; - mf = "mk_file"; - md = "mk_directory"; - ms = "mk_script"; + # m = null; + m = { + k = "mk_link"; + f = "mk_file"; + d = "mk_directory"; + s = "mk_script"; + }; + + b = { + g = "set_wallpaper"; + }; - ch = "chmod"; - bg = "set_wallpaper"; r = ":rename; cmd-end"; - H = "cd_project_root"; R = "reload"; C = "clear"; U = "unselect"; - # Movement - gjr = "cd ~/.local/share/Trash/files"; - gus = "cd /run/user/${builtins.toString uid}"; - - gc = "cd ~/.config"; - gl = "cd ~/.local"; - gE = "cd /etc"; - gD = "cd ${downloadDir}"; - - "gU." = "cd /usr"; - gUs = " cd /usr/share"; + # (walking) Movement + w = { + u = "cd /run/user/${builtins.toString uid}"; + e = "cd /etc"; + d = "cd ${downloadDir}"; + t = "cd /tmp"; + h = "cd_project_root"; + }; - gt = "cd /tmp"; + g = "cd_lf_make_map"; } diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix index 8dfd0c52..0a0e193f 100644 --- a/modules/by-name/lf/lf/module.nix +++ b/modules/by-name/lf/lf/module.nix @@ -17,7 +17,19 @@ ... }: let commands = import ./commands {inherit pkgs sysLib shell_library system;}; - keybindings = import ./keybindings {inherit (cfg.keymaps) uid downloadDir;}; + keybindings_raw = import ./keybindings {inherit (cfg.keymaps) uid downloadDir;}; + + process = prefix: attrs: + lib.mapAttrsToList (name: value: + if (builtins.isAttrs value) + then + (process name value) + ++ [(lib.nameValuePair name null)] + else if prefix == null + then (lib.nameValuePair name value) + else (lib.nameValuePair (prefix + name) value)) + attrs; + keybindings = builtins.listToAttrs (lib.lists.flatten (process null keybindings_raw)); packages = import ./wrappers {inherit pkgs;}; @@ -85,7 +97,6 @@ in { drawbox = true; - # errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; errorfmt = "\\033[1;91m%s\\033[0m"; hidden = true; # show hidden files icons = true; @@ -94,22 +105,6 @@ in { shell = "${lib.getExe pkgs.dash}"; shellopts = "-eu"; # e: exit on error; u: error for unset variables }; - extraConfig = '' - # Dynamically generate the cd mappings. - # This code dependends on the fact, that the lf server was started previously - # and keep running through `autoquit = false`. - # (Otherwise, the remote command is silently dropped: https://github.com/gokcehan/lf/issues/495) - &{{ - tmp="$(mktemp -t lf_make_map_dynamic_mapping_source_XXXXX)" - ${lib.getExe pkgs.lf-make-map} --depth 4 generate ~/media ~/repos ~/documents >"$tmp" - - lf -remote "send $id source $tmp" - sleep 1 - lf -remote "send $id source $tmp" - - rm "$tmp" - }} - ''; }; }; }; diff --git a/modules/by-name/lf/lf/wrappers/ll/ll.sh b/modules/by-name/lf/lf/wrappers/ll/ll.sh index ce29fd97..9bb314c6 100755 --- a/modules/by-name/lf/lf/wrappers/ll/ll.sh +++ b/modules/by-name/lf/lf/wrappers/ll/ll.sh @@ -10,20 +10,14 @@ # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -last_directory="$(mktemp -t ll_last_directory_XXXXXXX)" -cleanup() { - rm "$last_directory" -} -trap cleanup EXIT +[ -d "$XDG_RUNTIME_DIR/ll" ] || mkdir "$XDG_RUNTIME_DIR/ll" +last_directory="$XDG_RUNTIME_DIR/ll/last_directory" command lf -last-dir-path="$last_directory" "$@" dir="$(cat "$last_directory")" -if cd "$dir"; then - [ -d "$XDG_RUNTIME_DIR/ll" ] || mkdir "$XDG_RUNTIME_DIR/ll" - echo "$dir" >"$XDG_RUNTIME_DIR/ll/last_directory" -else - die "$dir does not exist!" +if ! cd "$dir"; then + die "ll: Failed to cd to '$dir'. Does it exist?" fi # vim: ft=sh diff --git a/modules/by-name/lu/lutris/module.nix b/modules/by-name/lu/lutris/module.nix new file mode 100644 index 00000000..f8f39681 --- /dev/null +++ b/modules/by-name/lu/lutris/module.nix @@ -0,0 +1,52 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + lib, + config, + libraries, + pkgs, + ... +}: let + cfg = config.soispha.programs.lutris; +in { + options.soispha.programs.lutris = { + enable = libraries.base.options.mkEnable "Lutris"; + }; + + config = lib.mkIf cfg.enable { + soispha.impermanence.userDirectories = [ + ".config/lutris" + ]; + + # TODO: This should also have something, to avoid giving the games network access: 'https://github.com/lutris/docs/blob/master/DisableNetworkAccess.md' <2026-07-10> + home-manager.users.soispha = { + programs.lutris = { + enable = true; + extraPackages = [ + # Show fps and such in game + pkgs.mangohud + + pkgs.winetricks + + # Runs game in it's own compositor (avoids issues with all the resolution stuff) + pkgs.gamescope + + pkgs.gamemode + pkgs.umu-launcher + ]; + steamPackage = lib.mkIf config.programs.steam.enable config.programs.steam.package; + defaultWinePackage = pkgs.proton-ge-bin; + protonPackages = [pkgs.proton-ge-bin]; + + # winePackages = [pkgs.wineWow64Packages.full]; + }; + }; + }; +} diff --git a/modules/by-name/ly/ly/module.nix b/modules/by-name/ly/ly/module.nix index dedabe81..e2d3b0ae 100644 --- a/modules/by-name/ly/ly/module.nix +++ b/modules/by-name/ly/ly/module.nix @@ -31,6 +31,7 @@ Terminal=true ''; + # TODO: This could use the `services.display-manager.sessionPackages` option <2026-06-23> customSessionsDir = pkgs.runCommand "custom-sessions" {} /* @@ -39,8 +40,22 @@ '' mkdir "$out"; cp "${riverDesktop}/share/applications/river.desktop" "$out" - cp "${shellDesktop}" "$out" + cp "${shellDesktop}" "$out/zsh.desktop" ''; + + setup = pkgs.writeShellApplication { + name = "setup"; + + bashOptions = []; + + runtimeInputs = [ + pkgs.findutils + pkgs.systemd + ]; + inheritPath = true; + + text = builtins.readFile ./setup.sh; + }; in { options.soispha.programs.ly = { enable = lib.mkEnableOption "ly"; @@ -84,6 +99,11 @@ in { dur_file_path = "${./blackhole-smooth-240x67.dur}"; full_color = true; + # NOTE: This does the same as the default nixos setup cmd, but we don't + # immidiately start the `graphical-session.target`. That is started by river's + # init. <2026-06-23> + setup_cmd = "${lib.getExe setup}"; + custom_sessions = "${customSessionsDir}"; # Clear the screen before starting up (otherwise error messages might linger on @@ -98,12 +118,12 @@ in { clock = "%c"; hibernate_cmd = "systemctl hibernate"; - inactivity_cmd = "systmectl suspend-then-hibernate"; + inactivity_cmd = "systemctl suspend-then-hibernate"; restart_cmd = "reboot"; shutdown_cmd = "shutdown $PLATFORM_SHUTDOWN_ARG now"; sleep_cmd = "systemctl suspend"; - inactivity_delay = 30; # unit is seconds + inactivity_delay = 120; # unit is seconds }; }; }; diff --git a/modules/by-name/ly/ly/setup.sh b/modules/by-name/ly/ly/setup.sh new file mode 100644 index 00000000..6e8bed2b --- /dev/null +++ b/modules/by-name/ly/ly/setup.sh @@ -0,0 +1,47 @@ +#! /usr/bin/env bash + +# Shared environment setup for graphical sessions. + +# shellcheck disable=1091 +. /etc/profile + +cd "$HOME" || { + echo 1>&2 "No HOME :(" + exit 1 +} + +if [ -z "$_DID_SYSTEMD_CAT" ]; then + export _DID_SYSTEMD_CAT=1 + exec systemd-cat -t xsession "$0" "$@" +fi + + +# Import environment variables into the systemd user environment. +/run/current-system/systemd/bin/systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY XDG_SESSION_ID + +# Speed up application start by 50-150ms according to +# https://kdemonkey.blogspot.com/2008/04/magic-trick.html +compose_cache="${XCOMPOSECACHE:-$HOME/.compose-cache}" +mkdir -p "$compose_cache" +# To avoid accidentally deleting a wrongly set up XCOMPOSECACHE directory, +# defensively try to delete cache *files* only, following the file format specified in +# https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/modules/im/ximcp/imLcIm.c#L353-358 +# sprintf (*res, "%s/%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(), XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2); +find "$compose_cache" -maxdepth 1 -regextype posix-extended -regex '.*/[Bl][0-9]+_[0-9a-f]{3}_[0-9a-f]{8}_[0-9a-f]{8}' -delete +unset compose_cache + +# Work around KDE errors when a user first logs in and +# .local/share doesn't exist yet. +mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}" + +unset _DID_SYSTEMD_CAT + + +if test "$1"; then + # Run the supplied session command. + exec "$@" +else + # TODO: Do we need this? Should not the session always exist? + echo "error: unknown session $1" 1>&2 + exit 1 +fi diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix index 65b6ed5c..7caa8a8e 100644 --- a/modules/by-name/ni/nix/module.nix +++ b/modules/by-name/ni/nix/module.nix @@ -59,6 +59,9 @@ in { }; settings = { + # Don't warn about dirty git trees (It is usually absolutely useless) + warn-dirty = false; + auto-optimise-store = true; experimental-features = [ "nix-command" diff --git a/modules/by-name/ni/nixpkgs/module.nix b/modules/by-name/ni/nixpkgs/module.nix index 84d8e074..1ded8444 100644 --- a/modules/by-name/ni/nixpkgs/module.nix +++ b/modules/by-name/ni/nixpkgs/module.nix @@ -22,7 +22,13 @@ in { example = "x86_64-linux"; type = lib.types.str; }; + unfreePackageNames = lib.mkOption { + description = "Names of unfree packages to allow"; + example = "[ steam steam-unwrapped ]"; + type = lib.types.listOf lib.types.str; + }; }; + config = let myPkgsOverlay = self: super: packageSets.soispha; in @@ -39,11 +45,7 @@ in { hostSystem = cfg.systemName; allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - # the plugin is lacking an license and is thus unfree, effectively - # its okay though (TODO: investigate <2026-05-11>)? - "cmp-calc" - ]; + builtins.elem (lib.getName pkg) cfg.unfreePackageNames; }; }; }; diff --git a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix index 315f3fc7..48883bd3 100644 --- a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix +++ b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix @@ -14,6 +14,12 @@ }: let cfg = config.soispha.programs.nvim; in { + soispha.nixpkgs.unfreePackageNames = [ + # the plugin is lacking an license and is thus unfree, effectively + # its okay though (TODO: investigate <2026-05-11>)? + "cmp-calc" + ]; + home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { opts.completeopt = [ "menu" # Show completions in a menu diff --git a/modules/by-name/qu/qutebrowser/include/redirects.py b/modules/by-name/qu/qutebrowser/include/redirects.py index 63a44ecf..2588b9e0 100644 --- a/modules/by-name/qu/qutebrowser/include/redirects.py +++ b/modules/by-name/qu/qutebrowser/include/redirects.py @@ -34,7 +34,7 @@ def farside_redir(target: str, url: QUrl) -> bool: # Any return value other than a literal 'False' means we redirect REDIRECT_MAP: typing.Dict[str, typing.Callable[..., typing.Optional[bool]]] = { - "reddit.com": operator.methodcaller("setHost", "redlib.vhack.eu"), + "reddit.com": partial(farside_redir, "redlib"), # Source: https://libredirect.github.io/ "medium.com": partial(farside_redir, "scribe"), "stackoverflow.com": partial(farside_redir, "anonymousoverflow"), diff --git a/modules/by-name/qu/qutebrowser/settings/default.nix b/modules/by-name/qu/qutebrowser/settings/default.nix index 282c5816..b0259c22 100644 --- a/modules/by-name/qu/qutebrowser/settings/default.nix +++ b/modules/by-name/qu/qutebrowser/settings/default.nix @@ -502,11 +502,11 @@ in { "@du" = duckduckgo; # NIX - "@np" = "https://search.nixos.org/packages?type=packages&query={}"; # Nix packages + "@np" = "https://search.nixos.org/packages?channel=unstable&type=packages&query={}"; # Nix packages "@ng" = "https://noogle.dev/q?term={}"; # Nix functions - "@no" = "https://search.nixos.org/options?type=options&query={}"; # NixOS options + "@no" = "https://search.nixos.org/options?channel=unstable&type=options&query={}"; # NixOS options "@nh" = "https://home-manager-options.extranix.com/?query={}&release=master"; # Home-Manager options "@ni" = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+{}"; # Nixpkgs issues diff --git a/modules/by-name/ri/river/keymap.nix b/modules/by-name/ri/river/keymap.nix index eacfd75b..897d11df 100644 --- a/modules/by-name/ri/river/keymap.nix +++ b/modules/by-name/ri/river/keymap.nix @@ -44,7 +44,7 @@ in { "<LEFT_SUPER>" = { # Spawn standard programs "r" = { - "a" = mkSpawn pkgs.alacritty "" {}; + "a" = mkSpawn' pkgs.foot "footclient" "" {}; "b" = mkSpawn pkgs.tskm "open select" {once = true;}; "k" = mkSpawn pkgs.keepassxc "" {once = true;}; # "s" = mkSpawn pkgs.signal-desktop "" {once = true;}; @@ -69,7 +69,7 @@ in { "x" = { "q" = ["exit"]; "l" = mkSpawn pkgs.lock "" {once = true;}; - "h" = mkSpawn' pkgs.procps "pkill" "--signal USR1 i3bar-river" {once = true;}; + "h" = mkSpawn pkgs.systemd-toggle "--user i3bar-river.service" {once = true;}; }; # Media control diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix index bafaf0a3..7eb30014 100644 --- a/modules/by-name/ri/river/module.nix +++ b/modules/by-name/ri/river/module.nix @@ -35,7 +35,9 @@ else builtins.map esa input ); in "err_fail ${program} &"; - longRunningPrograms = builtins.concatStringsSep "\n" (builtins.map mkLrProgram cfg.init.backgroundStart); + longRunningPrograms = + builtins.concatStringsSep "\n" (builtins.map mkLrProgram + cfg.init.autoStart); keymapFormat = pkgs.formats.json {}; keymapGenerate = name: value: @@ -163,12 +165,14 @@ in { ''; }; - backgroundStart = lib.mkOption { - type = lib.types.listOf (lib.types.either lib.types.package (lib.types.listOf lib.types.str)); - description = "List of programs to start in the background"; + autoStart = lib.mkOption { + type = + lib.types.listOf (lib.types.either lib.types.package (lib.types.listOf + lib.types.str)); + description = "List of programs to be started at river start"; example = '' [ - pkgs.gammastep + ''${lib.getExe pkgs.foot} ] ''; }; @@ -235,14 +239,49 @@ in { # ${text} ${other_stuff} ''; + + sessionVars = + (builtins.attrNames config.environment.sessionVariables) + ++ (builtins.attrNames config.home-manager.users.soispha.home.sessionVariables) + ++ [ + "WAYLAND_DISPLAY" + "DISPLAY" + "XDG_RUNTIME_DIR" + ]; + + part = acc: vars: let + firstTen = lib.lists.take 5 vars; + in + if firstTen == [] + then acc + else part (acc ++ [firstTen]) (lib.lists.removePrefix firstTen vars); + + partedSessionVars = part [] sessionVars; + + mkEnvSet = prefix: vars: let + stringVars = builtins.concatStringsSep " " vars; + in ''err_fail ${riverctl} spawn "${prefix} ${stringVars}"''; + + dbusEnvs = + builtins.map + (mkEnvSet "${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --verbose --systemd") + partedSessionVars; + systemdUserEnvs = + builtins.map + (mkEnvSet "systemctl --user --verbose import-environment") + partedSessionVars; in builtins.readFile ./init_base.sh + # bash mkHeading "Environment variables" '' - err_fail ${riverctl} spawn "${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --verbose --systemd SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river" export XDG_CURRENT_DESKTOP=river DESKTOP_SESSION=river; '' + + mkHeading "Informing dbus about changed env-vars" (builtins.concatStringsSep "\n" dbusEnvs) + + mkHeading "Informing systemd user about changed env-vars" (builtins.concatStringsSep "\n" systemdUserEnvs) + + mkHeading "Starting graphical-session-target" '' + err_fail systemctl --user start nixos-fake-graphical-session.target + '' + mkHeading "Key Mappings" keymappings + mkHeading "Rules" ruleSetup + mkHeading "General Settings" generalSettings diff --git a/modules/by-name/ss/ssh/module.nix b/modules/by-name/ss/ssh/module.nix index 87c50728..39c203fd 100644 --- a/modules/by-name/ss/ssh/module.nix +++ b/modules/by-name/ss/ssh/module.nix @@ -55,6 +55,13 @@ in { text = cfg.rootKnownHosts; }) ); + "Host *.your-storagebox.de" = { + # Don't try to authenticate via password for these, because we need to use the + # forced commands, and they are only provided via the ssh key login. + # So password login is a footgun (it is, however, valid to use it for non-root + # use-cases) + PasswordAuthentication = false; + }; }; }; @@ -64,6 +71,11 @@ in { settings = { "Host *" = mkDefaultMatchBlock "${config.home-manager.users.soispha.xdg.dataHome}/ssh/known_hosts"; + "Host *.your-storagebox.de" = { + # Port 22 is for sftp, and when we connect as user, we probably want an + # interactive shell. + Port = 23; + }; }; }; }; diff --git a/modules/by-name/st/steam/module.nix b/modules/by-name/st/steam/module.nix index 87cdc709..aaa36fd3 100644 --- a/modules/by-name/st/steam/module.nix +++ b/modules/by-name/st/steam/module.nix @@ -19,15 +19,12 @@ in { }; config = lib.mkIf cfg.enable { - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - # NOTE: These are not really applied. Needs to be at - # <modules/by-name/ni/nixpkgs/config.nix> for some reason. <2025-04-25> - "steam" - "steam-unwrapped" - "steam-original" - "steam-run" - ]; + soispha.nixpkgs.unfreePackageNames = [ + "steam" + "steam-unwrapped" + "steam-original" + "steam-run" + ]; programs.steam = { enable = true; diff --git a/modules/common/abstract-nord.png b/modules/by-name/sw/swaybg/images/abstract-nord.png Binary files differindex 5ef498bf..5ef498bf 100644 --- a/modules/common/abstract-nord.png +++ b/modules/by-name/sw/swaybg/images/abstract-nord.png diff --git a/modules/common/abstract-nord.png.license b/modules/by-name/sw/swaybg/images/abstract-nord.png.license index eae6a84c..eae6a84c 100644 --- a/modules/common/abstract-nord.png.license +++ b/modules/by-name/sw/swaybg/images/abstract-nord.png.license diff --git a/modules/by-name/sw/swaybg/module.nix b/modules/by-name/sw/swaybg/module.nix new file mode 100644 index 00000000..fa6a079a --- /dev/null +++ b/modules/by-name/sw/swaybg/module.nix @@ -0,0 +1,35 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + config, + lib, + pkgs, + libraries, + ... +}: let + cfg = config.soispha.programs.swaybg; +in { + options.soispha.programs.swaybg = { + enable = libraries.base.options.mkEnable "swaybg"; + }; + + config = lib.mkIf cfg.enable { + systemd.user.services."swaybg" = { + description = "Background display for river"; + partOf = ["graphical-session.target"]; + after = ["graphical-session.target"]; + requisite = ["graphical-session.target"]; + serviceConfig = { + ExecStart = "${lib.getExe pkgs.swaybg} --image ${./images/abstract-nord.png}"; + }; + wantedBy = ["graphical-session.target"]; + }; + }; +} diff --git a/modules/by-name/sw/swayidle/module.nix b/modules/by-name/sw/swayidle/module.nix new file mode 100644 index 00000000..9bda534f --- /dev/null +++ b/modules/by-name/sw/swayidle/module.nix @@ -0,0 +1,45 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + config, + pkgs, + lib, + libraries, + ... +}: let + cfg = config.soispha.programs.swayidle; + swaylock = lib.getExe pkgs.swaylock; +in { + options.soispha.programs.swayidle = { + enable = libraries.base.options.mkEnable "swayidle"; + }; + + config = lib.mkIf cfg.enable { + home-manager.users.soispha = { + services.swayidle = { + enable = true; + events = { + "before-sleep" = "${swaylock} -f "; + }; + + timeouts = [ + { + timeout = 180; + command = "${swaylock} -fF"; + } + { + timeout = 360; + command = "systemctl suspend-then-hibernate"; + } + ]; + }; + }; + }; +} diff --git a/modules/by-name/xd/xdg/module.nix b/modules/by-name/xd/xdg/module.nix index 108e0179..9430d82f 100644 --- a/modules/by-name/xd/xdg/module.nix +++ b/modules/by-name/xd/xdg/module.nix @@ -41,15 +41,15 @@ }; cfg = config.soispha.xdg; + + inherit (config.home-manager.users.soispha.home) homeDirectory; in { options.soispha.xdg = { enable = lib.mkEnableOption "xdg"; }; config = lib.mkIf cfg.enable { - home-manager.users.soispha.xdg = let - inherit (config.home-manager.users.soispha.home) homeDirectory; - in { + home-manager.users.soispha.xdg = { enable = true; configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile; @@ -75,6 +75,7 @@ in { music = "${homeDirectory}/media/music"; pictures = "${homeDirectory}/media/pictures"; videos = "${homeDirectory}/media/videos"; + projects = "${homeDirectory}/repos"; templates = null; publicShare = null; diff --git a/modules/by-name/yt/yt/module.nix b/modules/by-name/yt/yt/module.nix index 81bacf44..f001c030 100644 --- a/modules/by-name/yt/yt/module.nix +++ b/modules/by-name/yt/yt/module.nix @@ -113,6 +113,10 @@ in { config = { home-manager.users.soispha = lib.mkIf cfg.enable { + home.packages = [ + pkgs.yt + ]; + xdg.configFile = { "yt/mpv.conf".text = renderOptions mpvConf; "yt/mpv.input.conf".text = renderBindings mpvInputConfig; diff --git a/modules/common/default.nix b/modules/common/default.nix index 080d3f2a..e5172921 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -106,7 +106,7 @@ "~/.local/share/maildir" - # "Unknown filetype (and there is no real reason to (try to) synchronize sockets)" + # "Unknown filetype" (and there is no real reason to (try to) synchronize sockets) "~/.local/share/gnupg/S.gpg-agent" "~/.local/share/gnupg/S.gpg-agent.browser" "~/.local/share/gnupg/S.gpg-agent.extra" @@ -219,16 +219,10 @@ pointer-1133-49970-Logitech_Gaming_Mouse_G502 = [["pointer-accel" "0"] ["accel-profile" "none"]]; pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I = [["pointer-accel" "0"] ["accel-profile" "none"]]; }; - backgroundStart = [ - # TODO(@bpeetz): Move these to systemd units/their own modules <2025-05-18> - - ["${lib.getExe pkgs.swaybg}" "--image" "${./abstract-nord.png}"] - pkgs.swayidle - ]; }; }; mpv.enable = true; - steam.enable = false; + steam.enable = true; ssh.enable = true; swaylock.enable = true; timewarrior.enable = true; diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index 89502a64..b50068ea 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -24,6 +24,5 @@ ./prusa_slicer ./python ./starship - ./swayidle ]; } diff --git a/modules/home.legacy/conf/gtk/default.nix b/modules/home.legacy/conf/gtk/default.nix index 56e5f565..e624765b 100644 --- a/modules/home.legacy/conf/gtk/default.nix +++ b/modules/home.legacy/conf/gtk/default.nix @@ -15,8 +15,8 @@ gtk = { enable = true; theme = { - # NOTE: The `nordic` package pulls the whole plasma shell, for a plasma theme :/ <2026-05-29> - # package = pkgs.nordic; + # NOTE: The `nordic` package pulls the whole plasma shell, to copy some stuff from a plasma theme :/ <2026-05-29> + package = pkgs.nordic; name = "Nordic"; }; cursorTheme = { diff --git a/modules/home.legacy/conf/swayidle/config b/modules/home.legacy/conf/swayidle/config deleted file mode 100644 index a48f670b..00000000 --- a/modules/home.legacy/conf/swayidle/config +++ /dev/null @@ -1,5 +0,0 @@ -timeout 180 'swaylock -fF' - -timeout 360 'systemctl suspend-then-hibernate' - -before-sleep 'swaylock -f' diff --git a/modules/home.legacy/conf/swayidle/config.license b/modules/home.legacy/conf/swayidle/config.license deleted file mode 100644 index eae6a84c..00000000 --- a/modules/home.legacy/conf/swayidle/config.license +++ /dev/null @@ -1,9 +0,0 @@ -nixos-config - My current NixOS configuration - -Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -SPDX-License-Identifier: GPL-3.0-or-later - -This file is part of my nixos-config. - -You should have received a copy of the License along with this program. -If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. diff --git a/modules/home.legacy/conf/swayidle/default.nix b/modules/home.legacy/conf/swayidle/default.nix deleted file mode 100644 index 4483c8b9..00000000 --- a/modules/home.legacy/conf/swayidle/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{...}: { - # TODO: This fails to hibernate when the hardware swap was not previously activated. <2025-04-04> - xdg.configFile."swayidle/config".source = ./config; - - # services.swayidle = { - # enable = true; - # events = [ - # { - # event = "before-sleep"; - # command = "${pkgs.swaylock}/bin/swaylock -f "; - # } - # ]; - # timeouts = [ - # { - # timeout = 180; - # command = "${pkgs.swaylock}/bin/swaylock -fFu "; - # } - # { - # timeout = 360; - # # TODO: systemctl is installed? - # command = "systemctl suspend-then-hibernate"; - # } - # ]; - # # systemdTarget = ""; # TODO: this might be usefull - # }; -} diff --git a/modules/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix index 18ef3d98..840ffb19 100644 --- a/modules/home.legacy/pkgs/default.nix +++ b/modules/home.legacy/pkgs/default.nix @@ -22,12 +22,7 @@ with pkgs; let }; TuiCli = { - Pdfs = [ - con2pdf # Scanner implementation - ]; - Misc = [ - killall # kill a application by name bc # Smart calculator aumo # Automatic mount jq # Json parser @@ -52,12 +47,6 @@ with pkgs; let ]; }; - Media = { - YouTube = [ - yt # A command line YouTube client - ]; - }; - Hardware = { Storage = [ # TODO: smartmontools # Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives @@ -91,16 +80,6 @@ with pkgs; let ripgrep # A search tool that combines the usability of ag with the raw speed of grep file # Show information about a file ]; - - Programming = { - GeneralTools = [ - stamp # Add a license header to a file - git # the fast distributed version control system - git-edit-index # Allows you to edit the indexed version of a file - git-cm # A wrapper that re-adds the last commit's subject - glow # Command-line markdown renderer - ]; - }; }; mapFun = x: if builtins.isAttrs x |
