From fb9d0e3ebd7f5b3edd6746b9f247f16c51dce19d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 12 Aug 2024 11:01:16 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 88 +++++++++++++++++++++++----- accounts/gkleen@sif/dunst-settings.nix | 2 +- accounts/gkleen@sif/hyprland.nix | 3 +- system-profiles/core/default.nix | 1 + system-profiles/rebuild-machines/default.nix | 12 ++-- 5 files changed, 85 insertions(+), 21 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index dc505f6d..1cb7c751 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -38,15 +38,25 @@ let --prefix PATH : ${pkgs.pulseaudio}/bin ''; }; - wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or (pkgs.lib.strings.nameFromURL package.name "-"), outBin ? bin, sandbox ? true }: pkgs.runCommand "${package.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } '' - mkdir -p "$out/bin" - makeWrapper ${package}/bin/${bin} $out/bin/${outBin} \ - ${optionalString (!sandbox) "--add-flags '--no-sandbox'"} - ''; + wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or (pkgs.lib.strings.nameFromURL package.name "-"), outBin ? bin, sandbox ? true }: pkgs.symlinkJoin { + name = "${package.name}-wrapped"; + buildInputs = with pkgs; [ makeWrapper ]; + paths = [ package ]; + inherit bin outBin; + postBuild = '' + hidden=$out/bin/."$(basename "$bin")"-wrapped + while [ -e "$hidden" ]; do + hidden="''${hidden}_" + done + mv "$out/bin/$bin" "$hidden" + makeWrapper "$hidden" "$out/bin/$outBin" \ + ${optionalString (!sandbox) "--add-flags '--no-sandbox'"} + ''; + }; wrappedChrome = wrapElectron { package = pkgs.google-chrome; outBin = "google-chrome"; }; wrappedZulip = wrapElectron { package = pkgs.zulip; bin = "zulip"; outBin = "zulip"; }; - wrappedElementDesktop = wrapElectron { package = pkgs.element-desktop; bin = "element-desktop"; outBin = "element"; }; + wrappedElementDesktop = wrapElectron { package = pkgs.element-desktop; bin = "element-desktop"; }; wrappedRocketChatDesktop = wrapElectron { package = pkgs.rocketchat-desktop; bin = "rocketchat-desktop"; outBin = "rocketchat"; }; wrappedYTMDesktop = wrapElectron { package = pkgs.ytmdesktop; sandbox = false; }; @@ -355,7 +365,7 @@ in { }; privacy = { icon-spacing = 6; - icon-size = 12; + icon-size = 11; modules = [ { type = "screenshare"; } { type = "audio-in"; } ]; }; idle_inhibitor = { @@ -423,7 +433,7 @@ in { margin-right: 9px; } - label.module { + .module { margin: 0 5px; } @@ -448,8 +458,15 @@ in { opacity: 0.6; } + #tray { + margin: 0 2px; + } #battery, #idle_inhibitor, #backlight { color: @grey; + margin: 0 5px 0 2px; + } + #backlight, #idle_inhibitor { + margin: 0 7px 0 2px; } #battery.warning { color: @orange; @@ -464,10 +481,17 @@ in { color: @white; } + #idle_inhibitor { + padding-top: 1px; + margin: 0 9px 0 2px; + } + #privacy { color: @red; - margin-right: 4px; - margin-left: 2px; + margin: -1px 2px 0px 5px; + } + #clock { + margin-right: 5px; } ''; }; @@ -514,6 +538,29 @@ in { ]; }; }; + fuzzel = { + enable = true; + settings = { + main = { + terminal = lib.getExe pkgs.kitty; + layer = "overlay"; + icon-theme = "Paper"; + font = "Fira Sans"; + }; + colors = { + background = "000000aa"; + text = "cdd6f4ff"; + match = "94e2d5ff"; + selection = "585b70ff"; + selection-match = "94e2d5ff"; + selection-text = "cdd6f4ff"; + border = "b4befeff"; + }; + dmenu = { + exit-immediately-if-empty = true; + }; + }; + }; }; services = { @@ -709,12 +756,12 @@ in { wrappedKeepassxc sxiv xclip mumble pulseaudio-ctl pamixer libnotify synergy xorg.xbacklight screen-message wrappedYTMDesktop qt5ct playerctl evince thunderbird - wrappedZulip zoom-us steam steam-run wireshark virt-manager + zoom-us steam steam-run wireshark virt-manager rclone cached-nix-shell xournal xmonad worktime - fira-code-symbols libreoffice xournalpp wrappedChrome + fira-code-symbols libreoffice xournalpp google-chrome nixos-shell virt-viewer freerdp gnome-icon-theme - paper-icon-theme sshpassSecret weechat wrappedElementDesktop - matrix-synapse-tools.synadm wrappedRocketChatDesktop + paper-icon-theme sshpassSecret weechat element-desktop + matrix-synapse-tools.synadm flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs sieve-connect gimp inkscape udiskie glab scrot nitrokey-app pynitrokey gtklock wlrctl nvidiaOffloadScript @@ -816,6 +863,19 @@ in { }; }; + xdg.desktopEntries = { + element-lmu = { + name = "Element (LMU)"; + exec = "element-desktop --profile=lmu %u"; + icon = "element"; + genericName = "Matrix Client"; + categories = [ "Network" "InstantMessaging" "Chat" ]; + settings = { + StartupWMClass = "Element"; + }; + }; + }; + fonts = { fontconfig.enable = true; lmu-hausschrift.enable = true; diff --git a/accounts/gkleen@sif/dunst-settings.nix b/accounts/gkleen@sif/dunst-settings.nix index 90fffcc5..72687aea 100644 --- a/accounts/gkleen@sif/dunst-settings.nix +++ b/accounts/gkleen@sif/dunst-settings.nix @@ -33,7 +33,7 @@ sort = false; sticky_history = false; - dmenu = "wofi --show dmenu"; + dmenu = "fuzzel --dmenu"; browser = "${pkgs.xdg-utils}/bin/xdg-open"; }; # shortcuts = { diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index 06d146a0..03afb319 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix @@ -6,7 +6,7 @@ ]; "$terminal" = "kitty"; - "$menu" = "wofi --show run"; + "$menu" = "fuzzel"; exec-once = [ "wpaperd" @@ -130,6 +130,7 @@ "$mainMod, Q, killactive" "$mainMod, V, togglefloating" "$mainMod, D, exec, $menu" + "$mainMod SHIFT, D, exec, $menu --list-executables-in-path" # "$mainMod, J, togglesplit," "$mainMod SHIFT, L, exec, loginctl lock-session" diff --git a/system-profiles/core/default.nix b/system-profiles/core/default.nix index c2c821b7..b1898903 100644 --- a/system-profiles/core/default.nix +++ b/system-profiles/core/default.nix @@ -154,6 +154,7 @@ in { documentation.nixos = { includeAllModules = true; options.warningsAreErrors = false; + extraModuleSources = map toString ([flake] ++ attrValues flakeInputs); }; home-manager = { diff --git a/system-profiles/rebuild-machines/default.nix b/system-profiles/rebuild-machines/default.nix index cc01f66b..544f47e1 100644 --- a/system-profiles/rebuild-machines/default.nix +++ b/system-profiles/rebuild-machines/default.nix @@ -15,7 +15,7 @@ let ''; knownHostsFile = pkgs.writeText "known_hosts" (concatMapStringsSep "\n" (kPath: cfg.repoHost + " " + readFile kPath) (attrValues cfg.repoPubkeys)); - + rebuildScript = pkgs.stdenv.mkDerivation { name = "rebuild-${hostName}"; @@ -52,7 +52,7 @@ in { Name of the script wrapping nixos-rebuild ''; }; - + flake = mkOption { type = types.submodule { options = { @@ -79,7 +79,7 @@ in { type = types.str; default = "git.yggdrasil.li"; }; - + repoUser = mkOption { type = types.str; default = "gitolite"; @@ -88,11 +88,13 @@ in { repoPubkeys = mkOption { type = types.attrsOf types.path; default = genAttrs ["rsa" "ed25519"] (kType: ./ssh-pub + "/${cfg.repoHost}-${kType}.pub"); + defaultText = literalExpression ''genAttrs ["rsa" "ed25519"] (kType: ./ssh-pub + "/''${cfg.repoHost}-''${kType}.pub")''; }; repoPrivkey = mkOption { type = types.path; default = ./ssh + "/${hostName}/private"; + defaultText = literalExpression ''./ssh + "/''${hostName}/private"''; }; sopsName = mkOption { @@ -115,14 +117,14 @@ in { }; }; }; - + config = { assertions = [ { assertion = isNull cfg.sopsConfig || (!(isNull cfg.sopsName)); message = "If option sopsConfig is not null option sopsName may not be null"; } ]; - + sops.secrets = mkIf (!(isNull cfg.sopsConfig)) { "${cfg.sopsName}" = { sopsFile = cfg.repoPrivkey; -- cgit v1.2.3