-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
106 lines (97 loc) · 2.93 KB
/
flake.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-colors.url = "github:misterio77/nix-colors";
base16-vim = {
url = "github:tinted-theming/base16-vim";
flake = false;
};
git-prompt = {
url = "github:woefe/git-prompt.zsh";
flake = false;
};
vim-capnp = {
url = "github:cstrahan/vim-capnp";
flake = false;
};
flake-registry = {
url = "github:nixos/flake-registry";
flake = false;
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs = {
nixpkgs.follows = "nixpkgs";
darwin.follows = "";
home-manager.follows = "home-manager";
};
};
idris2-nvim = {
url = "github:ShinKage/idris2-nvim";
flake = false;
};
};
outputs =
{ self
, nixpkgs
, home-manager
, nix-colors
, base16-vim
, git-prompt
, vim-capnp
, flake-registry
, nix-index-database
, agenix
, idris2-nvim
,
}: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
rec {
system.configurationRevision = self.rev;
# pin nixpkgs to system nixpkgs for determinism
nix.registry.nixpkgs.flake = nixpkgs; # For flake commands
# thanks to
# https://discourse.nixos.org/t/24093/8
nix.nixPath = [ "/etc/nix-path" ]; # For legacy commands
# https://github.com/NixOS/nix/issues/8890#issuecomment-1703988345
nix.settings.nix-path = nix.nixPath;
environment.etc."nix-path/nixpkgs".source = nixpkgs;
# thanks to
# https://discourse.nixos.org/t/32003/3
nix.settings.flake-registry = "${flake-registry}/flake-registry.json";
programs.command-not-found.enable = false;
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
}
system/configuration.nix
nix-index-database.nixosModules.nix-index
agenix.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jess = import user/home.nix;
};
home-manager.extraSpecialArgs = {
inherit nix-colors;
inherit base16-vim;
inherit git-prompt;
inherit vim-capnp;
inherit nix-index-database;
inherit idris2-nvim;
inherit agenix;
};
}
];
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
}