diff --git a/SwarselSystems.org b/SwarselSystems.org index 497d6e1..c6f61ad 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -495,6 +495,9 @@ Lastly I define some common module lists that I can simply load depending on the #+end_src *** General (outputs) +:PROPERTIES: +:CUSTOM_ID: h:54cd8f65-a3ba-43c3-ae37-5f04383fe720 +:END: In this section I am creating some attributes that define general concepts of my configuration: @@ -4355,6 +4358,9 @@ This utility checks if there are updated packages in nixpkgs-unstable. It does s #+end_src **** github-notifications +:PROPERTIES: +:CUSTOM_ID: h:a9398c4e-4d3b-4942-b03c-192f9c0517e5 +:END: This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version. @@ -8068,6 +8074,9 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi #+end_src ***** yubikey-touch-detector +:PROPERTIES: +:CUSTOM_ID: h:1598c90b-f195-41a0-9132-94612edf3586 +:END: #+begin_src nix :tangle profiles/common/home/yubikey-touch-detector.nix { pkgs, ... }: @@ -8531,16 +8540,6 @@ The rest of the settings is at [[#h:bbf2ecb6-c8ff-4462-b5d5-d45b28604ddf][work]] }; }; - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; - config = { - common = { - default = "wlr"; - }; - }; - }; - xdg.desktopEntries = let terminal = false; diff --git a/index.html b/index.html index 6d4af23..ad0e931 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-This file has 44864 words spanning 11840 lines and was last revised on 2024-08-10 19:22:18 +0200. +This file has 45330 words spanning 11987 lines and was last revised on 2024-08-13 23:29:28 +0200.
@@ -400,7 +400,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-08-10 19:22:18 +0200) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-08-13 23:29:28 +0200)
---prefix=/nix/store/jpzmfjay3cyza16ay1fn550l8dhdqwgm-emacs-pgtk-20240717.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux +--prefix=/nix/store/jh4xny0q3is65dfk9nfmiiipxfvqzl8p-emacs-pgtk-20240810.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux@@ -940,9 +940,9 @@ mixedModules = [ -
In this section I am creating some attributes that define general concepts of my configuration:
@@ -2330,7 +2330,6 @@ My work machine. Built for more security, this is the gold standard of my config wallpaper = ../../wallpaper/lenovowp.png; hasBluetooth = true; hasFingerprint = true; - initialSetup = true; impermanence = false; isBtrfs = true; }; @@ -2392,12 +2391,10 @@ My work machine. Built for more security, this is the gold standard of my config inputs = { "12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = { xkb_layout = "us"; - xkb_options = "grp:win_space_toggle"; xkb_variant = "altgr-intl"; }; "1133:45081:MX_Master_2S_Keyboard" = { xkb_layout = "us"; - xkb_options = "grp:win_space_toggle"; xkb_variant = "altgr-intl"; }; "2362:628:PIXA3854:00_093A:0274_Touchpad" = { @@ -2406,6 +2403,10 @@ My work machine. Built for more security, this is the gold standard of my config natural_scroll = "enabled"; middle_emulation = "enabled"; }; + "1133:50504:Logitech_USB_Receiver" = { + xkb_layout = "us"; + xkb_variant = "altgr-intl"; + }; }; keybindings = { "Mod4+Ctrl+p" = "exec wl-mirror eDP-2"; @@ -4557,6 +4558,7 @@ in opacitytoggle = callPackage ./opacitytoggle { }; fs-diff = callPackage ./fs-diff { }; update-checker = callPackage ./update-checker { }; + github-notifications = callPackage ./github-notifications { }; } @@ -5050,14 +5052,21 @@ This utility checks if there are updated packages in nixpkgs-unstable. It does s
-updates="$(cd ~/.dotfiles && nix flake lock --update-input nixpkgs && nix build .#nixosConfigurations."$HOSTNAME".config.system.build.toplevel && nvd diff /run/current-system ./result | grep -c '\[U')"
+updates="$( { cd /home/swarsel/.dotfiles && nix flake lock --update-input nixpkgs && nix build .#nixosConfigurations."$(eval hostname)".config.system.build.toplevel && nvd diff /run/current-system ./result | grep -c '\[U'; } || true)"
+
+alt="has-updates"
+if [[ $updates -eq 0 ]]; then
+ alt="updated"
+fi
tooltip="System updated"
if [[ $updates != 0 ]]; then
- tooltip=$(cd ~/.dotfiles && nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n' )
+ tooltip=$(cd ~/.dotfiles && nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n' )
+ echo "{ \"text\":\"$updates\", \"alt\":\"$alt\", \"tooltip\":\"$tooltip\" }"
+else
+ echo "{ \"text\":\"\", \"alt\":\"$alt\", \"tooltip\":\"\" }"
fi
-echo "{ \"text\":\"$updates\", \"tooltip\":\"$tooltip\" }"
+This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version. +
+ + +{ writeShellApplication, jq }:
+
+writeShellApplication {
+ name = "github-notifications";
+ runtimeInputs = [ jq ];
+ text = ''
+ count=$(curl -u Swarsel:"$(cat /run/user/1000/secrets/github_notif)" https://api.github.com/notifications | jq '. | length')
+
+ if [[ "$count" != "0" ]]; then
+ echo "{\"text\":\"$count\"}"
+ fi
+ '';
+}
+
+-A friend of mine used this service and I used to make fun of him. But I have to admit this is actually a nice program. It forces you to look away from the screen from time to time, reducing eye strain. -
- -_:
-{
- services.safeeyes.enable = true;
-}
-
-
@@ -6913,6 +6934,8 @@ Normally, doing that also resets the lecture that happens on the first use of
+A friend of mine used this service and I used to make fun of him. But I have to admit this is actually a nice program. It forces you to look away from the screen from time to time, reducing eye strain. +
+ +_:
+{
+ services.safeeyes.enable = true;
+}
+
+_:
+{ lib, ... }:
{
programs.git = {
enable = true;
@@ -8065,8 +8110,8 @@ Here I set up my git config, automatic signing of commits, useful aliases for my
key = "0x76FD3810215AE097";
signByDefault = true;
};
- userEmail = "leon.schwarzaeugl@gmail.com";
- userName = "Swarsel";
+ userEmail = lib.mkDefault "leon.schwarzaeugl@gmail.com";
+ userName = "Leon Schwarzäugl";
difftastic.enable = true;
lfs.enable = true;
includes = [
@@ -8567,7 +8612,7 @@ The rest of the related configuration is found here:
layer = "top";
position = "top";
modules-left = [ "sway/workspaces" "custom/outer-right-arrow-dark" "sway/window" ];
- modules-center = [ "sway/mode" "custom/configwarn" "custom/nix-updates" ];
+ modules-center = [ "sway/mode" "privacy" "custom/github" "custom/configwarn" "custom/nix-updates" ];
"sway/mode" = {
format = "<span style=\"italic\" font-weight=\"bold\">{}</span>";
};
@@ -8584,13 +8629,41 @@ The rest of the related configuration is found here:
interval = 60;
};
+ "custom/scratchpad-indicator" = {
+ interval = 3;
+ exec = "swaymsg -t get_tree | jq 'recurse(.nodes[]) | first(select(.name==\"__i3_scratch\")) | .floating_nodes | length | select(. >= 1)'";
+ format = "{} ";
+ on-click = "swaymsg 'scratchpad show'";
+ on-click-right = "swaymsg 'move scratchpad'";
+ };
+
+ "custom/github" = {
+ format = "{} ";
+ return-type = "json";
+ interval = 60;
+ exec = "github-notifications";
+ on-click = "xdg-open https://github.com/notifications";
+ };
+
"custom/nix-updates" = {
exec = "update-checker";
on-click = "update-checker && notify-send 'The system has been updated'";
interval = 3600;
tooltip = true;
return-type = "json";
- format = "{} ";
+ format = "{} {icon}";
+ format-icon = {
+ "has-updates" = "";
+ "updated" = " ";
+ };
+ };
+
+ idle_inhibitor = {
+ format = "{icon}";
+ format-icons = {
+ activated = "";
+ deactivated = "";
+ };
};
"group/hardware" = {
@@ -8604,6 +8677,7 @@ The rest of the related configuration is found here:
"power-profiles-daemon"
"custom/left-arrow-light"
"custom/left-arrow-dark"
+ "custom/scratchpad-indicator"
"custom/left-arrow-light"
"disk"
"custom/left-arrow-dark"
@@ -8611,9 +8685,18 @@ The rest of the related configuration is found here:
"custom/left-arrow-light"
"cpu"
"custom/left-arrow-dark"
+ "backlight/slider"
+ "idle_inhibitor"
];
};
+ "backlight/slider" = {
+ min = 0;
+ max = 100;
+ orientation = "horizontal";
+ device = "intel_backlight";
+ };
+
power-profiles-daemon = {
format = "{icon}";
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
@@ -8986,6 +9069,42 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ pkgs, ... }:
+{
+ systemd.user.services.yubikey-touch-detector = {
+ Unit = {
+ Description = "Detects when your YubiKey is waiting for a touch";
+ Requires = [ "yubikey-touch-detector.socket" ];
+ };
+ Service = {
+ ExecStart = "${pkgs.yubikey-touch-detector}/bin/yubikey-touch-detector --libnotify";
+ EnvironmentFile = "-%E/yubikey-touch-detector/service.conf";
+ };
+ Install = {
+ Also = [ "yubikey-touch-detector.socket" ];
+ WantedBy = [ "default.target" ];
+ };
+ };
+ systemd.user.sockets.yubikey-touch-detector = {
+ Unit = {
+ Description = "Unix socket activation for YubiKey touch detector service";
+ };
+ Socket = {
+ ListenStream = "%t/yubikey-touch-detector.socket";
+ RemoveOnStop = true;
+ };
+ Install = {
+ WantedBy = [ "sockets.target" ];
+ };
+ };
+}
+
+dashboard, which is really quite useless. But, it
diff --git a/profiles/optional/home/work.nix b/profiles/optional/home/work.nix
index 6c257b7..1258bb3 100644
--- a/profiles/optional/home/work.nix
+++ b/profiles/optional/home/work.nix
@@ -253,16 +253,6 @@
};
};
- xdg.portal = {
- enable = true;
- extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
- config = {
- common = {
- default = "wlr";
- };
- };
- };
-
xdg.desktopEntries =
let
terminal = false;