-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·138 lines (127 loc) · 4.22 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
{
description = "Cade's Root Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
# Also see the 'stable-packages' overlay at 'modules/overlays/default.nix'.
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor";
nix-software-center.url = "github:snowfallorg/nix-software-center";
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
musnix.url = "github:musnix/musnix";
kwin-effects-forceblur = {
url = "github:taj-ny/kwin-effects-forceblur";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-stable,
nixos-hardware,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
mkSystem = modules:
nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = {inherit inputs outputs;};
};
in rec {
inherit nixpkgs;
inherit nixpkgs-stable;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild switch --flake ./dotfiles#your-hostname'
nixosConfigurations = {
veridia = mkSystem [./hosts/veridia]; # Desktop PC
elysia = mkSystem [./hosts/elysia]; # Surface Pro Laptop
vapor = mkSystem [./hosts/vapor]; # Steam Deck
# Steam Deck
# vapor = nixpkgs.lib.nixosSystem {
# specialArgs = {
# inherit inputs outputs;
# user.name = "cade";
# user.Name = "Cade";
# host = "vapor";
# };
# modules = [
# inputs.jovian.nixosModules.default
# ./hosts/vapor/configuration.nix
# {
# home-manager = {
# useGlobalPkgs = true;
# useUserPackages = true;
# users.cade = import ./hosts/vapor/home.nix;
# extraSpecialArgs = {
# inherit inputs outputs;
# user = outputs.my.user;
# };
# };
# }
# ];
# };
};
# Your custom packages
# Accessible through 'nix build', 'nix shell', e.g.,
# nix shell /home/reinis/dotfiles#mypkgs.x86_64-linux.arcanPackages.arcan
mypkgs = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./pkgs {inherit pkgs;}
);
# nixpkgs with your modifications applied
# nix shell /home/reinis/dotfiles#modified-pkgs.x86_64-linux.arcanPackages.arcan
modified-pkgs = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [overlays.modifications];
}
);
# Unmodified nixpkgs
# nix shell /home/reinis/dotfiles#unmodified-pkgs.x86_64-linux.arcanPackages.arcan
# Probably could have called this "pkgs", but I'm not sure if that could break something.
unmodified-pkgs = forAllSystems (
system: nixpkgs.legacyPackages.${system}
);
# Devshell for bootstrapping
# Acessible through 'nix develop'
devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./shell.nix {inherit pkgs;}
);
# Your custom packages and modifications, exported as overlays
overlays = import ./modules/overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
};
}
# Based on https://github.com/Misterio77/nix-starter-configs
# and https://github.com/ttrei/dotfiles/