about summary refs log tree commit diff
path: root/home/modules/alsi.nix
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-05-26T14·43-0400
committerGriffin Smith <root@gws.fyi>2020-05-26T14·43-0400
commit9036dc7c32739d302cdd6fe51fe2d01418a99c9d (patch)
tree2f67188616193c8b9b3de011d0bc546aca68a5ee /home/modules/alsi.nix
parent86b5f58ca51bfb91de4cd29e66b781d5e035db7a (diff)
Beginnings of config for Darwin machines
Split out a platforms/ directory with a linux.nix and darwin.nix, and
starting splitting things out between the two
Diffstat (limited to 'home/modules/alsi.nix')
-rw-r--r--home/modules/alsi.nix41
1 files changed, 30 insertions, 11 deletions
diff --git a/home/modules/alsi.nix b/home/modules/alsi.nix
index cb9802e2ce..e42524bb88 100644
--- a/home/modules/alsi.nix
+++ b/home/modules/alsi.nix
@@ -1,29 +1,30 @@
 { config, lib, pkgs, ... }:
-let alsi = pkgs.callPackage ../../pkgs/alsi {};
+let alsi = pkgs.callPackage ~/code/system/pkgs/alsi {};
 in
 {
   home.packages = [ alsi ];
 
-  home.file.".config/alsi/alsi.logo" = {
+  xdg.configFile."alsi/alsi.logo" = {
     source = ./nixos-logo.txt;
     force = true;
   };
 
-  home.file.".config/alsi/alsi.conf" = {
+  xdg.configFile."alsi/alsi.conf" = {
+    force = true;
     text = ''
     #!${pkgs.perl}/bin/perl
 
     scalar {
       ALSI_VERSION         => "0.4.8",
-      COLORS_FILE          => "/home/grfn/.config/alsi/alsi.colors",
-      DE_FILE              => "/home/grfn/.config/alsi/alsi.de",
+      COLORS_FILE          => "/${config.home.homeDirectory}/.config/alsi/alsi.colors",
+      DE_FILE              => "/${config.home.homeDirectory}/.config/alsi/alsi.de",
       DEFAULT_COLOR_BOLD   => "blue",
       DEFAULT_COLOR_NORMAL => "blue",
       DF_COMMAND           => "df -Th -x sys -x tmpfs -x devtmpfs &>/dev/stdout",
-      GTK2_RC_FILE         => "/home/grfn/.gtkrc-2.0",
-      GTK3_RC_FILE         => "/home/grfn/.config/gtk-3.0/settings.ini",
-      LOGO_FILE            => "/home/grfn/.config/alsi/alsi.logo",
-      OUTPUT_FILE          => "/home/grfn/.config/alsi/alsi.output",
+      GTK2_RC_FILE         => "/${config.home.homeDirectory}/.gtkrc-2.0",
+      GTK3_RC_FILE         => "/${config.home.homeDirectory}/.config/gtk-3.0/settings.ini",
+      LOGO_FILE            => "/${config.home.homeDirectory}/.config/alsi/alsi.logo",
+      OUTPUT_FILE          => "/${config.home.homeDirectory}/.config/alsi/alsi.output",
       # PACKAGES_PATH        => "/var/lib/pacman/local/",
       PS_COMMAND           => "ps -A",
       USAGE_COLORS         => 0,
@@ -33,9 +34,27 @@ in
       USAGE_PRECENT_YELLOW => 85,
       USE_LOGO_FROM_FILE   => 1,
       USE_VALUES_COLOR     => 0,
-      WM_FILE              => "/home/grfn/.config/alsi/alsi.wm",
+      WM_FILE              => "/${config.home.homeDirectory}/.config/alsi/alsi.wm",
     }
     '';
-    force = true;
   };
+
+  xdg.configFile."alsi/alsi.colors".text = ''
+    #!${pkgs.perl}/bin/perl
+
+    # Colors for alsi
+
+    scalar {
+       black   => {normal => "\e[0;30m", bold => "\e[1;30m"},
+       red     => {normal => "\e[0;31m", bold => "\e[1;31m"},
+       green   => {normal => "\e[0;32m", bold => "\e[1;32m"},
+       yellow  => {normal => "\e[0;33m", bold => "\e[1;33m"},
+       default => {normal => "\e[0;34m", bold => "\e[1;34m"},
+       blue    => {normal => "\e[0;34m", bold => "\e[1;34m"},
+       purple  => {normal => "\e[0;35m", bold => "\e[1;35m"},
+       cyan    => {normal => "\e[0;36m", bold => "\e[1;36m"},
+       white   => {normal => "\e[0;37m", bold => "\e[1;37m"},
+       reset   => "\e[0m",
+    }
+  '';
 }