From 176c0569b88568e4a17f3e23ffac2565f597ef8d Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Mon, 2 May 2022 14:49:06 +0200 Subject: [PATCH] Customize the secondary free space indicator --- machines/desktop.nix | 1 + profiles/base/default.nix | 6 +++++- profiles/xsession/.polybar.nix.swp | Bin 0 -> 1024 bytes profiles/xsession/polybar.nix | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 profiles/xsession/.polybar.nix.swp diff --git a/machines/desktop.nix b/machines/desktop.nix index 62ce089..6c1d452 100644 --- a/machines/desktop.nix +++ b/machines/desktop.nix @@ -6,6 +6,7 @@ name = "DanixDesktop"; eth = "eno1"; wlan = null; + secondary-fs = "/mnt/henning"; }; profiles.base.enable = true; profiles.xsession.enable = true; diff --git a/profiles/base/default.nix b/profiles/base/default.nix index 0a853ff..bb24fe4 100644 --- a/profiles/base/default.nix +++ b/profiles/base/default.nix @@ -6,10 +6,14 @@ in { options.machine = { name = lib.mkOption { - type = "str"; + type = lib.types.str; }; eth = lib.mkOption {}; wlan = lib.mkOption {}; + secondary-fs = lib.mkOption { + type = lib.types.str; + default = "$HOME"; + }; }; options.profiles.base = { diff --git a/profiles/xsession/.polybar.nix.swp b/profiles/xsession/.polybar.nix.swp new file mode 100644 index 0000000000000000000000000000000000000000..b7e01595352d3ec88038f1f1e7cec12b93ce48f8 GIT binary patch literal 1024 zcmYc?$V<%2S1{8vVn6{KwHX*v67w?iQADwGQc`m>ON-J|^RP?9MGK1Z(=u~Xi}fpt lQ;Ul;^Yioz@^dPa5{vZmGArP!Mj4|aFd70h3V~2`a{)|*6{P?G literal 0 HcmV?d00001 diff --git a/profiles/xsession/polybar.nix b/profiles/xsession/polybar.nix index 02368f9..1c15d1f 100644 --- a/profiles/xsession/polybar.nix +++ b/profiles/xsession/polybar.nix @@ -115,7 +115,7 @@ in interval = 25; mount-0 = "/"; - mount-1 = "/mnt/henning"; + mount-1 = config.machine.secondary-fs; label-mounted = "%{F#0a81f5}%mountpoint%%{F-}: %free%"; label-unmounted = "%mountpoint% not mounted";