-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
66 lines (59 loc) · 2.08 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ config, desktop, lib, outputs, pkgs, stateVersion, username, ... }:
let
inherit (pkgs.stdenv) isDarwin;
in
{
# Only import desktop configuration if the host is desktop enabled
# Only import user specific configuration if they have bespoke settings
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
./mixins/console
./modules
]
++ lib.optional (builtins.isString desktop) ./mixins/desktop
++ lib.optional (builtins.isPath (./. + "/mixins/users/${username}")) ./mixins/users/${username};
home = {
# activation.report-changes = if isDarwin then "" else config.lib.dag.entryAnywhere ''
# ${pkgs.nvd}/bin/nvd diff $oldGenPath $newGenPath
# '';
homeDirectory = if isDarwin then "/Users/${username}" else "/home/${username}";
sessionPath = [ "$HOME/.local/bin" ];
inherit stateVersion;
inherit username;
};
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.stable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
};
}