commit c6f7d8de3468bb286d90cb7760930172a5d45a63
parent b70e74d00bb61ae7935e455720b1259d1c5dbdca
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 7 Mar 2025 19:24:30 +0100
parent b70e74d00bb61ae7935e455720b1259d1c5dbdca
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 7 Mar 2025 19:24:30 +0100
configurations: move home-manager specific configs to own directory
81 files changed, 1414 insertions(+), 1439 deletions(-)
M
|
126
++++++-------------------------------------------------------------------------
D
|
67
-------------------------------------------------------------------
A
|
59
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
|
234
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
|
117
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
|
59
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
|
196
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D
|
202
-------------------------------------------------------------------------------
D
|
62
--------------------------------------------------------------
D
|
239
-------------------------------------------------------------------------------
M
|
90
+++++++++++++++++++++++++++++++++++++++----------------------------------------
diff --git a/configurations/common/common.nix b/configurations/common/common.nix @@ -1,4 +1,4 @@ -{ ctucxConfig, pkgs, lib, ... }: +{ inputs, ctucxConfig, config, pkgs, lib, ... }: let NIXPKGS_PATH = lib.cleanSource pkgs.path; @@ -6,31 +6,42 @@ let in { imports = [ - ctucxConfig.programs.bash - ctucxConfig.programs.starship - ctucxConfig.programs.mcfly - ctucxConfig.programs.eza - - ctucxConfig.programs.micro - ctucxConfig.programs.tmux - ctucxConfig.programs.htop - - ctucxConfig.programs.deploymentUtilities - - ctucxConfig.programs.shellUtilities ctucxConfig.programs.networkUtilities - - ctucxConfig.programs.nix-cleanup ]; time.timeZone = "Europe/Berlin"; - home-manager.useGlobalPkgs = true; - home-manager.users.katja = { - home.sessionVariables = { - NIXPKGS_PATH = NIXPKGS_PATH; - NIX_PATH = "nixpkgs=${NIXPKGS_PATH}"; + home-manager = { + useGlobalPkgs = true; + extraSpecialArgs = { + inputs = inputs; + systemConfig = config; + }; + + users.katja = { + home.sessionVariables = { + NIXPKGS_PATH = NIXPKGS_PATH; + NIX_PATH = "nixpkgs=${NIXPKGS_PATH}"; + }; }; + + sharedModules = [ + ctucxConfig.homeManager.programs.bash + ctucxConfig.homeManager.programs.starship + ctucxConfig.homeManager.programs.mcfly + ctucxConfig.homeManager.programs.eza + ctucxConfig.homeManager.programs.bat + + ctucxConfig.homeManager.programs.micro + ctucxConfig.homeManager.programs.tmux + ctucxConfig.homeManager.programs.htop + + ctucxConfig.homeManager.programs.deploymentUtilities + + ctucxConfig.homeManager.programs.shellUtilities + + ctucxConfig.homeManager.programs.nix-cleanup + ]; }; environment.systemPackages = with pkgs; [ @@ -41,6 +52,7 @@ in { nix = { nixPath = lib.mkForce [ "nixpkgs=${NIXPKGS_PATH}" ]; settings = { + nix-path = config.nix.nixPath; trusted-users = [ "@wheel" ]; experimental-features = [ "nix-command" "flakes" ]; extra-substituters = [
diff --git a/configurations/common/programs/ansible.nix b/configurations/common/programs/ansible.nix @@ -1,16 +0,0 @@ -{ pkgs, ... }: - -let - ansible = pkgs.python3Packages.toPythonApplication (pkgs.python3Packages.ansible-core.overridePythonAttrs (old: rec { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ - pkgs.python3Packages.jmespath - ]; - })); - -in { - - home-manager.users.katja = { - home.packages = [ ansible pkgs.ansible-lint ]; - }; - -}
diff --git a/configurations/common/programs/bash.nix b/configurations/common/programs/bash.nix @@ -1,44 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - programs.bash = { - enable = true; - enableVteIntegration = lib.mkIf pkgs.stdenv.isLinux true; - - historyFileSize = 999999; - historyControl = [ "ignoredups" "ignorespace" ]; - historyIgnore = [ "ls" "clear" "exit" ]; - - bashrcExtra = '' - use() { - declare -a all - for p in "$@"; do - all+=("''${NIXPKGS_PATH}#$p") - done - eval nix shell ''${all[@]} - } - '' + lib.optionalString pkgs.stdenv.isDarwin '' - if [ "$TERM" != "dumb" ]; then - source "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" - nullglobStatus=$(shopt -p nullglob) - shopt -s nullglob - for p in $NIX_PROFILES; do - for m in "$p/etc/bash_completion.d/"*; do - source $m - done - done - eval "$nullglobStatus" - unset nullglobStatus p m - fi - - # Make bash check its window size after a process completes - shopt -s checkwinsize - - eval "$(/opt/homebrew/bin/brew shellenv)" - ''; - }; - }; - -}
diff --git a/configurations/common/programs/bitwarden-cli.nix b/configurations/common/programs/bitwarden-cli.nix @@ -1,9 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.bitwarden-cli ]; - }; - -}
diff --git a/configurations/common/programs/deploymentUtilities.nix b/configurations/common/programs/deploymentUtilities.nix @@ -1,14 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = with pkgs; [ - agenix - age - - deploy-rs - ]; - }; - -}
diff --git a/configurations/common/programs/eza.nix b/configurations/common/programs/eza.nix @@ -1,17 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.eza ]; - - home.shellAliases = { - ls = "eza"; - ll = "eza -l"; - la = "eza -a"; - lt = "eza --tree"; - lla = "eza -la"; - }; - }; - -}
diff --git a/configurations/common/programs/git.nix b/configurations/common/programs/git.nix @@ -1,40 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.gitui ]; - home.shellAliases = { - reinitgit = "rm -rf .git && git init && git add -A && git commit -m 'init'"; - }; - - programs.lazygit.enable = true; - programs.git = { - enable = true; - - package = pkgs.gitFull; - - userName = "Katja (ctucx)"; - userEmail = "git@ctu.cx"; - - difftastic.enable = true; - - ignores = [ - ".DS_Store" - "*.swp" - ]; - - aliases = { - log-gpg = "log --show-signature"; - pfusch = "push"; - }; - - extraConfig = { - features.manyFiles = true; - pull.rebase = false; -# "url \"git@git.ctu.cx:\"".insteadOf = "https://git.ctu.cx/"; - }; - }; - }; - -}
diff --git a/configurations/common/programs/gpg.nix b/configurations/common/programs/gpg.nix @@ -1,125 +1,17 @@ -{ config, pkgs, lib, ... }: +{ ctucxConfig, pkgs, ... }: { - services = { - pcscd.enable = (if pkgs.stdenv.isLinux then true else false); - udev.packages = (if pkgs.stdenv.isLinux then (with pkgs; [ libu2f-host yubikey-personalization ]) else []); - dbus.packages = (if pkgs.stdenv.isLinux then (with pkgs; [ gcr ]) else []); - }; + services = (if pkgs.stdenv.isLinux then { + pcscd.enable = true; + udev.packages = with pkgs; [ libu2f-host yubikey-personalization ]; + dbus.packages = with pkgs; [ gcr ]; + } else {}); home-manager.users.katja = { - xdg = lib.mkIf pkgs.stdenv.isLinux { - desktopEntries = { - gscriptor = { - name = "gscriptor"; - settings = { - NoDisplay = "true"; - }; - }; - }; - }; - - home = { - packages = lib.mkIf pkgs.stdenv.isLinux [ pkgs.pcsctools ]; - - sessionVariables = { - GNUPGHOME = lib.mkForce "$HOME/.gnupg"; - }; - - shellAliases = { - gpg-card-relearn = "gpg-connect-agent 'scd serialno' 'learn --force' /bye"; - }; - - file = lib.mkIf pkgs.stdenv.isDarwin { - ".gnupg/gpg-agent.conf".text = '' - enable-ssh-support - pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac - ''; - }; - }; - - wayland.windowManager.sway.extraConfig = '' - exec_always 'gpgconf --kill gpg-agent' - ''; - - programs = { - gpg = { - enable = true; - mutableTrust = true; - mutableKeys = true; - - publicKeys = [ - # my own key - { - trust = "ultimate"; - source = "${pkgs.ctucx-website}/gpg_pubkey.asc"; - } - { - trust = "ultimate"; - source = "${pkgs.ctucx-website}/gpg_pubkey_leah.asc"; - } - - # f2k1de's key - { - trust = "full"; - source = (pkgs.fetchurl { - url = "https://f2k1.de/gpg-key.asc"; - sha256 = "sha256-GvrsMDokWphfIAiabJTzNNzbHP7QtWkt2cn3piGBdzc"; - }); - } - - # governikus german eid verificaion pubkey - { - trust = "full"; - source = (pkgs.fetchurl { - url = "https://www.governikus.de/wp-content/uploads/2023/06/governikusPubKey.asc"; - sha256 = "sha256-eU7g+c2CAYGLxHCRb0qsnL3CvKgK3lWcKcgrS1WFwz0="; - }); - } - - - ]; - - settings = { - keyserver = "hkps://keyserver.ubuntu.com:443"; - }; - - scdaemonSettings = { - disable-ccid = true; - }; - }; - - bash.initExtra = '' - export GPG_TTY=$(tty) - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - gpgconf --launch gpg-agent - ''; - - - git.signing = { - key = "4F1D8CCB"; - signByDefault = true; - }; - }; - - services = lib.mkIf pkgs.stdenv.isLinux { - gpg-agent = { - enable = true; - enableSshSupport = true; - enableExtraSocket = true; - - pinentryPackage = pkgs.pinentry-gnome3; - - defaultCacheTtl = 600; - defaultCacheTtlSsh = 600; - - sshKeys = [ - "8C11B9BF8B535049F6C87A9CF0C595421E6B8798" - "29FA1059F28D2ED1C6398F7CFA918605F53786C0" - ]; - }; - }; + imports = [ + ctucxConfig.homeManager.programs.gpg + ]; }; }
diff --git a/configurations/common/programs/htop.nix b/configurations/common/programs/htop.nix @@ -1,34 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - programs.htop = { - enable = true; - - package = ( - if pkgs.stdenv.isDarwin then - pkgs.htop - else - pkgs.htop.override { - sensorsSupport = true; - } - ); - - settings = { - hide_userland_threads = 1; - tree_view = 1; - show_program_path = 0; - show_cpu_frequency = (if pkgs.stdenv.isDarwin then 0 else 1); - }; - }; - - xdg = lib.mkIf pkgs.stdenv.isLinux { - desktopEntries.htop = { - name = "Htop"; - settings.NoDisplay = "true"; - }; - }; - }; - -}
diff --git a/configurations/common/programs/mcfly.nix b/configurations/common/programs/mcfly.nix @@ -1,14 +0,0 @@ -{ config, lib, ... }: - -{ - - home-manager.users.katja = { - programs.mcfly = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - fuzzySearchFactor = 2; - }; - }; - -}
diff --git a/configurations/common/programs/micro.nix b/configurations/common/programs/micro.nix @@ -1,40 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home = { - sessionVariables.EDITOR = "micro"; - shellAliases.nano = "micro"; - }; - - programs.micro = { - enable = true; - settings = { - "*.nix".tabstospaces = true; - "*.nix".tabmovement = true; - "*.nix".tabsize = 2; - - "*.nim".tabstospaces = true; - "*.nim".tabmovement = true; - "*.nim".tabsize = 2; - - scrollbar = true; - eofnewline = false; - wordwrap = true; - softwrap = true; - - ignorecase = true; - savehistory = false; - }; - }; - - xdg = lib.mkIf pkgs.stdenv.isLinux { - desktopEntries.micro = { - name = "micro"; - settings.NoDisplay = "true"; - }; - }; - }; - -}
diff --git a/configurations/common/programs/nix-cleanup.nix b/configurations/common/programs/nix-cleanup.nix @@ -1,22 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ (pkgs.writeShellScriptBin "nix-cleanup" '' - set -eu - - # Delete everything from this profile that isn't currently needed - nix-env --delete-generations old - - # Delete generations older than a week - nix-collect-garbage - nix-collect-garbage --delete-older-than 7d - - # Optimize - nix-store --gc --print-dead - nix-store --optimise - '') ]; - }; - -}
diff --git a/configurations/common/programs/ocrmypdf.nix b/configurations/common/programs/ocrmypdf.nix @@ -1,9 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.ocrmypdf ]; - }; - -}
diff --git a/configurations/common/programs/password-store.nix b/configurations/common/programs/password-store.nix @@ -1,30 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home = { - packages = [ pkgs.pwgen ]; - sessionVariables = { - PASSWORD_STORE_DIR = lib.mkForce "\$HOME/.local/share/password-store"; - }; - }; - - programs = { - password-store = { - enable = true; - package = pkgs.pass.withExtensions (exts: [ - exts.pass-otp - exts.pass-update - exts.pass-genphrase - ]); - }; - - browserpass = { - enable = true; - browsers = [ "firefox" ]; - }; - }; - }; - -}
diff --git a/configurations/common/programs/phockup.nix b/configurations/common/programs/phockup.nix @@ -1,9 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.phockup ]; - }; - -}
diff --git a/configurations/common/programs/shellUtilities.nix b/configurations/common/programs/shellUtilities.nix @@ -1,67 +0,0 @@ -{ config, inputs, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - programs = { - bat.enable = true; - jq.enable = true; - }; - - home.shellAliases = { - ".." = "cd .."; - "..." = "cd ../.."; - - rm = "rm -i"; - - diff = "diff --color"; - - killall = "pkill"; - - cat = "bat -p"; - grep = "rg"; - find = "fd"; - - backgrounditems = "bgiparser -f \"\$HOME/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm\" -c"; - - zzz = ( - if pkgs.stdenv.isLinux then - "sleep 1 && systemctl suspend" - else - "pmset sleepnow" - ); - }; - - home.packages = with pkgs; [ - coreutils - - wget - curl - rsync - - - bat - ripgrep - fd - - fx - file - tree - bc - - unzip - - smartmontools - - gptfdisk - e2fsprogs - dosfstools - ] ++ (if pkgs.stdenv.isLinux then [ - usbutils - pciutils - - lm_sensors - ] else []); - }; - -}
diff --git a/configurations/common/programs/ssh.nix b/configurations/common/programs/ssh.nix @@ -1,22 +0,0 @@ -{ config, lib, ... }: - -{ - - home-manager.users.katja = { - programs.ssh = { - enable = true; - compression = true; - - controlMaster = "auto"; - controlPersist = "2m"; - - matchBlocks = { - "ctucx-git" = { - user = "git"; - hostname = "hector.ctu.cx"; - }; - }; - }; - }; - -}
diff --git a/configurations/common/programs/starship.nix b/configurations/common/programs/starship.nix @@ -1,19 +0,0 @@ -{ config, lib, ... }: - -{ - - home-manager.users.katja = { - programs.starship = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - settings = { - add_newline = false; - status = { - disabled = false; - }; - }; - }; - }; - -}
diff --git a/configurations/common/programs/texlive.nix b/configurations/common/programs/texlive.nix @@ -1,9 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.texlive.combined.scheme-full ]; - }; - -}
diff --git a/configurations/common/programs/tmux.nix b/configurations/common/programs/tmux.nix @@ -1,16 +0,0 @@ -{ config, lib, ... }: - -{ - - home-manager.users.katja = { - programs.tmux = { - enable = true; - clock24 = true; - terminal = "xterm-256color"; - extraConfig = '' - set -g mouse on - ''; - }; - }; - -}
diff --git a/configurations/common/programs/typst.nix b/configurations/common/programs/typst.nix @@ -1,12 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = with pkgs; [ - typst - typst-live - ]; - }; - -}
diff --git a/configurations/common/programs/yt-dlp.nix b/configurations/common/programs/yt-dlp.nix @@ -1,16 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.shellAliases.yt-dlp-audio = "yt-dlp --format bestaudio -x --audio-format opus --add-metadata --embed-thumbnail"; - - home.packages = with pkgs; [ - yt-dlp - (pkgs.writeShellScriptBin "youtube-dl" '' - exec ${pkgs.yt-dlp}/bin/yt-dlp --compat-options youtube-dl "$@" - '') - ]; - }; - -}
diff --git a/configurations/homeManager/configure/xdg.nix b/configurations/homeManager/configure/xdg.nix @@ -0,0 +1,22 @@ +{ ... }: + +{ + + xdg = { + enable = true; + mime.enable = true; + + userDirs = { + enable = true; + desktop = "\$HOME/Desktop"; + documents = "\$HOME/Documents"; + download = "\$HOME/Downloads"; + videos = "\$HOME/Videos"; + music = "\$HOME/Music"; + pictures = "\$HOME/Pictures"; + publicShare = "\$HOME/Public"; + templates = "\$HOME/Templates"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/alacritty.nix b/configurations/homeManager/programs/alacritty.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: + +{ + + home.sessionVariables = { + TERMINAL = "alacritty"; + }; + + programs = { + alacritty = { + enable = true; + settings = { + window.opacity = 0.9; + + font = { + size = 12.0; + normal.family = "DejaVu Sans Mono"; + }; + + colors = { + primary = { + background = "0x000000"; + foreground = "0xeaeaea"; + }; + + normal = { + black = "0x6c6c6c"; + red = "0xe9897c"; + green = "0xb6e77d"; + yellow = "0xecebbe"; + blue = "0xa9cdeb"; + magenta = "0xea96eb"; + cyan = "0xc9caec"; + white = "0xf2f2f2"; + }; + + bright = { + black = "0x747474"; + red = "0xf99286"; + green = "0xc3f786"; + yellow = "0xfcfbcc"; + blue = "0xb6defb"; + magenta = "0xfba1fb"; + cyan = "0xd7d9fc"; + white = "0xe2e2e2"; + }; + }; + }; + }; + }; + + wayland.windowManager.sway = { + config.terminal = "${pkgs.alacritty}/bin/alacritty"; + extraConfig = '' + exec swaymsg 'workspace 3: Term; exec ${pkgs.alacritty}/bin/alacritty; exec ${pkgs.alacritty}/bin/alacritty; workspace 1: Web;' + ''; + }; + +}
diff --git a/configurations/homeManager/programs/ansible.nix b/configurations/homeManager/programs/ansible.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +let + ansible = pkgs.python3Packages.toPythonApplication (pkgs.python3Packages.ansible-core.overridePythonAttrs (old: rec { + propagatedBuildInputs = old.propagatedBuildInputs ++ [ + pkgs.python3Packages.jmespath + ]; + })); + +in { + + home.packages = [ ansible pkgs.ansible-lint ]; + +}
diff --git a/configurations/homeManager/programs/bash.nix b/configurations/homeManager/programs/bash.nix @@ -0,0 +1,42 @@ +{ pkgs, lib, ... }: + +{ + + programs.bash = { + enable = true; + enableVteIntegration = lib.mkIf pkgs.stdenv.isLinux true; + + historyFileSize = 999999; + historyControl = [ "ignoredups" "ignorespace" ]; + historyIgnore = [ "ls" "clear" "exit" ]; + + bashrcExtra = '' + use() { + declare -a all + for p in "$@"; do + all+=("''${NIXPKGS_PATH}#$p") + done + eval nix shell ''${all[@]} + } + '' + lib.optionalString pkgs.stdenv.isDarwin '' + if [ "$TERM" != "dumb" ]; then + source "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" + nullglobStatus=$(shopt -p nullglob) + shopt -s nullglob + for p in $NIX_PROFILES; do + for m in "$p/etc/bash_completion.d/"*; do + source $m + done + done + eval "$nullglobStatus" + unset nullglobStatus p m + fi + + # Make bash check its window size after a process completes + shopt -s checkwinsize + + eval "$(/opt/homebrew/bin/brew shellenv)" + ''; + }; + +}
diff --git a/configurations/homeManager/programs/bat.nix b/configurations/homeManager/programs/bat.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + + programs.bat = { + enable = true; + config.theme = "ansi"; + }; + + home.shellAliases = { + cat = "bat -pp"; + less = "bat"; + }; + +}
diff --git a/configurations/homeManager/programs/bitwarden-cli.nix b/configurations/homeManager/programs/bitwarden-cli.nix @@ -0,0 +1,7 @@ +{ config, pkgs, lib, ... }: + +{ + + home.packages = [ pkgs.bitwarden-cli ]; + +}
diff --git a/configurations/homeManager/programs/celluloid.nix b/configurations/homeManager/programs/celluloid.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.celluloid ]; + +}+ \ No newline at end of file
diff --git a/configurations/homeManager/programs/deploymentUtilities.nix b/configurations/homeManager/programs/deploymentUtilities.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + + home.packages = with pkgs; [ + agenix + age + + deploy-rs + ]; + +}
diff --git a/configurations/homeManager/programs/eza.nix b/configurations/homeManager/programs/eza.nix @@ -0,0 +1,15 @@ +{ config, pkgs, lib, ... }: + +{ + + home.packages = [ pkgs.eza ]; + + home.shellAliases = { + ls = "eza"; + ll = "eza -l"; + la = "eza -a"; + lla = "eza -la"; + tree = "eza --tree -a"; + }; + +}
diff --git a/configurations/homeManager/programs/firefox.nix b/configurations/homeManager/programs/firefox.nix @@ -0,0 +1,234 @@ +{ inputs, pkgs, lib, ... }: + +{ + + home.sessionVariables = { + BROWSER = "firefox"; + }; + + home.file."firefox-gnome-theme" = { + source = inputs.firefoxGnomeTheme; + target = ".mozilla/firefox/katja/chrome/firefox-gnome-theme"; + }; + + programs.firefox = { + enable = true; + package = pkgs.firefox; + nativeMessagingHosts = [ pkgs.ff2mpv-rust ]; + + profiles.katja = { + id = 0; + isDefault = true; + + settings = { + # required for firefox-gnome-theme + "browser.toolbars.bookmarks.visibility" = "never"; + "browser.tabs.drawInTitlebar" = true; + "browser.theme.dark-private-windows" = false; + "browser.uidensity" = 0; + "svg.context-properties.content.enabled" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + userChrome = '' + @import "firefox-gnome-theme/userChrome.css"; + ''; + + userContent = '' + @import "firefox-gnome-theme/userContent.css"; + ''; + + search.force = true; # Required to prevent search engine symlink being overwritten. See https://github.com/nix-community/home-manager/issues/3698 + search.engines = { + "Noogle" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@noogle" ]; + urls = [{ template = "https://noogle.dev/q?term={searchTerms}"; }]; + }; + + "NixOS Options" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nixos" ]; + urls = [{ template = "https://search.nixos.org/options?query={searchTerms}"; }]; + }; + + "Nix Packages" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nixpkgs" ]; + urls = [{ template = "https://search.nixos.org/packages?query={searchTerms}"; }]; + }; + }; + }; + + policies = { + # disable tracking bullshit + DisableTelemetry = true; + DisablePocket = true; + + # disable password manager + PasswordManagerEnabled = false; + OfferToSaveLogins = false; + PrimaryPassword = false; + AutofillCreditCardEnabled = false; + + # disable bookmark-toolbar + NoDefaultBookmarks = true; + DisplayBookmarksToolbar = "never"; + + Homepage.StartPage = "previous-session"; + Homepage.Locked = true; + + # disable DoH + DNSOverHTTPS.Enabled = false; + DNSOverHTTPS.Locked = true; + + # enable tracking protection + EnableTrackingProtection.Cryptomining = true; + EnableTrackingProtection.Fingerprinting = true; + EnableTrackingProtection.Value = true; + EnableTrackingProtection.Locked = true; + + UserMessaging.ExtensionRecommendations = false; + UserMessaging.FeatureRecommendations = false; + UserMessaging.UrlbarInterventions = false; + UserMessaging.SkipOnboarding = true; + UserMessaging.MoreFromMozilla = false; + UserMessaging.FirefoxLabs = false; + UserMessaging.Locked = true; + + Handlers.schemes.dbnav = { + action = "useHelperApp"; + ask = true; + handlers = [{ + name = "VDV PKPass DB Navigator Hook"; + path = pkgs.writeShellScript "db-hook" '' + #!/usr/bin/env bash + + if [[ "$1" == "dbnav:"* ]]; then + url=$(echo -n $1 | base64) + xdg-open "https://vdv-pkpass.magicalcodewit.ch/account/db_login/callback?url=$url" + else + xdg-open "$1" + fi + ''; + }]; + }; + + Preferences = { + "browser.uiCustomization.state".Status = "default"; + "browser.uiCustomization.state".Value = builtins.toJSON { + currentVersion = 21; + newElementCount = 7; + seen = []; + dirtyAreaCache = []; + placements = { + widget-overflow-fixed-list = []; + toolbar-menubar = [ "menubar-items" ]; + vertical-tabs = []; + PersonalToolbar = []; + unified-extensions-area = []; + nav-bar = [ + "back-button" + "forward-button" + "vertical-spacer" + "stop-reload-button" + "urlbar-container" + "downloads-button" + "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" + "ublock0_raymondhill_net-browser-action" + "unified-extensions-button" + ]; + TabsToolbar = [ "tabbrowser-tabs" "new-tab-button" ]; + }; + }; + } // ({ + # disable some password-manager/autofill features + "signon.generation.enabled" = false; + "signon.autofillForms" = false; + "signon.firefoxRelay.feature" = "disabled"; + "signon.management.page.breach-alerts.enabled" = false; + + # ask websites to not share or sell data + "privacy.globalprivacycontrol.enabled" = true; + + # disable warning on `abou:config` + "browser.aboutConfig.showWarning" = false; + + # disable telemetry stuff + "browser.ping-centre.telemetry" = false; + "browser.topsites.contile.enabled" = false; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; + + # disable trending search suggestions + "browser.urlbar.suggest.trending" = false; + + # disable 'fancy' newtab page bullshit with tons of tracking and ads + "browser.startup.homepage" = "chrome://browser/content/blanktab.html"; + "browser.newtabpage.enabled" = false; + "browser.newtabpage.activity-stream.telemetry" = false; + "browser.newtabpage.activity-stream.showSearch" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.feeds.telemetry" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; + "browser.newtabpage.activity-stream.feeds.system.topsites" = false; + "browser.newtabpage.activity-stream.feeds.section.highlights" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false; + "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false; + "browser.newtabpage.activity-stream.section.highlights.includeVisited" = false; + } |> lib.mapAttrs (name: value: { + Status = "locked"; + Value = value; + })); + + ExtensionSettings = ([ + [ "navbar" "{446900e4-71c2-419f-a6a7-df9c091e268b}" ] # Bitwarden Password Manager + [ "navbar" "uBlock0@raymondhill.net" ] # uBlock Origin + [ "menupanel" "@ublacklist" ] # uBlacklist + [ "menupanel" "@contain-facebook" ] # Facebook Container + [ "menupanel" "@contain-google" ] # Google Container + [ "menupanel" "containerise@kinte.sh" ] # Containerise + [ "menupanel" "{12cf650b-1822-40aa-bff0-996df6948878}" ] # cookies.txt + [ "menupanel" "@testpilot-containers" ] # Firefox Multi-Account Containers + [ "menupanel" "{252ee273-8c8d-4609-b54d-62ae345be0a1}" ] # IndicateTLS + [ "menupanel" "ipvfoo@pmarks.net" ] # IPvFoo + [ "menupanel" "{e9090647-32ff-48e4-9c3c-1361e8fd270e}" ] # Modern for Wikipedia + [ "menupanel" "sponsorBlocker@ajay.app" ] # SponsorBlock for YouTube - Skip Sponsorships + [ "menupanel" "de-DE@dictionaries.addons.mozilla.org" ] # German Dictionary + ] |> lib.map (config: { name = (lib.elemAt config 1); value = { + installation_mode = "normal_installed"; + default_area = (lib.elemAt config 0); + install_url = "https://addons.mozilla.org/firefox/downloads/latest/${lib.elemAt config 1}/latest.xpi"; + }; }) |> lib.listToAttrs); + }; + }; + + wayland.windowManager.sway.config.startup = [ + { command = "firefox"; } + ]; + + xdg = { + enable = true; + mime.enable = true; + + #force hm to override existing mimeapps.list file + configFile."mimeapps.list".force = true; + + mimeApps = { + enable = true; + defaultApplications = { + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/chrome" = "firefox.desktop"; + + "image/svg+xml" = "firefox.desktop"; + + "text/html" = "firefox.desktop"; + "text/xml" = "firefox.desktop"; + }; + }; + }; + +}
diff --git a/configurations/homeManager/programs/fractal.nix b/configurations/homeManager/programs/fractal.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.fractal ]; + +}+ \ No newline at end of file
diff --git a/configurations/homeManager/programs/ghostty.nix b/configurations/homeManager/programs/ghostty.nix @@ -0,0 +1,18 @@ +{ ... }: + +{ + + programs.ghostty = { + enable = true; + + enableBashIntegration = true; + enableZshIntegration = true; + installBatSyntax = true; + + settings = { + background-opacity = 0.8; + background-blur = true; + }; + }; + +}+ \ No newline at end of file
diff --git a/configurations/homeManager/programs/git.nix b/configurations/homeManager/programs/git.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.gitui ]; + home.shellAliases = { + reinitgit = "rm -rf .git && git init && git add -A && git commit -m 'init'"; + }; + + programs.lazygit.enable = true; + programs.git = { + enable = true; + + package = pkgs.gitFull; + + userName = "Katja (ctucx)"; + userEmail = "git@ctu.cx"; + + difftastic.enable = true; + + ignores = [ + ".DS_Store" + "*.swp" + ]; + + aliases = { + log-gpg = "log --show-signature"; + pfusch = "push"; + }; + + extraConfig = { + features.manyFiles = true; + pull.rebase = false; +# "url \"git@git.ctu.cx:\"".insteadOf = "https://git.ctu.cx/"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/gpg.nix b/configurations/homeManager/programs/gpg.nix @@ -0,0 +1,117 @@ +{ config, pkgs, lib, ... }: + +{ + + xdg = lib.mkIf pkgs.stdenv.isLinux { + desktopEntries = { + gscriptor = { + name = "gscriptor"; + settings = { + NoDisplay = "true"; + }; + }; + }; + }; + + home = { + packages = lib.mkIf pkgs.stdenv.isLinux [ pkgs.pcsctools ]; + + sessionVariables = { + GNUPGHOME = lib.mkForce "$HOME/.gnupg"; + }; + + shellAliases = { + gpg-card-relearn = "gpg-connect-agent 'scd serialno' 'learn --force' /bye"; + }; + + file = lib.mkIf pkgs.stdenv.isDarwin { + ".gnupg/gpg-agent.conf".text = '' + enable-ssh-support + pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac + ''; + }; + }; + + wayland.windowManager.sway.extraConfig = '' + exec_always 'gpgconf --kill gpg-agent' + ''; + + programs = { + gpg = { + enable = true; + mutableTrust = true; + mutableKeys = true; + + publicKeys = [ + # my own key + { + trust = "ultimate"; + source = "${pkgs.ctucx-website}/gpg_pubkey.asc"; + } + { + trust = "ultimate"; + source = "${pkgs.ctucx-website}/gpg_pubkey_leah.asc"; + } + + # f2k1de's key + { + trust = "full"; + source = (pkgs.fetchurl { + url = "https://f2k1.de/gpg-key.asc"; + sha256 = "sha256-GvrsMDokWphfIAiabJTzNNzbHP7QtWkt2cn3piGBdzc"; + }); + } + + # governikus german eid verificaion pubkey + { + trust = "full"; + source = (pkgs.fetchurl { + url = "https://www.governikus.de/wp-content/uploads/2023/06/governikusPubKey.asc"; + sha256 = "sha256-eU7g+c2CAYGLxHCRb0qsnL3CvKgK3lWcKcgrS1WFwz0="; + }); + } + + + ]; + + settings = { + keyserver = "hkps://keyserver.ubuntu.com:443"; + }; + + scdaemonSettings = { + disable-ccid = true; + }; + }; + + bash.initExtra = '' + export GPG_TTY=$(tty) + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpgconf --launch gpg-agent + ''; + + + git.signing = { + key = "4F1D8CCB"; + signByDefault = true; + }; + }; + + services = lib.mkIf pkgs.stdenv.isLinux { + gpg-agent = { + enable = true; + enableSshSupport = true; + enableExtraSocket = true; + + pinentryPackage = pkgs.pinentry-gnome3; + + defaultCacheTtl = 600; + defaultCacheTtlSsh = 600; + + sshKeys = [ + "8C11B9BF8B535049F6C87A9CF0C595421E6B8798" + "29FA1059F28D2ED1C6398F7CFA918605F53786C0" + ]; + }; + }; + +}
diff --git a/configurations/homeManager/programs/htop.nix b/configurations/homeManager/programs/htop.nix @@ -0,0 +1,32 @@ +{ pkgs, lib, ... }: + +{ + + programs.htop = { + enable = true; + + package = ( + if pkgs.stdenv.isDarwin then + pkgs.htop + else + pkgs.htop.override { + sensorsSupport = true; + } + ); + + settings = { + hide_userland_threads = 1; + tree_view = 1; + show_program_path = 0; + show_cpu_frequency = (if pkgs.stdenv.isDarwin then 0 else 1); + }; + }; + + xdg = lib.mkIf pkgs.stdenv.isLinux { + desktopEntries.htop = { + name = "Htop"; + settings.NoDisplay = "true"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/imv.nix b/configurations/homeManager/programs/imv.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.imv ]; + + xdg.desktopEntries = { + imv-folder = { + name = "imv (Folder)"; + settings.NoDisplay = "true"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/libreoffice.nix b/configurations/homeManager/programs/libreoffice.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.libreoffice-fresh ]; + + xdg.desktopEntries = { + impress.name = "LibreOffice Impress"; + impress.settings.NoDisplay = "true"; + + math.name = "LibreOffice Math"; + math.settings.NoDisplay = "true"; + + base.name = "LibreOffice Base"; + base.settings.NoDisplay = "true"; + + draw.name = "LibreOffice Draw"; + draw.settings.NoDisplay = "true"; + }; + +}
diff --git a/configurations/homeManager/programs/mcfly.nix b/configurations/homeManager/programs/mcfly.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + + programs.mcfly = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + fuzzySearchFactor = 2; + }; + +}
diff --git a/configurations/homeManager/programs/micro.nix b/configurations/homeManager/programs/micro.nix @@ -0,0 +1,38 @@ +{ pkgs, lib, ... }: + +{ + + home = { + sessionVariables.EDITOR = "micro"; + shellAliases.nano = "micro"; + }; + + programs.micro = { + enable = true; + settings = { + "*.nix".tabstospaces = true; + "*.nix".tabmovement = true; + "*.nix".tabsize = 2; + + "*.nim".tabstospaces = true; + "*.nim".tabmovement = true; + "*.nim".tabsize = 2; + + scrollbar = true; + eofnewline = false; + wordwrap = true; + softwrap = true; + + ignorecase = true; + savehistory = false; + }; + }; + + xdg = lib.mkIf pkgs.stdenv.isLinux { + desktopEntries.micro = { + name = "micro"; + settings.NoDisplay = "true"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/mpv.nix b/configurations/homeManager/programs/mpv.nix @@ -0,0 +1,15 @@ +{ config, pkgs, lib, ... }: + +{ + + programs = { + mpv.enable = true; + mpv.scripts = [ pkgs.mpvScripts.mpris ]; + }; + + xdg.desktopEntries = { + umpv.name = "umpv Media Player"; + umpv.settings.NoDisplay = "true"; + }; + +}
diff --git a/configurations/homeManager/programs/nix-cleanup.nix b/configurations/homeManager/programs/nix-cleanup.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + + home.packages = [ (pkgs.writeShellScriptBin "nix-cleanup" '' + set -eu + + # Delete everything from this profile that isn't currently needed + nix-env --delete-generations old + + # Delete generations older than a week + nix-collect-garbage + nix-collect-garbage --delete-older-than 7d + + # Optimize + nix-store --gc --print-dead + nix-store --optimise + '') ]; + +}
diff --git a/configurations/homeManager/programs/ocrmypdf.nix b/configurations/homeManager/programs/ocrmypdf.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.ocrmypdf ]; + +}
diff --git a/configurations/homeManager/programs/paper-plane.nix b/configurations/homeManager/programs/paper-plane.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.paper-plane ]; + +}+ \ No newline at end of file
diff --git a/configurations/homeManager/programs/password-store.nix b/configurations/homeManager/programs/password-store.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, ... }: + +{ + + home = { + packages = [ pkgs.pwgen ]; + sessionVariables = { + PASSWORD_STORE_DIR = lib.mkForce "\$HOME/.local/share/password-store"; + }; + }; + + programs = { + password-store = { + enable = true; + package = pkgs.pass.withExtensions (exts: [ + exts.pass-otp + exts.pass-update + exts.pass-genphrase + ]); + }; + + browserpass = { + enable = true; + browsers = [ "firefox" ]; + }; + }; + +}
diff --git a/configurations/homeManager/programs/phockup.nix b/configurations/homeManager/programs/phockup.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.phockup ]; + +}
diff --git a/configurations/homeManager/programs/shellUtilities.nix b/configurations/homeManager/programs/shellUtilities.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: + +{ + + programs.jq.enable = true; + + home.shellAliases = { + ".." = "cd .."; + "..." = "cd ../.."; + + rm = "trash-put"; + + diff = "diff --color"; + + killall = "pkill"; + + grep = "rg"; + find = "fd"; + + backgrounditems = "bgiparser -f \"\$HOME/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm\" -c"; + + zzz = ( + if pkgs.stdenv.isLinux then + "sleep 1 && systemctl suspend" + else + "pmset sleepnow" + ); + }; + + home.packages = with pkgs; [ + coreutils + trash-cli + + wget + curl + rsync + + ripgrep + fd + + fx + file + bc + + unzip + + smartmontools + + gptfdisk + e2fsprogs + dosfstools + ] ++ (if pkgs.stdenv.isLinux then [ + usbutils + pciutils + + lm_sensors + ] else []); + +}
diff --git a/configurations/homeManager/programs/ssh.nix b/configurations/homeManager/programs/ssh.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + + programs.ssh = { + enable = true; + compression = true; + + controlMaster = "auto"; + controlPersist = "2m"; + + matchBlocks = { + "ctucx-git" = { + user = "git"; + hostname = "hector.ctu.cx"; + }; + }; + }; + +}
diff --git a/configurations/homeManager/programs/starship.nix b/configurations/homeManager/programs/starship.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + + programs.starship = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + settings = { + add_newline = false; + status = { + disabled = false; + }; + }; + }; + +}
diff --git a/configurations/homeManager/programs/texlive.nix b/configurations/homeManager/programs/texlive.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.texlive.combined.scheme-full ]; + +}
diff --git a/configurations/homeManager/programs/thunderbird.nix b/configurations/homeManager/programs/thunderbird.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, ... }: + +{ + + home.packages = [ pkgs.thunderbird ]; + + systemd.user.services.thunderbird = lib.mkIf config.wayland.windowManager.sway.enable { + Unit.After = [ "graphical-session-pre.target" ]; + Unit.PartOf = [ "graphical-session.target" ]; + + Service = { + Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"; + ExecStart = "${pkgs.thunderbird}/bin/thunderbird"; + Restart = "always"; + RestartSec = 5; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + + wayland.windowManager.sway.config.startup = [ + { always = true; command = "systemctl --user restart thunderbird"; } + ]; + + xdg = { + enable = true; + mime.enable = true; + + #force hm to override existing mimeapps.list file + configFile."mimeapps.list".force = true; + + mimeApps.enable = true; + mimeApps.defaultApplications = { + "x-scheme-handler/mailto" = "thunderbird.desktop"; + }; + }; + +}
diff --git a/configurations/homeManager/programs/tmux.nix b/configurations/homeManager/programs/tmux.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: + +{ + + programs.tmux = { + enable = true; + clock24 = true; + terminal = "xterm-256color"; + extraConfig = '' + set -g mouse on + ''; + }; + +}
diff --git a/configurations/homeManager/programs/tuba.nix b/configurations/homeManager/programs/tuba.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: + +{ + + home.packages = [ pkgs.tuba ]; + + dconf.settings = with lib.hm.gvariant; { + "dev/geopjr/Tuba" = { + work-in-background = true; + dim-trivial-notifications = true; + group-push-notifications = true; + reply-to-old-post-reminder = false; + show-spoilers = true; + }; + }; + +}
diff --git a/configurations/homeManager/programs/typst.nix b/configurations/homeManager/programs/typst.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + + home.packages = with pkgs; [ + typst + typst-live + ]; + +}
diff --git a/configurations/homeManager/programs/yt-dlp.nix b/configurations/homeManager/programs/yt-dlp.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: + +{ + + home.shellAliases.yt-dlp-audio = "yt-dlp --format bestaudio -x --audio-format opus --add-metadata --embed-thumbnail"; + + home.packages = with pkgs; [ + yt-dlp + (pkgs.writeShellScriptBin "youtube-dl" '' + exec ${pkgs.yt-dlp}/bin/yt-dlp --compat-options youtube-dl "$@" + '') + ]; + +}
diff --git a/configurations/homeManager/programs/zathura.nix b/configurations/homeManager/programs/zathura.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.zathura ]; + +}
diff --git a/configurations/homeManager/services/easyeffects.nix b/configurations/homeManager/services/easyeffects.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +{ + + home.packages = [ pkgs.easyeffects ]; + + systemd.user.services.easyeffects = { + Unit.After = [ "graphical-session-pre.target" ]; + Unit.PartOf = [ "graphical-session.target" ]; + + Service = { + Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"; + ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service"; + Restart = "always"; + RestartSec = 5; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + + wayland.windowManager.sway.config.startup = [ + { always = true; command = "systemctl --user restart easyeffects"; } + ]; + +}
diff --git a/configurations/homeManager/services/mako.nix b/configurations/homeManager/services/mako.nix @@ -0,0 +1,37 @@ +{ ... }: + +{ + + services.mako = { + enable = true; + + defaultTimeout = 20000; + + borderColor = "#002028"; + borderSize = 2; + + backgroundColor = "#002b36AA"; + + textColor = "#fdf6e3"; + font = "Fira Code 11"; + format = "<b>%s</b> <span color=\"#93a1a1\">(%a)</span>\\n%b"; + }; + + systemd.user.services.mako = { + Unit.After = [ "graphical-session-pre.target" ]; + Unit.PartOf = [ "graphical-session.target" ]; + + Service = { + ExecStart = "${pkgs.mako}/bin/mako"; + Restart = "always"; + RestartSec = 5; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + + wayland.windowManager.sway.config.startup = [ + { always = true; command = "systemctl --user restart mako"; } + ]; + +}+ \ No newline at end of file
diff --git a/configurations/homeManager/services/waybar.nix b/configurations/homeManager/services/waybar.nix @@ -0,0 +1,196 @@ +{ pkgs, ... }: + +{ + + wayland.windowManager.sway.config.startup = [ + { always = true; command = "systemctl --user restart waybar"; } + ]; + + systemd.user.services.waybar.Service.Environment = "PATH=$PATH:${pkgs.iwd}/bin"; + + programs.waybar = { + enable = true; + systemd.enable = true; + + package = pkgs.waybar.override { + hyprlandSupport = false; + }; + + settings = [{ + layer = "top"; + position = "top"; + + height = 40; + + modules-left = [ "sway/workspaces" "sway/mode" ]; + modules-center = [ "clock" ]; + modules-right = [ + "tray" "disk" "memory" "cpu" "idle_inhibitor" "network#wifi" "battery" "pulseaudio" + ]; + + "sway/workspaces" = { + disable-scroll = true; + }; + + "sway/mode" = { + tooltip = false; + format = "<span style=\"italic\">{}</span>"; + }; + + clock = { + interval = 1; + format = "{:%H:%M:%S}"; + format-alt = "{:%Y-%m-%d}"; + tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; + }; + + tray = { + tooltip = false; + # icon-size = 21; + spacing = 10; + }; + + disk = { + format = " {}%"; + tooltip-format = "SSD: {used} / {total} used"; + }; + + memory = { + format = " {}%"; + tooltip-format = "RAM: {used:0.1f}G / {total:0.1f}G used"; + }; + + cpu = { + format = " {usage}%"; + tooltip = false; + }; + + battery = { + bat = "BAT0"; + adapter = "AC"; + interval = 10; + full-at = 99; + states = { + full = 100; + good = 99; + warning = 40; + critical = 15; + }; + + format = "{icon} <span color='white'>{capacity}%</span>"; + format-charging = " <span color='white'>{capacity}%</span>"; + format-plugged = " <span color='white'>{capacity}%</span>"; + format-empty = ""; + format-full = ""; + format-icons = ["" "" "" "" ""]; + }; + + "network#wifi" = { + interface = "wlan0*"; + tooltip-format = "{ifname}: {ipaddr}/{cidr}"; + + on-click = "${pkgs.rofi-wayland}/bin/rofi -show wifi -modi 'wifi:${pkgs.rofi-iwd-wifi-menu}/bin/iwdrofimenu'"; + + format-ethernet = ""; + format-wifi = " {essid} ({signalStrength}%)"; + format-linked = ""; + format-disconnected = ""; + }; + + pulseaudio = { + scroll-step = 1; + on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; + + format = "{format_source} {icon} {volume}%"; + format-bluetooth = "{format_source} {icon} {volume}%"; + format-bluetooth-muted = "{format_source} "; + format-muted = "{format_source} "; + format-source = ""; + format-source-muted = ""; + format-icons = { + headphone = ""; + phone = ""; + portable = ""; + car = ""; + default = ["" "" ""]; + }; + }; + + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + }]; + + style = '' + @keyframes blink { + to { + background: transparent; + color: #fff; + } + } + + * { + font-family: 'Noto Sans'; + font-size: 15px; + border: none; + border-radius: 0; + min-height: 0; + transition: none; + box-shadow: none; + } + + window#waybar { + /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); */ + background: rgba(0, 0, 0, 0.5); + color: white; + border-bottom: 2px solid rgba(59, 135, 86, 0.5); + } + + #workspaces button.focused { + background: rgba(255, 255, 255, 0.1); + border-bottom: 3px solid rgb(74, 169, 108); + } + + #workspaces button:hover { + background: rgba(255, 255, 255, 0.06); + } + + #clock { + font-size: 16px; + font-family: 'Noto Mono', monospace; + } + + #disk, #memory, #cpu, #idle_inhibitor, #battery, #pulseaudio, #network { + padding: 0px 15px; + } + + #battery { + color: #a3be8c; + } + + #battery.charging { + color: #a3be8c; + } + + #battery.critical:not(.charging) { + background: rgba(245, 60, 60, 0.4); + color: #fff; + + border-radius: 15px; + margin: 6px; + + animation-name: blink; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + } + ''; + }; + }; + +}
diff --git a/configurations/homeManager/services/wlsunset.nix b/configurations/homeManager/services/wlsunset.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + + services.wlsunset = { + enable = true; + latitude = "8.26"; + longitude = "49.01"; + temperature = { + night = 3000; + day = 4500; + }; + }; + +}
diff --git a/configurations/nixos/configure/bluetooth.nix b/configurations/nixos/configure/bluetooth.nix @@ -9,7 +9,7 @@ services.blueman.enable = true; - home-manager.users.katha = { + home-manager.users.katja = { home.packages = [ pkgs.blueman ]; xdg = {
diff --git a/configurations/nixos/configure/easyeffects.nix b/configurations/nixos/configure/easyeffects.nix @@ -1,27 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.easyeffects ]; - - systemd.user.services.easyeffects = { - Unit.After = [ "graphical-session-pre.target" ]; - Unit.PartOf = [ "graphical-session.target" ]; - - Service = { - Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"; - ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service"; - Restart = "always"; - RestartSec = 5; - }; - - Install.WantedBy = [ "graphical-session.target" ]; - }; - - wayland.windowManager.sway.config.startup = [ - { always = true; command = "systemctl --user restart easyeffects"; } - ]; - }; - -}
diff --git a/configurations/nixos/configure/mako.nix b/configurations/nixos/configure/mako.nix @@ -1,39 +0,0 @@ -{ ... }: - -{ - - home-manager.users.katja = { - services.mako = { - enable = true; - - defaultTimeout = 20000; - - borderColor = "#002028"; - borderSize = 2; - - backgroundColor = "#002b36AA"; - - textColor = "#fdf6e3"; - font = "Fira Code 11"; - format = "<b>%s</b> <span color=\"#93a1a1\">(%a)</span>\\n%b"; - }; - - systemd.user.services.mako = { - Unit.After = [ "graphical-session-pre.target" ]; - Unit.PartOf = [ "graphical-session.target" ]; - - Service = { - ExecStart = "${pkgs.mako}/bin/mako"; - Restart = "always"; - RestartSec = 5; - }; - - Install.WantedBy = [ "graphical-session.target" ]; - }; - - wayland.windowManager.sway.config.startup = [ - { always = true; command = "systemctl --user restart mako"; } - ]; - }; - -}- \ No newline at end of file
diff --git a/configurations/nixos/configure/waybar.nix b/configurations/nixos/configure/waybar.nix @@ -1,202 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - - wayland.windowManager.sway.config.startup = [ - { always = true; command = "systemctl --user restart waybar"; } - ]; - - systemd.user.services.waybar.Service.Environment = "PATH=$PATH:${pkgs.iwd}/bin"; - - programs = { - waybar = { - enable = true; - systemd.enable = true; - - package = pkgs.waybar.override { - hyprlandSupport = false; - }; - - settings = [{ - layer = "top"; - position = "top"; - - height = 40; - - modules-left = [ "sway/workspaces" "sway/mode" ]; - modules-center = [ "clock" ]; - modules-right = [ - "tray" "disk" "memory" "cpu" "idle_inhibitor" "network#wifi" "battery" "pulseaudio" - ]; - - "sway/workspaces" = { - disable-scroll = true; - }; - - "sway/mode" = { - tooltip = false; - format = "<span style=\"italic\">{}</span>"; - }; - - clock = { - interval = 1; - format = "{:%H:%M:%S}"; - format-alt = "{:%Y-%m-%d}"; - tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; - }; - - tray = { - tooltip = false; -# icon-size = 21; - spacing = 10; - }; - - disk = { - format = " {}%"; - tooltip-format = "SSD: {used} / {total} used"; - }; - - memory = { - format = " {}%"; - tooltip-format = "RAM: {used:0.1f}G / {total:0.1f}G used"; - }; - - cpu = { - format = " {usage}%"; - tooltip = false; - }; - - battery = { - bat = "BAT0"; - adapter = "AC"; - interval = 10; - full-at = 99; - states = { - full = 100; - good = 99; - warning = 40; - critical = 15; - }; - - format = "{icon} <span color='white'>{capacity}%</span>"; - format-charging = " <span color='white'>{capacity}%</span>"; - format-plugged = " <span color='white'>{capacity}%</span>"; - format-empty = ""; - format-full = ""; - format-icons = ["" "" "" "" ""]; - }; - - "network#wifi" = { - interface = "wlan0*"; - tooltip-format = "{ifname}: {ipaddr}/{cidr}"; - - on-click = "${pkgs.rofi-wayland}/bin/rofi -show wifi -modi 'wifi:${pkgs.rofi-iwd-wifi-menu}/bin/iwdrofimenu'"; - - format-ethernet = ""; - format-wifi = " {essid} ({signalStrength}%)"; - format-linked = ""; - format-disconnected = ""; - }; - - pulseaudio = { - scroll-step = 1; - on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; - - format = "{format_source} {icon} {volume}%"; - format-bluetooth = "{format_source} {icon} {volume}%"; - format-bluetooth-muted = "{format_source} "; - format-muted = "{format_source} "; - format-source = ""; - format-source-muted = ""; - format-icons = { - headphone = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - }; - - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - }; - }]; - - style = '' - @keyframes blink { - to { - background: transparent; - color: #fff; - } - } - - * { - font-family: 'Noto Sans'; - font-size: 15px; - border: none; - border-radius: 0; - min-height: 0; - transition: none; - box-shadow: none; - } - - window#waybar { - /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); */ - background: rgba(0, 0, 0, 0.5); - color: white; - border-bottom: 2px solid rgba(59, 135, 86, 0.5); - } - - #workspaces button.focused { - background: rgba(255, 255, 255, 0.1); - border-bottom: 3px solid rgb(74, 169, 108); - } - - #workspaces button:hover { - background: rgba(255, 255, 255, 0.06); - } - - #clock { - font-size: 16px; - font-family: 'Noto Mono', monospace; - } - - #disk, #memory, #cpu, #idle_inhibitor, #battery, #pulseaudio, #network { - padding: 0px 15px; - } - - #battery { - color: #a3be8c; - } - - #battery.charging { - color: #a3be8c; - } - - #battery.critical:not(.charging) { - background: rgba(245, 60, 60, 0.4); - color: #fff; - - border-radius: 15px; - margin: 6px; - - animation-name: blink; - animation-duration: 1s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - ''; - - }; - }; - - }; - -}
diff --git a/configurations/nixos/configure/wlsunset.nix b/configurations/nixos/configure/wlsunset.nix @@ -1,17 +0,0 @@ -{ ... }: - -{ - - home-manager.users.katja = { - services.wlsunset = { - enable = true; - latitude = "8.26"; - longitude = "49.01"; - temperature = { - night = 3000; - day = 4500; - }; - }; - }; - -}
diff --git a/configurations/nixos/configure/xdg.nix b/configurations/nixos/configure/xdg.nix @@ -1,24 +0,0 @@ -{ ... }: - -{ - - home-manager.users.katja = { - xdg = { - enable = true; - mime.enable = true; - - userDirs = { - enable = true; - desktop = "\$HOME/Desktop"; - documents = "\$HOME/Documents"; - download = "\$HOME/Downloads"; - videos = "\$HOME/Videos"; - music = "\$HOME/Music"; - pictures = "\$HOME/Pictures"; - publicShare = "\$HOME/Public"; - templates = "\$HOME/Templates"; - }; - }; - }; - -}
diff --git a/configurations/nixos/programs/alacritty.nix b/configurations/nixos/programs/alacritty.nix @@ -1,62 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - - home.sessionVariables = { - TERMINAL = "alacritty"; - }; - - programs = { - alacritty = { - enable = true; - settings = { - window.opacity = 0.9; - - font = { - size = 12.0; - normal.family = "DejaVu Sans Mono"; - }; - - colors = { - primary = { - background = "0x000000"; - foreground = "0xeaeaea"; - }; - - normal = { - black = "0x6c6c6c"; - red = "0xe9897c"; - green = "0xb6e77d"; - yellow = "0xecebbe"; - blue = "0xa9cdeb"; - magenta = "0xea96eb"; - cyan = "0xc9caec"; - white = "0xf2f2f2"; - }; - - bright = { - black = "0x747474"; - red = "0xf99286"; - green = "0xc3f786"; - yellow = "0xfcfbcc"; - blue = "0xb6defb"; - magenta = "0xfba1fb"; - cyan = "0xd7d9fc"; - white = "0xe2e2e2"; - }; - }; - }; - }; - }; - - wayland.windowManager.sway = { - config.terminal = "${pkgs.alacritty}/bin/alacritty"; - extraConfig = '' - exec swaymsg 'workspace 3: Term; exec ${pkgs.alacritty}/bin/alacritty; exec ${pkgs.alacritty}/bin/alacritty; workspace 1: Web;' - ''; - }; - }; - -}
diff --git a/configurations/nixos/programs/firefox.nix b/configurations/nixos/programs/firefox.nix @@ -1,239 +0,0 @@ -{ inputs, config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.sessionVariables = { - BROWSER = "firefox"; - }; - - home.file."firefox-gnome-theme" = { - source = inputs.firefoxGnomeTheme; - target = ".mozilla/firefox/katja/chrome/firefox-gnome-theme"; - }; - - programs = { - firefox = { - enable = true; - package = pkgs.firefox; - nativeMessagingHosts = [ pkgs.ff2mpv-rust ]; - - profiles.katja = { - id = 0; - isDefault = true; - - settings = { - # required for firefox-gnome-theme - "browser.toolbars.bookmarks.visibility" = "never"; - "browser.tabs.drawInTitlebar" = true; - "browser.theme.dark-private-windows" = false; - "browser.uidensity" = 0; - "svg.context-properties.content.enabled" = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - }; - - userChrome = '' - @import "firefox-gnome-theme/userChrome.css"; - ''; - - userContent = '' - @import "firefox-gnome-theme/userContent.css"; - ''; - - search.force = true; # Required to prevent search engine symlink being overwritten. See https://github.com/nix-community/home-manager/issues/3698 - search.engines = { - "Noogle" = { - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@noogle" ]; - urls = [{ template = "https://noogle.dev/q?term={searchTerms}"; }]; - }; - - "NixOS Options" = { - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nixos" ]; - urls = [{ template = "https://search.nixos.org/options?query={searchTerms}"; }]; - }; - - "Nix Packages" = { - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nixpkgs" ]; - urls = [{ template = "https://search.nixos.org/packages?query={searchTerms}"; }]; - }; - }; - }; - - policies = { - # disable tracking bullshit - DisableTelemetry = true; - DisablePocket = true; - - # disable password manager - PasswordManagerEnabled = false; - OfferToSaveLogins = false; - PrimaryPassword = false; - AutofillCreditCardEnabled = false; - - # disable bookmark-toolbar - NoDefaultBookmarks = true; - DisplayBookmarksToolbar = "never"; - - Homepage.StartPage = "previous-session"; - Homepage.Locked = true; - - # disable DoH - DNSOverHTTPS.Enabled = false; - DNSOverHTTPS.Locked = true; - - # enable tracking protection - EnableTrackingProtection.Cryptomining = true; - EnableTrackingProtection.Fingerprinting = true; - EnableTrackingProtection.Value = true; - EnableTrackingProtection.Locked = true; - - UserMessaging.ExtensionRecommendations = false; - UserMessaging.FeatureRecommendations = false; - UserMessaging.UrlbarInterventions = false; - UserMessaging.SkipOnboarding = true; - UserMessaging.MoreFromMozilla = false; - UserMessaging.FirefoxLabs = false; - UserMessaging.Locked = true; - - Handlers.schemes.dbnav = { - action = "useHelperApp"; - ask = true; - handlers = [{ - name = "VDV PKPass DB Navigator Hook"; - path = pkgs.writeShellScript "db-hook" '' - #!/usr/bin/env bash - - if [[ "$1" == "dbnav:"* ]]; then - url=$(echo -n $1 | base64) - xdg-open "https://vdv-pkpass.magicalcodewit.ch/account/db_login/callback?url=$url" - else - xdg-open "$1" - fi - ''; - }]; - }; - - Preferences = { - "browser.uiCustomization.state".Status = "default"; - "browser.uiCustomization.state".Value = builtins.toJSON { - currentVersion = 21; - newElementCount = 7; - seen = []; - dirtyAreaCache = []; - placements = { - widget-overflow-fixed-list = []; - toolbar-menubar = [ "menubar-items" ]; - vertical-tabs = []; - PersonalToolbar = []; - unified-extensions-area = []; - nav-bar = [ - "back-button" - "forward-button" - "vertical-spacer" - "stop-reload-button" - "urlbar-container" - "downloads-button" - "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" - "ublock0_raymondhill_net-browser-action" - "unified-extensions-button" - ]; - TabsToolbar = [ "tabbrowser-tabs" "new-tab-button" ]; - }; - }; - } // ({ - # disable some password-manager/autofill features - "signon.generation.enabled" = false; - "signon.autofillForms" = false; - "signon.firefoxRelay.feature" = "disabled"; - "signon.management.page.breach-alerts.enabled" = false; - - # ask websites to not share or sell data - "privacy.globalprivacycontrol.enabled" = true; - - # disable warning on `abou:config` - "browser.aboutConfig.showWarning" = false; - - # disable telemetry stuff - "browser.ping-centre.telemetry" = false; - "browser.topsites.contile.enabled" = false; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - - # disable trending search suggestions - "browser.urlbar.suggest.trending" = false; - - # disable 'fancy' newtab page bullshit with tons of tracking and ads - "browser.startup.homepage" = "chrome://browser/content/blanktab.html"; - "browser.newtabpage.enabled" = false; - "browser.newtabpage.activity-stream.telemetry" = false; - "browser.newtabpage.activity-stream.showSearch" = false; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; - "browser.newtabpage.activity-stream.feeds.topsites" = false; - "browser.newtabpage.activity-stream.feeds.snippets" = false; - "browser.newtabpage.activity-stream.feeds.system.topsites" = false; - "browser.newtabpage.activity-stream.feeds.section.highlights" = false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; - "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false; - "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false; - "browser.newtabpage.activity-stream.section.highlights.includeVisited" = false; - } |> lib.mapAttrs (name: value: { - Status = "locked"; - Value = value; - })); - - ExtensionSettings = ([ - [ "navbar" "{446900e4-71c2-419f-a6a7-df9c091e268b}" ] # Bitwarden Password Manager - [ "navbar" "uBlock0@raymondhill.net" ] # uBlock Origin - [ "menupanel" "@ublacklist" ] # uBlacklist - [ "menupanel" "@contain-facebook" ] # Facebook Container - [ "menupanel" "@contain-google" ] # Google Container - [ "menupanel" "containerise@kinte.sh" ] # Containerise - [ "menupanel" "{12cf650b-1822-40aa-bff0-996df6948878}" ] # cookies.txt - [ "menupanel" "@testpilot-containers" ] # Firefox Multi-Account Containers - [ "menupanel" "{252ee273-8c8d-4609-b54d-62ae345be0a1}" ] # IndicateTLS - [ "menupanel" "ipvfoo@pmarks.net" ] # IPvFoo - [ "menupanel" "{e9090647-32ff-48e4-9c3c-1361e8fd270e}" ] # Modern for Wikipedia - [ "menupanel" "sponsorBlocker@ajay.app" ] # SponsorBlock for YouTube - Skip Sponsorships - [ "menupanel" "de-DE@dictionaries.addons.mozilla.org" ] # German Dictionary - ] |> lib.map (config: { name = (lib.elemAt config 1); value = { - installation_mode = "normal_installed"; - default_area = (lib.elemAt config 0); - install_url = "https://addons.mozilla.org/firefox/downloads/latest/${lib.elemAt config 1}/latest.xpi"; - }; }) |> lib.listToAttrs); - }; - }; - }; - - wayland.windowManager.sway.config.startup = [ - { command = "firefox"; } - ]; - - xdg = { - enable = true; - mime.enable = true; - - #force hm to override existing mimeapps.list file - configFile."mimeapps.list".force = true; - - mimeApps = { - enable = true; - defaultApplications = { - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "x-scheme-handler/chrome" = "firefox.desktop"; - - "image/svg+xml" = "firefox.desktop"; - - "text/html" = "firefox.desktop"; - "text/xml" = "firefox.desktop"; - }; - }; - }; - - }; - -}
diff --git a/configurations/nixos/programs/fractal.nix b/configurations/nixos/programs/fractal.nix @@ -1,9 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.fractal ]; - }; - -}- \ No newline at end of file
diff --git a/configurations/nixos/programs/imv.nix b/configurations/nixos/programs/imv.nix @@ -1,16 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.imv ]; - - xdg.desktopEntries = { - imv-folder = { - name = "imv (Folder)"; - settings.NoDisplay = "true"; - }; - }; - }; - -}
diff --git a/configurations/nixos/programs/libreoffice.nix b/configurations/nixos/programs/libreoffice.nix @@ -1,24 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - - home.packages = [ pkgs.libreoffice-fresh ]; - - xdg.desktopEntries = { - impress.name = "LibreOffice Impress"; - impress.settings.NoDisplay = "true"; - - math.name = "LibreOffice Math"; - math.settings.NoDisplay = "true"; - - base.name = "LibreOffice Base"; - base.settings.NoDisplay = "true"; - - draw.name = "LibreOffice Draw"; - draw.settings.NoDisplay = "true"; - }; - }; - -}
diff --git a/configurations/nixos/programs/mpv.nix b/configurations/nixos/programs/mpv.nix @@ -1,23 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = lib.mkIf config.wm.gnome.enable [ - pkgs.celluloid - ]; - - programs = lib.mkIf (config.wm.gnome.enable != true) { - mpv.enable = true; - mpv.scripts = [ pkgs.mpvScripts.mpris ]; - }; - - xdg = lib.mkIf (config.wm.gnome.enable != true) { - desktopEntries = { - umpv.name = "umpv Media Player"; - umpv.settings.NoDisplay = "true"; - }; - }; - }; - -}
diff --git a/configurations/nixos/programs/paper-plane.nix b/configurations/nixos/programs/paper-plane.nix @@ -1,9 +0,0 @@ -{ pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.paper-plane ]; - }; - -}- \ No newline at end of file
diff --git a/configurations/nixos/programs/thunderbird.nix b/configurations/nixos/programs/thunderbird.nix @@ -1,41 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.thunderbird ]; - - systemd.user.services.thunderbird = lib.mkIf config.home-manager.users.katja.wayland.windowManager.sway.enable { - Unit.After = [ "graphical-session-pre.target" ]; - Unit.PartOf = [ "graphical-session.target" ]; - - Service = { - Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"; - ExecStart = "${pkgs.thunderbird}/bin/thunderbird"; - Restart = "always"; - RestartSec = 5; - }; - - Install.WantedBy = [ "graphical-session.target" ]; - }; - - wayland.windowManager.sway.config.startup = [ - { always = true; command = "systemctl --user restart thunderbird"; } - ]; - - xdg = { - enable = true; - mime.enable = true; - - #force hm to override existing mimeapps.list file - configFile."mimeapps.list".force = true; - - mimeApps.enable = true; - mimeApps.defaultApplications = { - "x-scheme-handler/mailto" = "thunderbird.desktop"; - }; - }; - - }; - -}
diff --git a/configurations/nixos/programs/tuba.nix b/configurations/nixos/programs/tuba.nix @@ -1,19 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.tuba ]; - - dconf.settings = with inputs.home-manager.lib.hm.gvariant; { - "dev/geopjr/Tuba" = { - work-in-background = true; - dim-trivial-notifications = true; - group-push-notifications = true; - reply-to-old-post-reminder = false; - show-spoilers = true; - }; - }; - }; - -}
diff --git a/configurations/nixos/programs/zathura.nix b/configurations/nixos/programs/zathura.nix @@ -1,9 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - home-manager.users.katja = { - home.packages = [ pkgs.zathura ]; - }; - -}
diff --git a/configurations/nixos/wm/gnome.nix b/configurations/nixos/wm/gnome.nix @@ -17,38 +17,15 @@ imports = [ ctucxConfig.configure.mobile-device ctucxConfig.configure.thunderbolt - ctucxConfig.configure.xdg ctucxConfig.configure.fonts ctucxConfig.configure.pipewire ctucxConfig.configure.gvfs ctucxConfig.configure.avahi ctucxConfig.services.syncthing - - ctucxConfig.programs.ssh - ctucxConfig.programs.git - ctucxConfig.programs.gpg - - ctucxConfig.programs.yt-dlp - ctucxConfig.programs.phockup - ctucxConfig.programs.bitwarden-cli -# ctucxConfig.programs.password-store + ctucxConfig.programs.gpg ctucxConfig.programs.ddcutil - - ctucxConfig.programs.firefox - ctucxConfig.programs.thunderbird - - ctucxConfig.programs.fractal - ctucxConfig.programs.tuba - ctucxConfig.programs.paper-plane - - ctucxConfig.programs.typst - ctucxConfig.programs.ocrmypdf - ctucxConfig.programs.libreoffice - - ctucxConfig.programs.mpv - ctucxConfig.programs.ausweisapp ]; @@ -63,8 +40,6 @@ }; }; - boot.plymouth.enable = true; - users.users.katja.extraGroups = [ "dialout" "networkmanager"]; hardware.bluetooth.settings = { @@ -85,6 +60,32 @@ home-manager.users.katja = { manual.html.enable = true; + imports = [ + ctucxConfig.homeManager.configure.xdg + + ctucxConfig.homeManager.programs.ghostty + ctucxConfig.homeManager.programs.ssh + ctucxConfig.homeManager.programs.git + + ctucxConfig.homeManager.programs.yt-dlp + ctucxConfig.homeManager.programs.phockup + ctucxConfig.homeManager.programs.bitwarden-cli + # ctucxConfig.homeManager.programs.password-store + + ctucxConfig.homeManager.programs.firefox + ctucxConfig.homeManager.programs.thunderbird + + ctucxConfig.homeManager.programs.fractal + ctucxConfig.homeManager.programs.tuba + ctucxConfig.homeManager.programs.paper-plane + + ctucxConfig.homeManager.programs.typst + ctucxConfig.homeManager.programs.ocrmypdf + ctucxConfig.homeManager.programs.libreoffice + + ctucxConfig.homeManager.programs.celluloid + ]; + home.sessionVariables = { QT_QPA_PLATFORMTHEME = "gnome"; }; @@ -155,6 +156,8 @@ "org/gnome/mutter" = { edge-tiling = true; dynamic-workspaces = false; + # Enable fractional scaling + experimental-features = [ "scale-monitor-framebuffer" ]; }; "org/gnome/desktop/wm/preferences" = {
diff --git a/configurations/nixos/wm/sway.nix b/configurations/nixos/wm/sway.nix @@ -2,6 +2,22 @@ { + imports = [ + ctucxConfig.configure.mobileDevice + ctucxConfig.configure.thunderbolt + ctucxConfig.configure.fonts + ctucxConfig.configure.bluetooth + + ctucxConfig.services.swaylock + ctucxConfig.services.pipewire + ctucxConfig.services.syncthing + + ctucxConfig.programs.ddcutil + ctucxConfig.programs.ausweisapp + ctucxConfig.programs.thunar + ctucxConfig.programs.gpg + ]; + users.users.katja.extraGroups = [ "dialout" ]; nixpkgs.config.allowUnfree = true; @@ -27,8 +43,36 @@ home-manager.users.katja = { manual.html.enable = true; + services.gnome-keyring.enable = true; + imports = [ + ctucxConfig.homeManager.configure.xdg + + ctucxConfig.homeManager.services.waybar + ctucxConfig.homeManager.services.mako + ctucxConfig.homeManager.services.wlsunset + ctucxConfig.homeManager.services.easyeffects + + ctucxConfig.homeManager.programs.alacritty + ctucxConfig.homeManager.programs.git + ctucxConfig.homeManager.programs.ssh + + ctucxConfig.homeManager.programs.firefox + ctucxConfig.homeManager.programs.thunderbird + ctucxConfig.homeManager.programs.fractal + ctucxConfig.homeManager.programs.tuba + ctucxConfig.homeManager.programs.paper-plane + + ctucxConfig.homeManager.programs.libreoffice + + ctucxConfig.homeManager.programs.zathura + ctucxConfig.homeManager.programs.imv + ctucxConfig.homeManager.programs.mpv + + ctucxConfig.homeManager.programs.bitwarden-cli + ]; + home.sessionVariables = { QT_QPA_PLATFORMTHEME = "gnome"; }; @@ -55,52 +99,6 @@ gtk-recent-files-limit = 10; }; }; - - }; - - ctucxConfig = { - configure = { - mobileDevice = false; - thunderbolt = true; - fonts = true; - xdg = true; - bluetooth = true; - }; - - wm.sway.enable = true; - - services = { - swaylock.enable = true; - waybar.enable = true; - mako.enable = true; - wlsunset.enable = true; - - pipewire.enable = true; - easyeffects.enable = true; - - syncthing.enable = true; - }; - - programs = { - ddcutil.enable = true; - alacritty.enable = true; - - firefox.enable = true; - thunderbird.enable = true; - fractal.enable = true; - tuba.enable = true; - paper-plane.enable = true; - - libreoffice.enable = true; - ausweisapp.enable = true; - - thunar.enable = true; - zathura.enable = true; - imv.enable = true; - mpv.enable = true; - - bitwarden-cli.enable = true; - }; }; }
diff --git a/flake.nix b/flake.nix @@ -1,4 +1,4 @@ - { +{ description = "A flake for building my infra"; @@ -36,9 +36,10 @@ in { - ctucxConfig.common = loadDir ./configurations/common; - ctucxConfig.nixos = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/nixos); - ctucxConfig.darwin = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/darwin); + ctucxConfig.homeManager = loadDir ./configurations/homeManager; + ctucxConfig.common = (loadDir ./configurations/common) // { inherit (inputs.self.ctucxConfig) homeManager; }; + ctucxConfig.nixos = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/nixos); + ctucxConfig.darwin = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/darwin); nixosModules = loadDir ./modules/nixos; darwinModules = loadDir ./modules/darwin;
diff --git a/machines/briefkasten/default.nix b/machines/briefkasten/default.nix @@ -7,9 +7,6 @@ ./hardware-configuration.nix ./impermanence.nix - ctucxConfig.programs.yt-dlp - ctucxConfig.programs.ocrmypdf - ctucxConfig.configure.router ctucxConfig.configure.smarthome @@ -28,6 +25,11 @@ ./scanner-sftp.nix ]; + home-manager.users.katja.imports = [ + ctucxConfig.homeManager.programs.yt-dlp + ctucxConfig.homeManager.programs.ocrmypdf + ]; + age.secrets = { restic-server-briefkasten.file = ../../secrets/restic-server/briefkasten.age; restic-server-wanderduene.file = ../../secrets/restic-server/wanderduene.age;