-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
130 lines (119 loc) · 3.15 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
122
123
124
125
126
127
128
129
130
{
description = "Weathercold's NixOS Flake";
inputs = {
# Repos
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
## TODO: Actually use
# nur.url = "github:nix-community/NUR";
nixd = {
url = "github:nix-community/nixd";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
# 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";
home-manager = {
# Fork to add option to specify default specialisation
url = "github:Weathercold/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
# catppuccin.url = "github:Weathercold/nix/patch";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# Data
catppuccin-fcitx5 = {
url = "github:catppuccin/fcitx5";
flake = false;
};
};
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"
"armv7l-linux"
];
perSystem =
{ inputs', pkgs, ... }:
with pkgs;
{
formatter = nixfmt-rfc-style;
devShells.default = mkShell {
packages = [
cachix
deploy-rs
inputs'.nixd.packages.nixd
nil
nixfmt-rfc-style
nix-init
nix-prefetch-github # Somehow not in nix-prefetch-scripts
nix-prefetch-scripts
];
shellHook = ''
export NIXPKGS_ALLOW_BROKEN=1
'';
};
};
};
}