diff options
| author | seth <[email protected]> | 2023-08-17 13:46:41 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-17 13:55:47 -0400 |
| commit | 6ca79241fe6a45ca4468e4c54c778df116c0b14f (patch) | |
| tree | ca6bbd7eaec86125c0e59a2553922ea4ef4a2b9b /users/seth/programs/default.nix | |
| parent | 76127171e4ed7abcb2a14039f358e117aac20181 (diff) | |
users/seth: make everything a module
Diffstat (limited to 'users/seth/programs/default.nix')
| -rw-r--r-- | users/seth/programs/default.nix | 72 |
1 files changed, 44 insertions, 28 deletions
diff --git a/users/seth/programs/default.nix b/users/seth/programs/default.nix index 1a13160..2b0dc26 100644 --- a/users/seth/programs/default.nix +++ b/users/seth/programs/default.nix @@ -1,44 +1,60 @@ -{pkgs, ...}: { +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.getchoo.programs.defaultPrograms; + inherit (lib) mkDefault mkEnableOption mkIf; +in { + options.getchoo.programs.defaultPrograms.enable = mkEnableOption "default programs" // {enable = true;}; + imports = [ + ./chromium.nix + ./firefox.nix ./git.nix ./gpg.nix + ./mangohud.nix ./neovim ./ssh.nix ./vim.nix ]; - home.packages = with pkgs; [ - fd - gh - nix-your-shell - nurl - rclone - restic - ripgrep - ]; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + fd + nix-your-shell + nurl + rclone + restic + ]; - programs = { - btop.enable = true; + programs = { + btop.enable = mkDefault true; - direnv = { - enable = true; - nix-direnv = { - enable = true; + direnv = { + enable = mkDefault true; + nix-direnv.enable = mkDefault true; }; - }; - nix-index-database.comma.enable = true; - }; + ripgrep.enable = mkDefault true; + + nix-index-database.comma.enable = mkDefault true; + }; - xdg = { - enable = true; - configFile."btop/themes/catppuccin_mocha.theme".source = - pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "btop"; - rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3"; - sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk="; + xdg = + { + enable = mkDefault true; } - + "/catppuccin_mocha.theme"; + // (mkIf cfg.programs.btop.enable { + configFile."btop/themes/catppuccin_mocha.theme".source = + pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "btop"; + rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3"; + sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk="; + } + + "/catppuccin_mocha.theme"; + }); }; } |
