yep, more dotfiles

screen: add fragment and module

wiro.world d8cc4206 9de3afa2

verified
+76 -7
+1
home-manager/fragments/default.nix
··· 21 21 ./kitty.nix 22 22 ./launcher.nix 23 23 ./rust.nix 24 + ./screen.nix 24 25 ./shell.nix 25 26 ./stylix.nix 26 27 ./swaybar.nix
+4 -4
home-manager/fragments/firefox.nix
··· 68 68 cfg = config.local.fragment.firefox; 69 69 in 70 70 { 71 - options.local.fragment.firefox.enable = lib.mkEnableOption '' 72 - Firefox related 73 - ''; 74 - 75 71 imports = [ 76 72 zen-browser.homeModules.beta 77 73 ]; 74 + 75 + options.local.fragment.firefox.enable = lib.mkEnableOption '' 76 + Firefox related 77 + ''; 78 78 79 79 config = lib.mkIf cfg.enable { 80 80 home.sessionVariables.BROWSER = lib.getExe config.programs.zen-browser.package;
+29
home-manager/fragments/screen.nix
··· 1 + { self 2 + , config 3 + , lib 4 + , ... 5 + }: 6 + 7 + let 8 + inherit (self) homeManagerModules; 9 + cfg = config.local.fragment.screen; 10 + in 11 + { 12 + imports = [ homeManagerModules.screen ]; 13 + 14 + options.local.fragment.screen.enable = lib.mkEnableOption '' 15 + Screen related 16 + ''; 17 + 18 + config = lib.mkIf cfg.enable { 19 + programs.screen = { 20 + enable = true; 21 + 22 + screenrc = '' 23 + startup_message off 24 + 25 + defscrollback 10000 26 + ''; 27 + }; 28 + }; 29 + }
+1
modules/home-manager/default.nix
··· 1 1 { 2 + screen = ./screen.nix; 2 3 wakatime = ./wakatime.nix; 3 4 xcompose = ./xcompose.nix; 4 5 }
+40
modules/home-manager/screen.nix
··· 1 + { config 2 + , lib 3 + , pkgs 4 + , ... 5 + }: 6 + 7 + let 8 + cfg = config.programs.screen; 9 + in 10 + 11 + { 12 + options = { 13 + programs.screen = { 14 + enable = lib.mkEnableOption "screen, a basic terminal multiplexer"; 15 + 16 + package = lib.mkPackageOption pkgs "screen" { }; 17 + 18 + screenrc = lib.mkOption { 19 + type = lib.types.lines; 20 + default = ""; 21 + example = '' 22 + defscrollback 10000 23 + startup_message off 24 + ''; 25 + description = "The contents of {file}`/etc/screenrc` file"; 26 + }; 27 + }; 28 + }; 29 + 30 + config = lib.mkIf cfg.enable { 31 + xdg.configFile."screen/screenrc".text = cfg.screenrc; 32 + 33 + home.sessionVariables = { 34 + SCREENRC = "${config.xdg.configHome}/screen/screenrc"; 35 + SCREENDIR = "${config.xdg.configHome}/screen"; 36 + }; 37 + 38 + home.packages = [ cfg.package ]; 39 + }; 40 + }
+1 -3
modules/home-manager/wakatime.nix
··· 63 63 lib.mkIf cfg.enable { 64 64 home.sessionVariables.WAKATIME_HOME = "${config.xdg.configHome}/wakatime"; 65 65 66 - xdg.configFile = { 67 - "wakatime/.wakatime.cfg".source = ini-format.generate "wakatime-config" final-config; 68 - }; 66 + xdg.configFile."wakatime/.wakatime.cfg".source = ini-format.generate "wakatime-config" final-config; 69 67 }; 70 68 } 71 69