-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·90 lines (75 loc) · 2.17 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
{
description = "coredev-uk flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware/master";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "unstable";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "unstable";
catppuccin.url = "github:catppuccin/nix";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "unstable";
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "unstable";
# TODO: Remove when https://github.com/NixOS/nixpkgs/pull/363992 is merged
zen-browser.url = "github:omarcresp/zen-browser-flake";
};
outputs =
{
self,
unstable,
...
}@inputs:
let
inherit (self) outputs;
stateVersion = "24.05";
username = "paul";
flakePath = "/home/${username}/.dotfiles";
libx = import ./lib {
inherit
self
inputs
outputs
stateVersion
username
flakePath
;
};
in
{
homeConfigurations = {
"${username}@atlas" = libx.mkHome {
hostname = "atlas";
desktop = "i3";
};
};
nixosConfigurations = {
atlas = libx.mkHost {
hostname = "atlas";
desktop = "i3";
};
};
# Custom packages; acessible via 'nix build', 'nix shell', etc
packages = libx.forAllSystems (
system:
let
pkgs = unstable.legacyPackages.${system};
in
import ./pkgs { inherit pkgs; }
);
# Custom overlays
overlays = import ./overlays { inherit inputs; };
# Devshell for bootstrapping
# Accessible via 'nix develop' or 'nix-shell' (legacy)
devShells = libx.forAllSystems (
system:
let
pkgs = unstable.legacyPackages.${system};
in
import ./shell.nix { inherit pkgs; }
);
formatter = libx.forAllSystems (system: self.packages.${system}.nixfmt-plus);
};
}