Manage a user environment using Nix https://github.com/rycee/home-manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

modules.nix 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. { pkgs
  2. , lib
  3. # Whether to enable module type checking.
  4. , check ? true
  5. }:
  6. with lib;
  7. let
  8. hostPlatform = pkgs.stdenv.hostPlatform;
  9. checkPlatform = any (meta.platformMatch pkgs.stdenv.hostPlatform);
  10. loadModule = file: { condition ? true }: {
  11. inherit file condition;
  12. };
  13. allModules = [
  14. (loadModule ./accounts/email.nix { })
  15. (loadModule ./files.nix { })
  16. (loadModule ./home-environment.nix { })
  17. (loadModule ./manual.nix { })
  18. (loadModule ./misc/dconf.nix { })
  19. (loadModule ./misc/fontconfig.nix { })
  20. (loadModule ./misc/gtk.nix { })
  21. (loadModule ./misc/lib.nix { })
  22. (loadModule ./misc/news.nix { })
  23. (loadModule ./misc/nixpkgs.nix { })
  24. (loadModule ./misc/pam.nix { })
  25. (loadModule ./misc/qt.nix { })
  26. (loadModule ./misc/submodule-support.nix { })
  27. (loadModule ./misc/version.nix { })
  28. (loadModule ./misc/xdg.nix { })
  29. (loadModule ./programs/afew.nix { })
  30. (loadModule ./programs/alot.nix { })
  31. (loadModule ./programs/astroid.nix { })
  32. (loadModule ./programs/autorandr.nix { })
  33. (loadModule ./programs/bash.nix { })
  34. (loadModule ./programs/beets.nix { })
  35. (loadModule ./programs/browserpass.nix { })
  36. (loadModule ./programs/chromium.nix { condition = hostPlatform.isLinux; })
  37. (loadModule ./programs/command-not-found/command-not-found.nix { })
  38. (loadModule ./programs/direnv.nix { })
  39. (loadModule ./programs/eclipse.nix { })
  40. (loadModule ./programs/emacs.nix { })
  41. (loadModule ./programs/feh.nix { })
  42. (loadModule ./programs/firefox.nix { })
  43. (loadModule ./programs/fish.nix { })
  44. (loadModule ./programs/fzf.nix { })
  45. (loadModule ./programs/git.nix { })
  46. (loadModule ./programs/gnome-terminal.nix { })
  47. (loadModule ./programs/go.nix { })
  48. (loadModule ./programs/home-manager.nix { })
  49. (loadModule ./programs/htop.nix { })
  50. (loadModule ./programs/info.nix { })
  51. (loadModule ./programs/irssi.nix { })
  52. (loadModule ./programs/jq.nix { })
  53. (loadModule ./programs/lesspipe.nix { })
  54. (loadModule ./programs/man.nix { })
  55. (loadModule ./programs/matplotlib.nix { })
  56. (loadModule ./programs/mbsync.nix { })
  57. (loadModule ./programs/mercurial.nix { })
  58. (loadModule ./programs/msmtp.nix { })
  59. (loadModule ./programs/neovim.nix { })
  60. (loadModule ./programs/newsboat.nix { })
  61. (loadModule ./programs/noti.nix { })
  62. (loadModule ./programs/notmuch.nix { })
  63. (loadModule ./programs/obs-studio.nix { })
  64. (loadModule ./programs/offlineimap.nix { })
  65. (loadModule ./programs/opam.nix { })
  66. (loadModule ./programs/pidgin.nix { })
  67. (loadModule ./programs/rofi.nix { })
  68. (loadModule ./programs/ssh.nix { })
  69. (loadModule ./programs/taskwarrior.nix { })
  70. (loadModule ./programs/termite.nix { })
  71. (loadModule ./programs/texlive.nix { })
  72. (loadModule ./programs/tmux.nix { })
  73. (loadModule ./programs/urxvt.nix { })
  74. (loadModule ./programs/vim.nix { })
  75. (loadModule ./programs/vscode.nix { })
  76. (loadModule ./programs/zathura.nix { })
  77. (loadModule ./programs/zsh.nix { })
  78. (loadModule ./services/blueman-applet.nix { })
  79. (loadModule ./services/compton.nix { })
  80. (loadModule ./services/dunst.nix { })
  81. (loadModule ./services/emacs.nix { condition = hostPlatform.isLinux; })
  82. (loadModule ./services/flameshot.nix { })
  83. (loadModule ./services/gnome-keyring.nix { })
  84. (loadModule ./services/gpg-agent.nix { })
  85. (loadModule ./services/kbfs.nix { })
  86. (loadModule ./services/kdeconnect.nix { })
  87. (loadModule ./services/keepassx.nix { })
  88. (loadModule ./services/keybase.nix { })
  89. (loadModule ./services/mbsync.nix { })
  90. (loadModule ./services/mpd.nix { })
  91. (loadModule ./services/network-manager-applet.nix { })
  92. (loadModule ./services/nextcloud-client.nix { })
  93. (loadModule ./services/owncloud-client.nix { })
  94. (loadModule ./services/parcellite.nix { })
  95. (loadModule ./services/pasystray.nix { })
  96. (loadModule ./services/polybar.nix { })
  97. (loadModule ./services/random-background.nix { })
  98. (loadModule ./services/redshift.nix { })
  99. (loadModule ./services/screen-locker.nix { })
  100. (loadModule ./services/stalonetray.nix { })
  101. (loadModule ./services/status-notifier-watcher.nix { })
  102. (loadModule ./services/syncthing.nix { })
  103. (loadModule ./services/taffybar.nix { })
  104. (loadModule ./services/tahoe-lafs.nix { })
  105. (loadModule ./services/udiskie.nix { })
  106. (loadModule ./services/unclutter.nix { })
  107. (loadModule ./services/window-managers/awesome.nix { })
  108. (loadModule ./services/window-managers/i3.nix { })
  109. (loadModule ./services/window-managers/xmonad.nix { })
  110. (loadModule ./services/xembed-sni-proxy.nix { condition = hostPlatform.isLinux; })
  111. (loadModule ./services/xscreensaver.nix { })
  112. (loadModule ./systemd.nix { })
  113. (loadModule ./xcursor.nix { })
  114. (loadModule ./xresources.nix { })
  115. (loadModule ./xsession.nix { })
  116. (loadModule <nixpkgs/nixos/modules/misc/assertions.nix> { })
  117. (loadModule <nixpkgs/nixos/modules/misc/meta.nix> { })
  118. ];
  119. modules = map (getAttr "file") (filter (getAttr "condition") allModules);
  120. pkgsModule = {
  121. config._module.args.baseModules = modules;
  122. config._module.args.pkgs = lib.mkDefault pkgs;
  123. config._module.check = check;
  124. config.lib = import ./lib { inherit lib; };
  125. config.nixpkgs.system = mkDefault pkgs.system;
  126. };
  127. in
  128. modules ++ [ pkgsModule ]