From 24825b6afac2551c1303cd2f84276be47b845f31 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 24 Jan 2025 09:24:59 +0100 Subject: ... --- accounts/gkleen@sif/default.nix | 1 + accounts/gkleen@sif/libvirt/default.nix | 1 + accounts/gkleen@sif/systemd.nix | 26 +++++++++++++++++++++----- flake.nix | 2 +- hosts/sif/default.nix | 14 +++++++------- hosts/sif/libvirt/default.nix | 1 + 6 files changed, 32 insertions(+), 13 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 7f4879f4..95fa8e48 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -315,6 +315,7 @@ in { device_config = [ { mount_path = "/run/etc-metadata"; ignore = true; } ]; + icon_names.media = ["drive-removable-media-symbolic"]; }; }; network-manager-applet.enable = true; diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index 70ac22b9..4e5a9b90 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix @@ -7,6 +7,7 @@ with flakeInputs.nixVirt.lib; config = { virtualisation.libvirt = { enable = true; + swtpm.enable = true; connections."qemu:///session" = { domains = [ { definition = domain.writeXML (updateManyAttrsByPath [ diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 7e83662f..d3a1a4c7 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -207,10 +207,10 @@ in { RuntimeDirectory = "gtklock"; CacheDirectory = "gtklock"; ExecStartPre = [ - "${lib.getExe' pkgs.libsForQt5.qt5.qttools.bin "qdbus"} org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.KeePassXC.MainWindow.lockAllDatabases" - "${lib.getExe' config.systemd.package "systemctl"} --user stop gpg-agent.service" - "${lib.getExe pkgs.playerctl} -a pause" - (lib.getExe (pkgs.writeShellApplication { + "-${lib.getExe' pkgs.libsForQt5.qt5.qttools.bin "qdbus"} org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.KeePassXC.MainWindow.lockAllDatabases" + "-${lib.getExe' config.systemd.package "systemctl"} --user stop gpg-agent.service" + "-${lib.getExe pkgs.playerctl} -a pause" + "-${lib.getExe (pkgs.writeShellApplication { name = "generate-css"; runtimeInputs = with pkgs; [cfg.programs.wpaperd.package jq coreutils imagemagick findutils]; text = '' @@ -250,7 +250,7 @@ in { EOF done ''; - })) + })}" ]; NotifyAccess = "all"; ExecStart = ''${lib.getExe pkgs.gtklock} -s "''${RUNTIME_DIRECTORY}/style.css" -L ${pkgs.writeShellScript "after-lock" '' @@ -320,6 +320,7 @@ in { }; xembed-sni-proxy = { Unit = { + PartOf = lib.mkForce ["tray.target"]; BindsTo = ["xwayland-satellite.service"]; After = ["xwayland-satellite.service"]; }; @@ -329,6 +330,21 @@ in { After = ["graphical-session.target"]; }; }; + network-manager-applet = { + Unit = { + PartOf = lib.mkForce ["tray.target"]; + }; + }; + udiskie = { + Unit = { + PartOf = lib.mkForce ["tray.target"]; + }; + }; + blueman-applet = { + Unit = { + PartOf = lib.mkForce ["tray.target"]; + }; + }; } // listToAttrs (map ({host, port}: nameValuePair "proxy-to-autossh-socks@${toString port}" { Unit = { Requires = ["autossh-socks@${host}:${toString (port + 1)}.service" "proxy-to-autossh-socks@${toString port}.socket"]; diff --git a/flake.nix b/flake.nix index b5ced0a0..40c4df38 100644 --- a/flake.nix +++ b/flake.nix @@ -335,7 +335,7 @@ nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; homeModules = nixImport rec { dir = ./home-modules; }; - homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; inherit (configuration) home-files; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); + homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" configuration) nixosConfig.config.home-manager.users) self.nixosConfigurations)); overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 7db46c67..9de16de3 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -591,13 +591,13 @@ in { nvidia = { open = true; modesetting.enable = true; - powerManagement.enable = false; - prime = { - nvidiaBusId = "PCI:1:0:0"; - intelBusId = "PCI:0:2:0"; - reverseSync.enable = true; - offload.enableOffloadCmd = true; - }; + powerManagement.enable = true; + # prime = { + # nvidiaBusId = "PCI:1:0:0"; + # intelBusId = "PCI:0:2:0"; + # reverseSync.enable = true; + # offload.enableOffloadCmd = true; + # }; }; graphics = { diff --git a/hosts/sif/libvirt/default.nix b/hosts/sif/libvirt/default.nix index d0be7dff..9712d0d9 100644 --- a/hosts/sif/libvirt/default.nix +++ b/hosts/sif/libvirt/default.nix @@ -8,6 +8,7 @@ with flakeInputs.nixVirt.lib; qemu.swtpm.enable = true; allowedBridges = ["virbr0" "rz-0971" "rz-2403"]; }; + virtualisation.spiceUSBRedirection.enable = true; virtualisation.libvirt = { enable = true; swtpm.enable = true; -- cgit v1.2.3