mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 17:19:45 +01:00
1bc59f7290
This is a NixOS module that is intended to be imported into a NixOS system configuration. It allows the system users to be set up directly from the system configuration. The actual profile switch is performed by a oneshot systemd unit per configured user that acts much like the regular `home-manager switch` command. With this implementation, the NixOS module does not work properly with the `nixos-rebuild build-vm` command. This can be solved by using the `users.users.<name?>.packages` option to install packages but this does not work flawlessly with certain Nixpkgs packages. In particular, for programs using the Qt libraries.
97 lines
2.3 KiB
Nix
97 lines
2.3 KiB
Nix
{ pkgs
|
|
, lib
|
|
|
|
# Whether to enable module type checking.
|
|
, check ? true
|
|
|
|
# Whether these modules are inside a NixOS submodule.
|
|
, nixosSubmodule ? false
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
modules = [
|
|
./files.nix
|
|
./home-environment.nix
|
|
./manual.nix
|
|
./misc/fontconfig.nix
|
|
./misc/gtk.nix
|
|
./misc/news.nix
|
|
./misc/nixpkgs.nix
|
|
./misc/pam.nix
|
|
./misc/xdg.nix
|
|
./programs/bash.nix
|
|
./programs/beets.nix
|
|
./programs/browserpass.nix
|
|
./programs/command-not-found/command-not-found.nix
|
|
./programs/eclipse.nix
|
|
./programs/emacs.nix
|
|
./programs/feh.nix
|
|
./programs/firefox.nix
|
|
./programs/git.nix
|
|
./programs/gnome-terminal.nix
|
|
./programs/home-manager.nix
|
|
./programs/htop.nix
|
|
./programs/info.nix
|
|
./programs/lesspipe.nix
|
|
./programs/man.nix
|
|
./programs/mercurial.nix
|
|
./programs/neovim.nix
|
|
./programs/rofi.nix
|
|
./programs/ssh.nix
|
|
./programs/termite.nix
|
|
./programs/texlive.nix
|
|
./programs/vim.nix
|
|
./programs/zsh.nix
|
|
./services/blueman-applet.nix
|
|
./services/compton.nix
|
|
./services/dunst.nix
|
|
./services/gnome-keyring.nix
|
|
./services/gpg-agent.nix
|
|
./services/kbfs.nix
|
|
./services/keepassx.nix
|
|
./services/keybase.nix
|
|
./services/network-manager-applet.nix
|
|
./services/owncloud-client.nix
|
|
./services/parcellite.nix
|
|
./services/polybar.nix
|
|
./services/random-background.nix
|
|
./services/redshift.nix
|
|
./services/screen-locker.nix
|
|
./services/stalonetray.nix
|
|
./services/syncthing.nix
|
|
./services/taffybar.nix
|
|
./services/tahoe-lafs.nix
|
|
./services/udiskie.nix
|
|
./services/window-managers/i3.nix
|
|
./services/window-managers/xmonad.nix
|
|
./services/xscreensaver.nix
|
|
./systemd.nix
|
|
./xcursor.nix
|
|
./xresources.nix
|
|
./xsession.nix
|
|
<nixpkgs/nixos/modules/misc/assertions.nix>
|
|
<nixpkgs/nixos/modules/misc/lib.nix>
|
|
<nixpkgs/nixos/modules/misc/meta.nix>
|
|
];
|
|
|
|
pkgsModule = {
|
|
options.nixosSubmodule = mkOption {
|
|
type = types.bool;
|
|
internal = true;
|
|
readOnly = true;
|
|
};
|
|
|
|
config._module.args.baseModules = modules;
|
|
config._module.args.pkgs = lib.mkDefault pkgs;
|
|
config._module.check = check;
|
|
config.lib = import ./lib { inherit lib; };
|
|
config.nixosSubmodule = nixosSubmodule;
|
|
config.nixpkgs.system = mkDefault pkgs.system;
|
|
};
|
|
|
|
in
|
|
|
|
modules ++ [ pkgsModule ]
|