-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
86 lines (72 loc) · 2.36 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
{
description = "Home of Artemis";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
stable.url = "github:nixos/nixpkgs/nixos-24.05";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprcursor = {
url = "git+https://github.com/hyprwm/hyprcursor?ref=refs%2Fheads%2Fmain";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?ref=refs%2Fheads%2Fmain&submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
inputs.hyprcursor.follows = "hyprcursor";
};
hyprland-plugins = {
url = "git+https://github.com/hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = { nixpkgs, stable, home-manager, flake-parts, ... }@inputs:
let
device = "/dev/disk/by-id/ata-Samsung_SSD_870_EVO_4TB_S757NS0X302547W";
hostname = "nixos";
system = "x86_64-linux";
username = "m3l6h";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ system ];
flake = {
# NixOS configuration entrypoint
# Available through 'sudo nixos-rebuild switch --flake .#hostname'
nixosConfigurations = {
"${hostname}" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit device inputs username; };
modules = [
inputs.disko.nixosModules.default
(import ./disko.nix { inherit device; })
./configs/nixos/configuration.nix
inputs.home-manager.nixosModules.default
inputs.impermanence.nixosModules.impermanence
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager switch --flake .#username'
homeConfigurations = {
"${username}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs username;
};
modules = [ ./homes/${username}/home.nix ];
};
};
};
};
}