profiles/dev: simplify home-manager configuration

Similar change. With user-specific modules, we can make this more generic.
This commit is contained in:
Gabriel Arazas 2023-12-18 00:16:48 +08:00
parent a25603142c
commit a26aa49614
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -6,9 +6,9 @@ let cfg = config.profiles.dev;
in { in {
options.profiles.dev = { options.profiles.dev = {
enable = enable =
lib.mkEnableOption "foo-dogsquared's user-specific development setup"; lib.mkEnableOption "basic set of programs for development setup";
shell.enable = shell.enable =
lib.mkEnableOption "configuration of foo-dogsquared's shell of choice"; lib.mkEnableOption "enhanced shell configuration";
extras.enable = lib.mkEnableOption "additional tools for development stuff"; extras.enable = lib.mkEnableOption "additional tools for development stuff";
shaders.enable = lib.mkEnableOption "tools for developing shaders"; shaders.enable = lib.mkEnableOption "tools for developing shaders";
servers.enable = lib.mkEnableOption "toolkit for managing servers from your home"; servers.enable = lib.mkEnableOption "toolkit for managing servers from your home";
@ -42,17 +42,6 @@ in {
}; };
}; };
# A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
programs.fzf =
let
fd = "${lib.getBin pkgs.fd}/bin/fd";
in
{
enable = true;
changeDirWidgetCommand = "${fd} --type directory --unrestricted";
defaultCommand = "${fd} --type file --hidden";
};
# The file manager of choice. # The file manager of choice.
programs.lf = { programs.lf = {
enable = true; enable = true;
@ -94,12 +83,24 @@ in {
}; };
}; };
# Echolocation. # Echolocation. Since you're using a home-manager configuration, you're
# most likely using Nix anyways.
programs.nix-index.enable = lib.mkIf (attrs ? osConfig -> !attrs.osConfig.programs.nix-index.enable) true; programs.nix-index.enable = lib.mkIf (attrs ? osConfig -> !attrs.osConfig.programs.nix-index.enable) true;
}) })
# Level up your terminal-dwelling skills with these. # Level up your terminal-dwelling skills with these.
(lib.mkIf cfg.shell.enable { (lib.mkIf cfg.shell.enable {
# A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
programs.fzf =
let
fd = "${lib.getBin pkgs.fd}/bin/fd";
in
{
enable = true;
changeDirWidgetCommand = "${fd} --type directory --unrestricted";
defaultCommand = "${fd} --type file --hidden";
};
# Supercharging your shell history. Just don't forget to flush them out # Supercharging your shell history. Just don't forget to flush them out
# before doing questionable things. # before doing questionable things.
programs.atuin = { programs.atuin = {
@ -173,7 +174,6 @@ in {
(lib.mkIf cfg.extras.enable { (lib.mkIf cfg.extras.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
act # Test your CI without embarrassing yourself repeatedly pushing into GitHub repos.
gum # The fancy shell script toolkit. gum # The fancy shell script toolkit.
hyperfine # Making sure your apps are not just fine but REEEEEEAAAAALY fine. hyperfine # Making sure your apps are not just fine but REEEEEEAAAAALY fine.
license-cli # A nice generator template for license files. license-cli # A nice generator template for license files.