home-manager/modules/modules.nix

237 lines
11 KiB
Nix
Raw Normal View History

{ pkgs
# Note, this should be "the standard library" + HM extensions.
, lib
# Whether to enable module type checking.
, check ? true
# If disabled, the pkgs attribute passed to this function is used instead.
, useNixpkgsModule ? true
}:
with lib;
let
hostPlatform = pkgs.stdenv.hostPlatform;
loadModule = file: { condition ? true }: {
inherit file condition;
};
allModules = [
(loadModule ./accounts/email.nix { })
(loadModule ./config/i18n.nix { condition = hostPlatform.isLinux; })
(loadModule ./files.nix { })
(loadModule ./home-environment.nix { })
(loadModule ./manual.nix { })
(loadModule ./misc/dconf.nix { })
(loadModule ./misc/debug.nix { })
(loadModule ./misc/fontconfig.nix { })
(loadModule ./misc/gtk.nix { })
(loadModule ./misc/lib.nix { })
(loadModule ./misc/news.nix { })
(loadModule ./misc/nixpkgs.nix { condition = useNixpkgsModule; })
(loadModule ./misc/numlock.nix { condition = hostPlatform.isLinux; })
(loadModule ./misc/pam.nix { })
(loadModule ./misc/qt.nix { })
(loadModule ./misc/submodule-support.nix { })
2020-04-30 13:54:54 +00:00
(loadModule ./misc/tmpfiles.nix { condition = hostPlatform.isLinux; })
(loadModule ./misc/version.nix { })
(loadModule ./misc/vte.nix { })
2019-11-10 20:36:16 +00:00
(loadModule ./misc/xdg-mime.nix { condition = hostPlatform.isLinux; })
2019-09-05 09:25:31 +00:00
(loadModule ./misc/xdg-mime-apps.nix { condition = hostPlatform.isLinux; })
2019-09-05 09:18:43 +00:00
(loadModule ./misc/xdg-user-dirs.nix { condition = hostPlatform.isLinux; })
2019-09-05 09:25:31 +00:00
(loadModule ./misc/xdg.nix { })
2020-02-29 22:13:12 +00:00
(loadModule ./programs/abook.nix { condition = hostPlatform.isLinux; })
(loadModule ./programs/afew.nix { })
2019-03-10 23:45:49 +00:00
(loadModule ./programs/alacritty.nix { })
(loadModule ./programs/alot.nix { })
2020-04-28 18:38:41 +00:00
(loadModule ./programs/aria2.nix { })
(loadModule ./programs/astroid.nix { })
(loadModule ./programs/autojump.nix { })
(loadModule ./programs/autorandr.nix { })
(loadModule ./programs/bash.nix { })
2019-02-11 05:57:10 +00:00
(loadModule ./programs/bat.nix { })
(loadModule ./programs/beets.nix { })
2019-03-27 11:36:37 +00:00
(loadModule ./programs/broot.nix { })
(loadModule ./programs/browserpass.nix { })
2020-09-11 19:45:10 +00:00
(loadModule ./programs/chromium.nix { })
(loadModule ./programs/command-not-found/command-not-found.nix { })
2020-05-06 16:23:40 +00:00
(loadModule ./programs/dircolors.nix { })
(loadModule ./programs/direnv.nix { })
(loadModule ./programs/eclipse.nix { })
(loadModule ./programs/emacs.nix { })
(loadModule ./programs/feh.nix { })
(loadModule ./programs/firefox.nix { })
(loadModule ./programs/fish.nix { })
(loadModule ./programs/fzf.nix { })
(loadModule ./programs/getmail.nix { condition = hostPlatform.isLinux; })
2020-10-15 20:25:47 +00:00
(loadModule ./programs/gh.nix { })
(loadModule ./programs/git.nix { })
(loadModule ./programs/gnome-terminal.nix { })
(loadModule ./programs/go.nix { })
2019-05-24 07:01:10 +00:00
(loadModule ./programs/gpg.nix { })
(loadModule ./programs/home-manager.nix { })
(loadModule ./programs/htop.nix { })
2020-05-01 03:49:20 +00:00
(loadModule ./programs/i3status.nix { })
(loadModule ./programs/i3status-rust.nix { condition = hostPlatform.isLinux; })
(loadModule ./programs/info.nix { })
(loadModule ./programs/irssi.nix { })
(loadModule ./programs/lieer.nix { })
(loadModule ./programs/jq.nix { })
2019-03-21 18:38:55 +00:00
(loadModule ./programs/kakoune.nix { })
2019-02-08 04:21:54 +00:00
(loadModule ./programs/keychain.nix { })
2020-01-14 01:23:20 +00:00
(loadModule ./programs/kitty.nix { })
(loadModule ./programs/lesspipe.nix { })
(loadModule ./programs/lf.nix { })
2019-03-17 21:37:21 +00:00
(loadModule ./programs/lsd.nix { })
(loadModule ./programs/man.nix { })
2019-01-11 14:53:50 +00:00
(loadModule ./programs/matplotlib.nix { })
(loadModule ./programs/mbsync.nix { })
2020-08-22 09:20:00 +00:00
(loadModule ./programs/mcfly.nix { })
(loadModule ./programs/mercurial.nix { })
2019-04-30 01:25:53 +00:00
(loadModule ./programs/mpv.nix { })
(loadModule ./programs/msmtp.nix { })
2020-06-23 12:56:20 +00:00
(loadModule ./programs/mu.nix { })
2020-08-26 19:20:54 +00:00
(loadModule ./programs/ncmpcpp.nix { })
(loadModule ./programs/ne.nix { })
2020-01-21 23:52:01 +00:00
(loadModule ./programs/neomutt.nix { })
(loadModule ./programs/neovim.nix { })
(loadModule ./programs/newsboat.nix { })
(loadModule ./programs/noti.nix { })
(loadModule ./programs/notmuch.nix { })
2020-07-24 15:15:55 +00:00
(loadModule ./programs/nushell.nix { })
(loadModule ./programs/obs-studio.nix { })
2020-11-23 21:05:31 +00:00
(loadModule ./programs/octant.nix { })
(loadModule ./programs/offlineimap.nix { })
2018-12-28 12:00:00 +00:00
(loadModule ./programs/opam.nix { })
2019-07-14 19:09:53 +00:00
(loadModule ./programs/password-store.nix { })
2019-11-03 21:20:00 +00:00
(loadModule ./programs/pazi.nix { })
(loadModule ./programs/pet.nix { })
(loadModule ./programs/pidgin.nix { })
2020-05-29 15:54:38 +00:00
(loadModule ./programs/powerline-go.nix { })
2020-04-07 07:10:07 +00:00
(loadModule ./programs/qutebrowser.nix { })
(loadModule ./programs/readline.nix { })
(loadModule ./programs/rofi.nix { })
(loadModule ./programs/rofi-pass.nix { })
2019-05-13 06:00:00 +00:00
(loadModule ./programs/rtorrent.nix { })
2019-04-14 10:49:55 +00:00
(loadModule ./programs/skim.nix { })
2019-09-08 09:20:00 +00:00
(loadModule ./programs/starship.nix { })
(loadModule ./programs/ssh.nix { })
(loadModule ./programs/taskwarrior.nix { })
(loadModule ./programs/termite.nix { })
(loadModule ./programs/texlive.nix { })
(loadModule ./programs/tmux.nix { })
(loadModule ./programs/urxvt.nix { })
(loadModule ./programs/vim.nix { })
(loadModule ./programs/vscode.nix { })
(loadModule ./programs/vscode/haskell.nix { })
2020-07-29 20:29:51 +00:00
(loadModule ./programs/waybar.nix { condition = hostPlatform.isLinux; })
2019-01-20 18:02:55 +00:00
(loadModule ./programs/z-lua.nix { })
(loadModule ./programs/zathura.nix { })
2020-05-25 09:20:00 +00:00
(loadModule ./programs/zoxide.nix { })
(loadModule ./programs/zplug.nix { })
(loadModule ./programs/zsh.nix { })
(loadModule ./programs/zsh/prezto.nix { })
(loadModule ./services/blueman-applet.nix { })
2020-11-01 11:28:27 +00:00
(loadModule ./services/caffeine.nix { condition = hostPlatform.isLinux; })
2019-12-29 10:26:24 +00:00
(loadModule ./services/cbatticon.nix { condition = hostPlatform.isLinux; })
2020-06-07 17:59:50 +00:00
(loadModule ./services/clipmenu.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/compton.nix { })
(loadModule ./services/dropbox.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/dunst.nix { })
2019-08-10 14:57:19 +00:00
(loadModule ./services/dwm-status.nix { condition = hostPlatform.isLinux; })
2018-12-29 19:11:48 +00:00
(loadModule ./services/emacs.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/flameshot.nix { })
(loadModule ./services/fluidsynth.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/redshift-gammastep/gammastep.nix { condition = hostPlatform.isLinux; })
2019-08-08 11:53:22 +00:00
(loadModule ./services/getmail.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/gnome-keyring.nix { })
(loadModule ./services/gpg-agent.nix { })
(loadModule ./services/grobi.nix { condition = hostPlatform.isLinux; })
2019-08-02 08:45:28 +00:00
(loadModule ./services/hound.nix { condition = hostPlatform.isLinux; })
2019-04-09 17:34:44 +00:00
(loadModule ./services/imapnotify.nix { condition = hostPlatform.isLinux; })
2020-04-12 13:42:43 +00:00
(loadModule ./services/kanshi.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/kbfs.nix { })
(loadModule ./services/kdeconnect.nix { })
(loadModule ./services/keepassx.nix { })
(loadModule ./services/keybase.nix { })
2020-03-10 22:28:48 +00:00
(loadModule ./services/keynav.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/lieer.nix { condition = hostPlatform.isLinux; })
2019-11-16 21:05:08 +00:00
(loadModule ./services/lorri.nix { condition = hostPlatform.isLinux; })
2020-03-23 09:52:02 +00:00
(loadModule ./services/mako.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/mbsync.nix { })
(loadModule ./services/mpd.nix { })
2019-02-20 15:38:40 +00:00
(loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; })
2019-07-22 22:15:45 +00:00
(loadModule ./services/muchsync.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/network-manager-applet.nix { })
(loadModule ./services/nextcloud-client.nix { })
(loadModule ./services/owncloud-client.nix { })
(loadModule ./services/parcellite.nix { })
2019-07-14 19:09:53 +00:00
(loadModule ./services/password-store-sync.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/pasystray.nix { })
2020-12-03 02:55:37 +00:00
(loadModule ./services/pbgopy.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/picom.nix { })
2020-07-28 21:16:31 +00:00
(loadModule ./services/plan9port.nix { condition = hostPlatform.isLinux; })
2021-01-30 17:20:36 +00:00
(loadModule ./services/playerctld.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/polybar.nix { })
(loadModule ./services/pulseeffects.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/random-background.nix { })
(loadModule ./services/redshift-gammastep/redshift.nix { })
2019-04-29 17:22:37 +00:00
(loadModule ./services/rsibreak.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/screen-locker.nix { })
(loadModule ./services/stalonetray.nix { })
(loadModule ./services/status-notifier-watcher.nix { })
2019-10-18 19:04:08 +00:00
(loadModule ./services/spotifyd.nix { condition = hostPlatform.isLinux; })
2019-09-15 21:12:08 +00:00
(loadModule ./services/sxhkd.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/syncthing.nix { })
(loadModule ./services/taffybar.nix { })
(loadModule ./services/tahoe-lafs.nix { })
2019-07-14 16:08:33 +00:00
(loadModule ./services/taskwarrior-sync.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/udiskie.nix { })
(loadModule ./services/unclutter.nix { })
2019-07-14 23:33:13 +00:00
(loadModule ./services/unison.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/window-managers/awesome.nix { })
(loadModule ./services/window-managers/bspwm/default.nix { condition = hostPlatform.isLinux; })
2019-09-04 02:30:44 +00:00
(loadModule ./services/window-managers/i3-sway/i3.nix { })
(loadModule ./services/window-managers/i3-sway/sway.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/window-managers/xmonad.nix { })
(loadModule ./services/wlsunset.nix { condition = hostPlatform.isLinux; })
2019-04-09 15:12:36 +00:00
(loadModule ./services/xcape.nix { condition = hostPlatform.isLinux; })
2019-01-26 13:18:07 +00:00
(loadModule ./services/xembed-sni-proxy.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/xscreensaver.nix { })
2019-05-30 21:25:30 +00:00
(loadModule ./services/xsuspender.nix { condition = hostPlatform.isLinux; })
(loadModule ./systemd.nix { })
(loadModule ./targets/darwin.nix { condition = hostPlatform.isDarwin; })
(loadModule ./targets/generic-linux.nix { condition = hostPlatform.isLinux; })
(loadModule ./xcursor.nix { })
(loadModule ./xresources.nix { })
(loadModule ./xsession.nix { })
(loadModule (pkgs.path + "/nixos/modules/misc/assertions.nix") { })
(loadModule (pkgs.path + "/nixos/modules/misc/meta.nix") { })
];
modules = map (getAttr "file") (filter (getAttr "condition") allModules);
pkgsModule = { config, ... }: {
config = {
_module.args.baseModules = modules;
_module.args.pkgsPath = lib.mkDefault (
if versionAtLeast config.home.stateVersion "20.09" then
pkgs.path
else
<nixpkgs>);
_module.args.pkgs = lib.mkDefault pkgs;
_module.check = check;
lib = lib.hm;
} // optionalAttrs useNixpkgsModule {
nixpkgs.system = mkDefault pkgs.system;
};
};
in
modules ++ [ pkgsModule ]