-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
110 lines (95 loc) · 3.23 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
{
description = "RuhOs";
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
settings = import (./. + "/settings.nix") { inherit pkgs; };
pkgs = import nixpkgs { system = settings.system; };
in {
# NixOS + Home-Manager configuration entrypoint.
nixosConfigurations = {
${settings.hostname} = nixpkgs.lib.nixosSystem {
modules = [
# Import NixOS and Disko configs here
inputs.disko.nixosModules.disko
(./. + "/profiles" + ("/" + settings.profile)
+ "/configuration.nix")
# Import Home-Manager and Stylix configs here
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${settings.username}.imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs.stylix.homeManagerModules.stylix
(./profiles + ("/" + settings.profile) + "/home.nix")
];
extraSpecialArgs = {
inherit inputs;
inherit settings;
};
};
}
# In case that someone will want to connect to this host with VSCode
inputs.vscode-server.nixosModules.default
{ services.vscode-server.enable = true; }
];
specialArgs = {
inherit inputs;
inherit settings;
};
};
};
# Standalone home-manager configuration entrypoint.
homeConfigurations = {
${settings.username} = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${settings.system};
modules = [
(./. + "/profiles" + ("/" + settings.profile) + "/home.nix")
inputs.stylix.homeManagerModules.stylix
inputs.nixvim.homeManagerModules.nixvim
];
extraSpecialArgs = {
inherit inputs;
inherit settings;
};
};
};
};
inputs = {
# Required package
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
# For widgets like status bar at the top
ags.url = "github:Aylur/ags/v1";
# For customizing system
stylix.url = "github:danth/stylix";
# For connection to this machine with VSCode
vscode-server.url = "github:nix-community/nixos-vscode-server";
# For handling dotfiles in ~/.config/
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# Customizing my neovim config
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declarative disk partitioning
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hyprland
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
# hypr-dynamic-cursors = {
# url = "github:VirtCode/hypr-dynamic-cursors";
# inputs.hyprland.follows =
# "hyprland"; # to make sure that the plugin is built for the correct version of hyprland
# };
};
}