-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
181 lines (168 loc) · 5.45 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
description = "NixOS configuration for my personal laptop";
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
disko = {
url = "github:nix-community/disko";
inputs.disko.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
nixpkgs-stable.url = "github:NixOS/nixpkgs/release-24.11";
nur.url = "github:nix-community/NUR";
stylix.url = "github:danth/stylix/release-23.05";
nixvim = {
url = "github:nix-community/nixvim/nixos-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
nixarr = {
url = "github:rasmus-kirk/nixarr";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-stable,
nur,
home-manager,
firefox-addons,
nixarr,
stylix,
nixvim,
disko,
...
} @ inputs: let
systemSettings = {
system = "x86_64-linux";
timezone = "America/New_York";
hostname = "nixos"; # hostname
profile = "personal"; # select a profile defined from my profiles directory
locale = "en_US.UTF-8"; # select locale
};
userSettings = {
username = "sean"; # username
name = "Sean"; # name/identifier
email = "[email protected]"; # email (used for certain configurations)
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
#theme = "io"; # selcted theme from my themes directory (./themes/)
#wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/
# window manager type (hyprland or x11) translator
#wmType =
# if ((wm == "hyprland") || (wm == "plasma"))
#then "wayland"
#else "x11";
# browser = "qutebrowser"; # Default browser; must select one from ./user/app/browser/
term = "alacritty"; # Default terminal command;
#font = "Intel One Mono"; # Selected font
#fontPkg = pkgs.intel-one-mono; # Font package
#editor = "neovide"; # Default editor;
homeDir = "/home/sean";
};
pkgs = import nixpkgs {
system = "x86_64-linux";
config = {allowUnfree = true;};
}; #addon-pkgs = pkgs.callPackage firefox-addons { };
in {
#apps.x86_64-linux = {
# disko = disko.defaultApp.x86_64-linux;
# };
# Please replace my-nixos with your hostname
nixosConfigurations.${systemSettings.hostname} = nixpkgs.lib.nixosSystem rec {
#inherit systemSettings.system;
system = "x86_64-linux";
specialArgs = {
inherit systemSettings;
pkgs-stable = import nixpkgs-stable {
system = system;
config.allowUnfree = true;
};
nur = import nur {
system = system;
config.allowUnfree = true;
};
firefox-addons = import firefox-addons {
system = system;
config.allowUnfree = true;
};
nixarr = import nixarr {
system = system;
config.allowUnfree = true;
};
stylix = import stylix {
system = system;
config.allowUnfree = true;
};
nixvim = import nixvim {
system = system;
config.allowUnfree = true;
};
inherit pkgs inputs;
};
modules = [
# ./disko-config.nix
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
./configuration.nix
#./nixos/servarr/configuration.nix
inputs.disko.nixosModules.disko
nixarr.nixosModules.default
stylix.nixosModules.stylix
inputs.impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager
# (import ./disko-config.nix {device = "/dev/vda";})
{
# home-manager.extraSpecialArgs = specialArgs;
home-manager.extraSpecialArgs = {
inherit inputs;
inherit userSettings;
pkgs-stable = import nixpkgs-stable {
system = system;
config.allowUnfree = true;
};
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
nixvim.homeManagerModules.nixvim
# inputs.impermanence.homeManagerModules.impermanence
];
home-manager.users.sean = import ./home.nix {
inherit pkgs;
inherit userSettings;
pkgs-stable = import nixpkgs-stable {
system = system;
config.allowUnfree = true;
};
config = pkgs.config;
stylix.targets.xyz.enable = false;
};
}
];
};
# homeConfigurations = {
# "sean@nixos" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
# extraSpecialArgs = {inherit inputs outputs;};
# modules = [
# ./home.nix
# ];
# };
# };
# homeConfigurations."sean@nixos" = home-manager.lib.homeManagerConfiguration {
# inherit pkgs;
# extraSpecialArgs = { inherit inputs; };
# modules = [ ./home.nix ];
# };
};
}