refactor: move home manager modules around

This commit is contained in:
Mohammad Rafiq 2025-03-27 02:00:31 +08:00
parent 5d9230d64f
commit e181c1c4f3
No known key found for this signature in database
38 changed files with 64 additions and 183 deletions

View file

@ -1,13 +0,0 @@
# Default graphical programs and personalisation
{
imports = [
./programs/dunst.nix
./programs/firefox.nix
./programs/hyprland.nix
./programs/kitty.nix
./programs/spicetify.nix
./programs/fuzzel.nix
./programs/hyprshade.nix
./programs/ags.nix
];
}

View file

@ -1,152 +0,0 @@
# Default shell utilities and programs
{
imports = [
./programs/btop.nix
./programs/nh.nix
./programs/direnv.nix
./programs/fzf.nix
./programs/git.nix
./programs/nvf.nix
./programs/starship.nix
./programs/tealdeer.nix
./programs/yazi.nix
./programs/zellij.nix
./programs/zsh.nix
./programs/zoxide.nix
./programs/thefuck.nix
./programs/clipse.nix
./programs/comma.nix
./scripts
];
home.shell.enableShellIntegration = true;
home.shellAliases = {
gs = "git status";
ai = "aichat -r %shell% -e";
cd = "z";
list-all-packages = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
};
editorconfig = {
enable = true;
settings = {
"*".end_of_line = "lf";
"*".insert_final_newline = true;
"*".trim_trailing_whitespace = true;
"*".charset = "utf-8";
"*.{diff,patch}" = {
end_of_line = "unset";
insert_final_newline = "unset";
trim_trailing_whitespace = "unset";
};
".version" = {
insert_final_newline = false;
};
"*.{bash,json,lock,md,nix,pl,pm,py,rb,sh,xml}" = {
indent_style = "space";
};
"*.xml" = {
indent_size = 1;
};
"*.{json,lock,md,nix,rb}" = {
indent_size = 2;
};
"*.{bash,pl,pm,py,sh}" = {
indent_size = 4;
};
"Gemfile" = {
indent_size = 2;
indent_style = "space";
};
"package.json" = {
indent_style = "unset";
};
"*.{c,h}" = {
insert_final_newline = "unset";
trim_trailing_whitespace = "unset";
};
"*.{asc,key,ovpn}" = {
insert_final_newline = "unset";
end_of_line = "unset";
trim_trailing_whitespace = "unset";
};
"*.lock" = {
indent_size = "unset";
};
"*.md" = {
trim_trailing_whitespace = true;
};
"*.nib" = {
end_of_line = "unset";
insert_final_newline = "unset";
trim_trailing_whitespace = "unset";
charset = "unset";
};
"eggs.nix" = {
trim_trailing_whitespace = "unset";
};
"nixos/modules/services/networking/ircd-hybrid/*.{conf,in}" = {
trim_trailing_whitespace = "unset";
};
"pkgs/build-support/dotnetenv/Wrapper/**" = {
end_of_line = "unset";
indent_style = "unset";
insert_final_newline = "unset";
trim_trailing_whitespace = "unset";
};
"registry.dat" = {
end_of_line = "unset";
insert_final_newline = "unset";
};
"pkgs/development/haskell-modules/hackage-packages.nix" = {
indent_style = "unset";
trim_trailing_whitespace = "unset";
};
"pkgs/misc/documentation-highlighter/**" = {
insert_final_newline = "unset";
};
"pkgs/servers/dict/wordnet_structures.py" = {
trim_trailing_whitespace = "unset";
};
"pkgs/tools/misc/timidity/timidity.cfg" = {
trim_trailing_whitespace = "unset";
};
"pkgs/tools/virtualization/ovftool/*.ova" = {
end_of_line = "unset";
insert_final_newline = "unset";
trim_trailing_whitespace = "unset";
charset = "unset";
};
"lib/tests/*.plist" = {
indent_style = "tab";
insert_final_newline = "unset";
};
"pkgs/kde/generated/**" = {
insert_final_newline = "unset";
end_of_line = "unset";
};
};
};
}

View file

@ -1,14 +0,0 @@
{ pkgs, inputs, ... }:
{
home.packages = with pkgs; [
fastfetch # system info
wl-clipboard # provides cli copy and paste commands
aichat # duh
ripgrep
devenv
bat
ttyper
hyprpicker
inputs.hyprcloser.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}

View file

@ -7,14 +7,55 @@
}:
{
imports = [
./modules/sh.nix
./modules/de.nix
./modules/utils.nix
./programs/ags.nix
./programs/btop.nix
./programs/clipse.nix
./programs/comma.nix
./programs/direnv.nix
./programs/dunst.nix
./programs/firefox.nix
./programs/fuzzel.nix
./programs/fzf.nix
./programs/git.nix
./programs/hyprland.nix
./programs/hyprshade.nix
./programs/kitty.nix
./programs/nh.nix
./programs/nvf.nix
./programs/spicetify.nix
./programs/starship.nix
./programs/tealdeer.nix
./programs/thefuck.nix
./programs/yazi.nix
./programs/zellij.nix
./programs/zoxide.nix
./programs/zsh.nix
./scripts
];
# This enables using home-manager from the command line.
programs.home-manager.enable = true;
editorconfig = {
enable = true;
settings = {
"*" = {
end_of_line = "lf";
insert_final_newline = true;
trim_trailing_whitespace = true;
charset = "utf-8";
indent_style = "space";
indent_size = 2;
};
"package.json" = {
indent_style = "unset";
};
"*.lock" = {
indent_size = "unset";
};
};
};
home = {
username = "${username}";
homeDirectory = "/home/${username}";
@ -23,6 +64,25 @@
# was originally bulit against on this system.
# Do not change it.
stateVersion = "25.05";
shell.enableShellIntegration = true;
shellAliases = {
gs = "git status";
ai = "aichat -r %shell% -e";
cd = "z";
list-all-packages = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
};
packages = with pkgs; [
fastfetch # system info
wl-clipboard # provides cli copy and paste commands
aichat # duh
ripgrep
devenv
bat
ttyper
hyprpicker
inputs.hyprcloser.packages.${pkgs.stdenv.hostPlatform.system}.default
];
};
}