blob: cabce85c889636d550cafec939064400ecd1a348 (
plain) (
blame)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
{
description = "Mora Unie Youer's NixOS configuration";
# This section is hugely uses "input reusing" so that there will be no copies
# of the same repository on flake update
# NOTE: unless it is needed :wink:
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-filter.url = "github:numtide/nix-filter";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nurpkgs = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
nyxpkgs = {
url = "github:chaotic-cx/nyx";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# Secure Boot bootloader
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-parts.follows = "flake-parts";
inputs.rust-overlay.follows = "rust-overlay";
};
# Setup NixOS sound subsystem better
musnix = {
url = "github:musnix/musnix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Applications
astal = {
url = "github:Aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
aylurs-gtk-shell = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
inputs.astal.follows = "astal";
};
fjordlauncher = {
url = "github:unmojang/FjordLauncher";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-filter.follows = "nix-filter";
inputs.flake-compat.follows = "flake-compat";
};
niri = {
url = "github:YaLTeR/niri";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-filter.follows = "nix-filter";
inputs.rust-overlay.follows = ""; # NOTE: for end user is not requried
};
wezterm = {
url = "github:wezterm/wezterm?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.rust-overlay.follows = "rust-overlay";
};
};
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org/"
"https://chaotic-nyx.cachix.org/"
"https://unmojang.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"unmojang.cachix.org-1:OfHnbBNduZ6Smx9oNbLFbYyvOWSoxb2uPcnXPj4EDQY="
];
};
outputs = {
self,
nixpkgs,
nurpkgs,
nyxpkgs,
home-manager,
lanzaboote,
musnix,
fjordlauncher,
niri,
wezterm,
...
} @ inputs:
let
system = "x86_64-linux";
in {
nixosConfigurations.sapphire = nixpkgs.lib.nixosSystem rec {
inherit system;
specialArgs = { inherit inputs; };
modules = [
nurpkgs.modules.nixos.default
nyxpkgs.nixosModules.default
home-manager.nixosModules.home-manager
lanzaboote.nixosModules.lanzaboote
musnix.nixosModules.default
{
nixpkgs.overlays = [
fjordlauncher.overlays.default
niri.overlays.default
];
}
# System Configuration
./system-sapphire.nix
# User Configurations
# mora@sapphire
({ pkgs, ... }: {
users.users.mora = {
isNormalUser = true;
extraGroups = [ "audio" "docker" "libvirtd" "lp" "scanner" "video" "wireshark" "wheel" ];
shell = pkgs.nushell;
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.mora = import ./user-mora.nix;
})
];
};
};
}
|