-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
104 lines (100 loc) · 3.27 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
{
description = "❄️ My NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
# Last commit from nixos-unstable with working packages
nixpkgs-working.url = "github:nixos/nixpkgs/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507";
darkly = {
url = "github:Bali10050/Darkly/FeatureDarkly";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
hardware.url = "github:nixos/nixos-hardware";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
kwin-better-blur = {
url = "github:taj-ny/kwin-effects-forceblur/window-rules";
inputs.nixpkgs.follows = "nixpkgs";
};
kwin-effects-startupfeedback-busy-cursor = {
url = "github:taj-ny/kwin-effects-startupfeedback-busy-cursor";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = {
self,
home-manager,
nixpkgs,
...
} @ inputs: let
inherit (self) outputs;
lib = nixpkgs.lib.extend (_: _: import ./lib { lib = nixpkgs.lib; });
systems = [ "x86_64-linux" ];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (system: import nixpkgs {
inherit system;
config.allowUnfree = true;
});
in
rec {
inherit lib;
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
# Hack to get home suggestions when using the home-manager NixOS module
homeConfigurations.nixd = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {
inherit inputs outputs;
lib = lib.extend (_: _: inputs.home-manager.lib);
};
modules = [
{
imports = builtins.attrValues homeManagerModules;
home = {
homeDirectory = "/";
stateVersion = "25.05";
username = "nixd";
};
}
];
pkgs = pkgsFor.x86_64-linux;
};
homeManagerModules = import ./home/modules;
nixosConfigurations =
lib.mapAttrs (name: value:
lib.nixosSystem {
inherit lib;
modules = [
./nixos/config/_shared/global
./nixos/config/${name}
{
environment.etc.current-config.text = "${toString self}";
networking.hostName = name;
}
] ++ (builtins.attrValues nixosModules);
specialArgs = { inherit inputs outputs; };
}
) (
builtins.removeAttrs (
builtins.readDir ./nixos/config
) [ "common" ]
);
nixosModules = import ./nixos/modules;
overlays = import ./overlays { inherit inputs lib; };
packages = forEachSystem (pkgs: import ./pkgs/default.nix { inherit lib pkgs; });
};
}