-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
121 lines (107 loc) · 3.37 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 = "my dots :)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
hardware.url = "github:nixos/nixos-hardware";
impermanence.url = "github:nix-community/impermanence";
nix-colors.url = "github:misterio77/nix-colors";
nix-ld = {
url = "github:Mic92/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprwm-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
rose-pine-hyprcursor = {
url = "github:ndom91/rose-pine-hyprcursor";
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "flake-utils";
};
};
nh = {
url = "github:viperML/nh";
inputs.nixpkgs.follows = "nixpkgs"; # override this repo's nixpkgs snapshot
};
};
outputs = {
self,
nixpkgs,
flake-utils,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
});
in {
inherit lib;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
# templates = import ./templates;
overlays = import ./overlays {inherit inputs outputs;};
# hydraJobs = import ./hydra.nix { inherit inputs outputs; };
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
wallpapers = import ./home/alan/wallpapers;
nixosConfigurations = {
# Main desktop
zwei-pc = lib.nixosSystem {
modules = [./hosts/zwei-pc];
specialArgs = {inherit inputs outputs;};
};
# Laptop
gamer-think = lib.nixosSystem {
modules = [./hosts/gamer-think];
specialArgs = {inherit inputs outputs;};
};
};
homeConfigurations = {
"alan@zwei-pc" = lib.homeManagerConfiguration {
modules = [./home/alan/zwei-pc.nix];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
};
"alan@gamer-think" = lib.homeManagerConfiguration {
modules = [./home/alan/gamer-think.nix];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
};
};
};
}