all repos — nixfiles @ 4adec9478c8712d2e018279534cd36ec00eb5596

System and user configuration, managed by nix and home-manager

user/settings/nix.nix (view raw)

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
{
  config,
  pkgs,
  lib,
  ...
}:
let
  lixPackageSet = import ../../shared/lix.nix { inherit pkgs; };
in
{
  nixpkgs.config = import ../config.nix;
  nix = {
    enable = true;
    # needed for "standalone" home-manager, conflicts with module
    package = lib.mkDefault lixPackageSet.lix;
  };
  programs.direnv.nix-direnv.package = lixPackageSet.nix-direnv;

  # workaround https://github.com/nix-community/home-manager/issues/8786
  home.activation.installPackages = lib.mkForce (
    lib.hm.dag.entryAfter [ "writeBoundary" ] ''
      nixProfileRemove home-manager-path
      if [[ -e ${config.home.profileDirectory}/manifest.json ]]; then
        run nix profile install ${config.home.path}
      else
        run nix-env -i ${config.home.path}
      fi
    ''
  );

  home.packages = with pkgs; [
    angrr
    nix-tree
  ];
  programs.nixvim.plugins = {
    nix.enable = true;
  };
}