-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
99 lines (93 loc) · 2.91 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
{
description = "A simple flake for an atomic system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nixvim.url = "github:Sly-Harvey/nixvim";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
/* Hyprspace = {
url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland";
}; */
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...} @ inputs: let
username = "harvey"; # REPLACE THIS WITH YOUR USERNAME!!! (if manually installing, this is Required.)
system = "x86_64-linux"; # REPLACE THIS WITH YOUR ARCHITECTURE (Rarely need to)
locale = "en_GB.UTF-8"; # REPLACE THIS WITH YOUR LOCALE
timezone = "Europe/London"; # REPLACE THIS WITH YOUR TIMEZONE
lib = nixpkgs.lib;
in {
nixosConfigurations = {
# This is the only config you will have to change (Desktop and Laptop are for my personal use and may not work for you)
nixos = lib.nixosSystem {
inherit system;
specialArgs = {inherit username locale timezone inputs;} // inputs;
modules = [
./hosts/Default/configuration.nix
];
};
Desktop = lib.nixosSystem {
inherit system;
specialArgs = let
hostname = "NixOS-Desktop";
in
{inherit username hostname inputs;} // inputs;
modules = [
./hosts/Desktop/configuration.nix
];
};
Laptop = lib.nixosSystem {
inherit system;
specialArgs = let
hostname = "NixOS-Laptop";
in
{inherit username hostname inputs;} // inputs;
modules = [
./hosts/Laptop/configuration.nix
];
};
Iso = lib.nixosSystem {
inherit system;
specialArgs =
{
username = username;
inherit inputs;
}
// inputs;
modules = [
./hosts/ISO/configuration.nix
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
# or 'home-manager --flake .' for current user in current hostname
#homeConfigurations = {
# ${username} = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.${system};
# modules = [
# ./home/home.nix
# {
# home = {
# username = username;
# homeDirectory = "/home/${username}";
# stateVersion = "23.11";
# };
# }
# ];
# };
#};
};
}