diff options
| author | Christian <[email protected]> | 2026-05-12 20:57:55 -0500 |
|---|---|---|
| committer | Christian <[email protected]> | 2026-05-12 20:57:55 -0500 |
| commit | a9c3994af71d896d377c715d1ebeb3b173ab4b4f (patch) | |
| tree | b3dfcb3efe4616c4b1864bfb8ba0db7f6d99f66b /modules/home | |
| parent | 846da0fa115977f5ab4e9ab966439450a0c60faf (diff) | |
Add dry-rebuild alias, laptop battery widget, and commit message convention
Diffstat (limited to 'modules/home')
| -rw-r--r-- | modules/home/christian.nix | 137 | ||||
| -rw-r--r-- | modules/home/xmobar/xmobarrc | 27 |
2 files changed, 86 insertions, 78 deletions
diff --git a/modules/home/christian.nix b/modules/home/christian.nix index a5af420..b3e6b77 100644 --- a/modules/home/christian.nix +++ b/modules/home/christian.nix @@ -2,72 +2,107 @@ config, pkgs, inputs, + lib, ... }: { imports = [ ./nvim ]; - home.stateVersion = "25.11"; + options.custom.xmobarBattery = lib.mkEnableOption "xmobar battery widget"; - home.packages = with pkgs; [ - (dmenu.override { - conf = ./dmenu/config.h; - }) - nixfmt - ]; + config = { + home.stateVersion = "25.11"; - programs.alacritty = { - enable = true; - settings = { - font.size = 8; + home.packages = with pkgs; [ + (dmenu.override { + conf = ./dmenu/config.h; + }) + nixfmt + ]; + + programs.alacritty = { + enable = true; + settings = { + font.size = 8; + }; }; - }; - programs.bash.enable = true; + programs.bash.enable = true; - programs.git = { - enable = true; - settings.user.name = "Christian"; - settings.user.email = "[email protected]"; - settings.init.defaultBranch = "main"; - }; + programs.git = { + enable = true; + settings.user.name = "Christian"; + settings.user.email = "[email protected]"; + settings.init.defaultBranch = "main"; + }; - programs.direnv = { - enable = true; - enableBashIntegration = true; - nix-direnv.enable = true; - silent = true; - }; + programs.direnv = { + enable = true; + enableBashIntegration = true; + nix-direnv.enable = true; + silent = true; + }; - programs.firefox = { - enable = true; - policies = { - OverrideFirstRunPage = ""; - DisableFirefoxAccounts = true; - FirefoxHome = { - SponsoredTopSites = false; - Stories = false; + programs.firefox = { + enable = true; + policies = { + OverrideFirstRunPage = ""; + DisableFirefoxAccounts = true; + FirefoxHome = { + SponsoredTopSites = false; + Stories = false; + }; }; - }; - profiles.christian = { - name = "Christian"; - isDefault = true; - settings = { - "browser.aboutConfig.showWarning" = false; - "extensions.autoDisableScopes" = 0; - "browser.theme.content-theme" = 0; - "browser.theme.toolbar-theme" = 0; + profiles.christian = { + name = "Christian"; + isDefault = true; + settings = { + "browser.aboutConfig.showWarning" = false; + "extensions.autoDisableScopes" = 0; + "browser.theme.content-theme" = 0; + "browser.theme.toolbar-theme" = 0; + }; + extensions.packages = with inputs.nur.legacyPackages.x86_64-linux.repos.rycee.firefox-addons; [ + ublock-origin + ]; }; - extensions.packages = with inputs.nur.legacyPackages.x86_64-linux.repos.rycee.firefox-addons; [ - ublock-origin - ]; }; - }; - programs.xmobar = { - enable = true; - extraConfig = builtins.readFile ./xmobar/xmobarrc; - }; + programs.xmobar = { + enable = true; + extraConfig = '' + -- vim: set ft=haskell: + Config + { font = "Monospace" + , borderColor = "#d0d0d0" + , border = FullB + , borderWidth = 1 + , bgColor = "#222" + , fgColor = "grey" + , position = TopH 30 + , commands = + [ Run Cpu ["-t", "cpu: <fc=#4eb4fa><bar> <total>%</fc>"] 10 + , Run Network "wlan0" ["-S", "True", "-t", "wlan: <fc=#4eb4fa><rx></fc>/<fc=#4eb4fa><tx></fc>"] 10 + , Run Memory ["-t","mem: <fc=#4eb4fa><usedbar> <usedratio>%</fc>"] 10 + , Run Date "date: <fc=#4eb4fa>%a %d %b %Y %I:%M:%S %p </fc>" "date" 10 + ${lib.optionalString config.custom.xmobarBattery '' + , Run Battery + ["-t", "bat: <leftbar> <left> <watts>", + "-L", "10", "-H", "80", "-S", "True", + "-l", "red", "-n", "#4eb4fa", "-h", "green", + "--", + "-L", "-15", "-H", "-5", + "-l", "red", "-m", "#4eb4fa", "-h", "green"] + 600 + ''} + ] + , sepChar = "%" + , alignSep = "}{" + , template = " ${lib.optionalString config.custom.xmobarBattery "%battery% | "}%cpu% | %memory% | %wlan0% }{%date% " + } + ''; + }; - programs.home-manager.enable = true; + programs.home-manager.enable = true; + }; } diff --git a/modules/home/xmobar/xmobarrc b/modules/home/xmobar/xmobarrc deleted file mode 100644 index 39f78c6..0000000 --- a/modules/home/xmobar/xmobarrc +++ /dev/null @@ -1,27 +0,0 @@ --- vim: set ft=haskell: -Config - { font = "Monospace" - , borderColor = "#d0d0d0" - , border = FullB - , borderWidth = 1 - , bgColor = "#222" - , fgColor = "grey" - , position = TopH 30 - , commands = - [ Run Cpu ["-t", "cpu: <fc=#4eb4fa><bar> <total>%</fc>"] 10 - , Run Network "wlan0" ["-S", "True", "-t", "wlan: <fc=#4eb4fa><rx></fc>/<fc=#4eb4fa><tx></fc>"] 10 - , Run Memory ["-t","mem: <fc=#4eb4fa><usedbar> <usedratio>%</fc>"] 10 - , Run Date "date: <fc=#4eb4fa>%a %d %b %Y %I:%M:%S %p </fc>" "date" 10 - , Run Battery - ["-t", "bat: <leftbar> <left> <watts>", - "-L", "10", "-H", "80", "-S", "True", - "-l", "red", "-n", "#4eb4fa", "-h", "green", - "--", - "-L", "-15", "-H", "-5", - "-l", "red", "-m", "#4eb4fa", "-h", "green"] - 600 - ] - , sepChar = "%" - , alignSep = "}{" - , template = " %battery% | %cpu% | %memory% | %wlan0% }{%date% " -} |
