Skip to content

Commit

Permalink
fix(modules): remove scheme 'none'
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed Sep 29, 2024
1 parent 10424cd commit d3fe79e
Showing 1 changed file with 50 additions and 54 deletions.
104 changes: 50 additions & 54 deletions modules/home-manager/dotfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,66 +17,62 @@ with builtins;
let
removeFlavor = head (split "-" colorTheme);
in
lib.optionals (scheme != "none") (
lib.optional (pathExists ../../apps/user/color-theme/${removeFlavor}) ../../apps/user/color-theme/${removeFlavor}
++ [
../../settings/user/nix
../../apps/user/core/bash
../../apps/user/core/btop
../../apps/user/core/fzf
../../apps/user/core/git
../../apps/user/core/man
../../apps/user/core/pkgs
../../apps/user/core/programs
../../apps/user/core/yazi
../../apps/user/core/sops
../../apps/user/core/ssh
../../apps/user/core/starship
../../apps/user/core/tmux
../../apps/user/core/wezterm
../../apps/user/core/xdg
lib.optional (pathExists ../../apps/user/color-theme/${removeFlavor}) ../../apps/user/color-theme/${removeFlavor}
++ [
../../settings/user/nix
../../apps/user/core/bash
../../apps/user/core/btop
../../apps/user/core/fzf
../../apps/user/core/git
../../apps/user/core/man
../../apps/user/core/pkgs
../../apps/user/core/programs
../../apps/user/core/yazi
../../apps/user/core/sops
../../apps/user/core/ssh
../../apps/user/core/starship
../../apps/user/core/tmux
../../apps/user/core/wezterm
../../apps/user/core/xdg
]
++ lib.optionals (scheme != "core") [
../../apps/user/small/direnv
../../apps/user/small/editorconfig
../../apps/user/small/fastfetch
../../apps/user/small/lazygit
../../apps/user/small/navi
../../apps/user/small/neovim
../../apps/user/small/pkgs
../../apps/user/small/translate-shell
../../apps/user/small/zsh
]
++ lib.optionals (scheme == "medium" || scheme == "full") [
../../apps/user/medium/pkgs
../../apps/user/medium/texlive
]
++ lib.optionals (scheme == "full") (
[ ../../apps/user/full/pkgs ]
++ concatMap import [
../../apps/user/full/ime
../../apps/user/full/programs
../../apps/user/full/services
../../apps/user/full/systemd
../../apps/user/full/terminal
../../apps/user/full/theme
../../apps/user/full/xdg-mime
]
++ lib.optionals (scheme != "core") [
../../apps/user/small/direnv
../../apps/user/small/editorconfig
../../apps/user/small/fastfetch
../../apps/user/small/lazygit
../../apps/user/small/navi
../../apps/user/small/neovim
../../apps/user/small/pkgs
../../apps/user/small/translate-shell
../../apps/user/small/zsh
]
++ lib.optionals (scheme == "medium" || scheme == "full") [
../../apps/user/medium/pkgs
../../apps/user/medium/texlive
]
++ lib.optionals (scheme == "full") (
[ ../../apps/user/full/pkgs ]
++ concatMap import [
../../apps/user/full/ime
../../apps/user/full/programs
../../apps/user/full/services
../../apps/user/full/systemd
../../apps/user/full/terminal
../../apps/user/full/theme
../../apps/user/full/xdg-mime
]
)
++ lib.optionals (wm != "" && pathExists ../../apps/user/full/wm/${wm}) [
../../apps/user/full/xsession
../../apps/user/full/wm/${wm}
]
);
)
++ lib.optionals (wm != "" && pathExists ../../apps/user/full/wm/${wm}) [
../../apps/user/full/xsession
../../apps/user/full/wm/${wm}
];
config = lib.mkIf config.dotfilesActivation {
programs.home-manager.enable = true;
assertions = [
{
assertion =
scheme == "none" || scheme == "core" || scheme == "small" || scheme == "medium" || scheme == "full";
assertion = scheme == "core" || scheme == "small" || scheme == "medium" || scheme == "full";
message = ''
Set scheme `none` or 'core' or 'small' or 'full'.
none: not use home-manager config
Set scheme 'core' or 'small' or 'medium' or 'full'.
core: shell=bash, core utils, no editor, assuming diskless server
small: shell=zsh, and neovim,
medium: shell=zsh, daily use such as pandoc and texlive etc.., without GUI apps
Expand Down

0 comments on commit d3fe79e

Please sign in to comment.