-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
147 lines (131 loc) · 3.68 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{
description = "Wölfchen's nixos configs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
eww = {
# see https://github.com/elkowar/eww/pull/1217
url = "github:w-lfchen/eww/feat/updates";
# url = "github:elkowar/eww";
inputs = {
flake-compat.follows = "flake-compat";
nixpkgs.follows = "nixpkgs";
};
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
flake-utils.follows = "flake-utils";
};
};
scripts-flake = {
url = "github:w-lfchen/eww-scripts";
inputs.nixpkgs.follows = "nixpkgs";
};
# private configuration
# CAUTION: this configuration will be world readable in the nix store
private-configs.url = "git+ssh://[email protected]/w-lfchen/private-nixos-configs";
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};
};
# just for 'follows'
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat/refs/pull/65/head";
};
outputs =
{
self,
nixpkgs,
home-manager,
catppuccin,
eww,
lix-module,
nix-vscode-extensions,
scripts-flake,
private-configs,
spicetify-nix,
# not used
flake-utils,
flake-compat,
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
# extend nixpks lib with own lib
overlays = [ (final: prev: { lib = prev.lib // import ./lib prev; }) ];
};
modules = pkgs.lib.dirToSet ./modules;
# relative paths in the config directory
paths = {
config = ./config;
patches = ./patches;
wallpapers = ./wallpapers;
};
scripts = scripts-flake.packages.${system};
specialArgs = {
inherit
inputs
modules
paths
scripts
;
};
extraSpecialArgs = {
inherit inputs modules paths;
};
in
{
nixosConfigurations = {
mirage = nixpkgs.lib.nixosSystem {
inherit specialArgs system;
modules = [
./hosts/mirage/configuration.nix
private-configs.mirage.configuration
];
};
refuge = nixpkgs.lib.nixosSystem {
inherit specialArgs system;
modules = [
./hosts/refuge/configuration.nix
private-configs.refuge.configuration
];
};
};
# currently using home-manager through a standalone install, this might change in the future
homeConfigurations = {
mirage = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = [
./hosts/mirage/home.nix
private-configs.mirage.home
];
};
refuge = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = [
./hosts/refuge/home.nix
private-configs.refuge.home
];
};
};
formatter.${system} = pkgs.nixfmt-rfc-style;
};
}