From 52cbcb19a321f3cfdce812ffed8a28f9eebef957 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Mon, 10 May 2021 03:04:18 +0300 Subject: [PATCH] Update, a2dp, cursor, gpg pinentry --- flake.lock | 48 ++++++++++++++++++-------- modules/hardware.nix | 22 ++++++++++++ modules/workspace/cursor.nix | 4 +++ modules/workspace/gnome3/default.nix | 4 +++ modules/workspace/gpg.nix | 10 +++--- modules/workspace/gtk.nix | 3 -- modules/workspace/i3blocks/default.nix | 12 ++++--- modules/workspace/misc.nix | 1 - modules/workspace/ssh.nix | 7 +--- modules/workspace/sway/default.nix | 6 +++- 10 files changed, 83 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index 78c967d..43a2f25 100644 --- a/flake.lock +++ b/flake.lock @@ -154,11 +154,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1618789951, - "narHash": "sha256-EoQxcVIiaqjUwwTl1YF3zGnXtzEvOUDL3SBZ8ASELvU=", + "lastModified": 1620423550, + "narHash": "sha256-sCUnGE28hagq2nVvypGqxMRz7AiW7ewEQ8j7WTlpm7c=", "owner": "rycee", "repo": "home-manager", - "rev": "6aa6556bcab6dc0f6398b4daa8404d788fd7a6a2", + "rev": "b2dec35b86e8488831734ff7936589d710b47420", "type": "github" }, "original": { @@ -185,6 +185,23 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1617481909, + "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "ref": "VERSION_0_8_4", + "repo": "lowdown", + "type": "github" + } + }, "materia-theme": { "flake": false, "locked": { @@ -224,14 +241,15 @@ }, "nix": { "inputs": { + "lowdown-src": "lowdown-src", "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1618857497, - "narHash": "sha256-N/Nnil1kwtTkagWfjOeBWgzFzK1UwkjQoWcRj/Q+Jqk=", + "lastModified": 1620308124, + "narHash": "sha256-pqh8K3QXin8xSVT3asHCXiTeWFcI3qDBbCLiB1JcHtU=", "owner": "NixOS", "repo": "nix", - "rev": "3cbad4b035939b99683265118d4f01c4b21a7a19", + "rev": "db6ab75caec3ea4f575d7a01a28fd1fd7bc28892", "type": "github" }, "original": { @@ -322,11 +340,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1618864275, - "narHash": "sha256-LreKCrt7mwqmS++ved5RXlVAzo2iZ1Xajeq+g+xuSOw=", + "lastModified": 1620425984, + "narHash": "sha256-RwHSY3jyQ6YAOTjeppfIBcfR+Y/0GNwKOIP3N9MTYQI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4d89f28d78102add4f615783618dd5a437bf6fe", + "rev": "d807301cceaad1073eb9d5175df270e034269018", "type": "github" }, "original": { @@ -367,11 +385,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1618801528, - "narHash": "sha256-1ru9LzP33ElEAZcDzYLgJQG3/uHhAg0LFJEfVZSOPZg=", + "lastModified": 1620340338, + "narHash": "sha256-Op/4K0+Z9Sp5jtFH0s/zMM4H7VFZxrekcAmjQ6JpQ4w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0a5f5bab0e08e968ef25cff393312aa51a3512cf", + "rev": "63586475587d7e0e078291ad4b49b6f6a6885100", "type": "github" }, "original": { @@ -459,11 +477,11 @@ "simple-nixos-mailserver": { "flake": false, "locked": { - "lastModified": 1618765124, - "narHash": "sha256-udEewuJurLwhQR6+16rISPML4N5fTWT5INZpr8x/Sww=", + "lastModified": 1619850087, + "narHash": "sha256-UVVge/7R/4afO+hp+T6MOiZJjMH8LS3VNXEWiRIRPcA=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "f4c8d4b298cdf4364ca1f31668c686e1774d7ab3", + "rev": "8b287056215cac91438a671054e7eb2c932ab21a", "type": "gitlab" }, "original": { diff --git a/modules/hardware.nix b/modules/hardware.nix index bebd222..23b8e0e 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -28,5 +28,27 @@ with deviceSpecific; { enable = true; alsa.enable = true; pulse.enable = true; + media-session.config.bluez-monitor = { + properties = { }; + rules = [ + { + actions = { + update-props = { + "bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ]; + "bluez5.hw-volume" = + [ "hfp_ag" "hsp_ag" "a2dp_source" "a2dp_sink" ]; + }; + }; + matches = [{ "device.name" = "~bluez_card.*"; }]; + } + { + actions = { update-props = { "node.pause-on-idle" = false; }; }; + matches = [ + { "node.name" = "~bluez_input.*"; } + { "node.name" = "~bluez_output.*"; } + ]; + } + ]; + }; }; } diff --git a/modules/workspace/cursor.nix b/modules/workspace/cursor.nix index f3f0b44..9747a1b 100644 --- a/modules/workspace/cursor.nix +++ b/modules/workspace/cursor.nix @@ -13,5 +13,9 @@ home.file.".icons/default".source = "${pkgs.breeze-qt5}/share/icons/breeze_cursors"; + + + home.file.".icons/Breeze".source = + "${pkgs.breeze-qt5}/share/icons/breeze_cursors"; }; } diff --git a/modules/workspace/gnome3/default.nix b/modules/workspace/gnome3/default.nix index 835b13b..eb8a896 100644 --- a/modules/workspace/gnome3/default.nix +++ b/modules/workspace/gnome3/default.nix @@ -61,6 +61,10 @@ thumbnail-limit = 10; }; + "org/gnome/desktop/interface" = { + cursor-theme = "default"; + }; + "org/gnome/evince/default" = { inverted-colors = true; }; diff --git a/modules/workspace/gpg.nix b/modules/workspace/gpg.nix index d8cc694..b5ce730 100644 --- a/modules/workspace/gpg.nix +++ b/modules/workspace/gpg.nix @@ -1,11 +1,13 @@ -{ pkgs, ... }: { - services.dbus.packages = [ pkgs.gcr ]; +{ pkgs, config, ... }: { home-manager.users.balsoft = { services.gpg-agent = { enable = true; enableSshSupport = true; - pinentryFlavor = "gnome3"; + pinentryFlavor = "gtk2"; + }; + programs.gpg = { + enable = true; + homedir = "${config.home-manager.users.balsoft.xdg.dataHome}/gnupg"; }; - programs.gpg.enable = true; }; } diff --git a/modules/workspace/gtk.nix b/modules/workspace/gtk.nix index eede992..71faeab 100644 --- a/modules/workspace/gtk.nix +++ b/modules/workspace/gtk.nix @@ -67,9 +67,6 @@ in { "sftp://balsoft.ru/home/balsoft balsoft.ru" ] ++ map (machine: "sftp://${machine}/home/balsoft ${machine}") (builtins.attrNames inputs.self.nixosConfigurations); - extraConfig = { - gtk-cursor-theme-name = "Breeze"; - }; }; }; diff --git a/modules/workspace/i3blocks/default.nix b/modules/workspace/i3blocks/default.nix index ce2564b..20516e2 100644 --- a/modules/workspace/i3blocks/default.nix +++ b/modules/workspace/i3blocks/default.nix @@ -36,7 +36,11 @@ in { bindingMode = default // { text = thm.yellow; }; }; statusCommand = "${pkgs.i3blocks}/bin/i3blocks"; - fonts = [ "IBM Plex Mono 11" "Material Icons 11" "Roboto Mono 11" ]; + fonts = { + names = [ "IBM Plex Sans" "Material Icons" "Roboto Mono" ]; + style = "Regular"; + size = 12.0; + }; mode = "hide"; position = "bottom"; workspaceNumbers = false; @@ -50,10 +54,10 @@ in { in '' interval=60 markup=pango - '' + genIniOrdered ( - [ (scr "email") ] + '' + genIniOrdered ([ (scr "email") ] ++ [ (scrint "weather" 600) (scr "emacs") (scr "nixos") ] - ++ [ (scrint "youtrack-wage" 3600) (scrint "music" 3) (scrint "sound" 1) ] ++ [ + ++ [ (scrint "youtrack-wage" 3600) (scrint "music" 3) (scrint "sound" 1) ] + ++ [ (scrint "cpu" 5) (scrint "freq" 10) (scr "temperature") diff --git a/modules/workspace/misc.nix b/modules/workspace/misc.nix index 6811771..feae535 100644 --- a/modules/workspace/misc.nix +++ b/modules/workspace/misc.nix @@ -23,7 +23,6 @@ }; systemd.user.startServices = true; - programs.direnv.enable = true; programs.direnv.enableNixDirenvIntegration = true; }; diff --git a/modules/workspace/ssh.nix b/modules/workspace/ssh.nix index 82af804..ce6fee1 100644 --- a/modules/workspace/ssh.nix +++ b/modules/workspace/ssh.nix @@ -12,12 +12,7 @@ services.udev.packages = [ pkgs.yubikey-personalization ]; - home-manager.users.balsoft.home.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh"; - - environment.shellInit = '' - export GPG_TTY="$(tty)" - gpg-connect-agent /bye - ''; + # home-manager.users.balsoft.home.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh"; home-manager.users.balsoft.home.file.".gnupg/scdaemon.conf".text = "reader-port Yubico Yubi"; diff --git a/modules/workspace/sway/default.nix b/modules/workspace/sway/default.nix index 2afc259..b3001a0 100755 --- a/modules/workspace/sway/default.nix +++ b/modules/workspace/sway/default.nix @@ -40,7 +40,11 @@ in { ]; "ﱘ" = [{ app_id = "cantata"; }]; }; - fonts = [ "IBM Plex 9" ]; + fonts = { + names = [ "IBM Plex" ]; + style = "Regular"; + size = 9.0; + }; colors = rec { background = thm.bg;