-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
121 lines (111 loc) · 2.89 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
description = "Weathercold's NixOS Flake";
inputs = {
# Repos
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# bocchi-cursors = {
# url = "github:Weathercold/Bocchi-Cursors";
# inputs = {
# nixpkgs.follows = "nixpkgs";
# flake-parts.follows = "flake-parts";
# };
# };
# Utils
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
lanzaboote = {
# Fork that adds an UKI mode
url = "github:linyinfeng/lanzaboote/uki";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
flake-parts,
...
}@inputs:
let
lib = import ./lib { inherit (nixpkgs) lib; };
extLib = nixpkgs.lib.extend (_: _: { abszero = lib; });
in
flake-parts.lib.mkFlake
{
inherit inputs;
specialArgs.lib = extLib;
}
{
imports = [
./pkgs/flake-module.nix
./nixos/flake-module.nix
./home/flake-module.nix
];
# Expose flake-parts options for nixd
debug = true;
flake = {
# FIXME: This is suboptimal, would be better to put checks where
# deploy is defined.
checks.x86_64-linux = inputs.deploy-rs.lib.x86_64-linux.deployChecks self.deploy;
inherit lib;
};
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
perSystem =
{ pkgs, ... }:
with pkgs;
{
formatter = nixfmt-rfc-style;
devShells.default = mkShell {
packages = [
cachix
deploy-rs
nixd
nil
nixfmt-rfc-style
nixos-anywhere
nix-init
nix-prefetch-github # Somehow not in nix-prefetch-scripts
nix-prefetch-scripts
];
shellHook = ''
export NIXPKGS_ALLOW_BROKEN=1
'';
};
};
};
}