-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
144 lines (137 loc) · 4.63 KB
/
Copy pathflake.nix
File metadata and controls
144 lines (137 loc) · 4.63 KB
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
{
description = "A simple NixOS flake";
inputs = {
# NixOS official package source, using the nixos-25.05 branch here
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
musnix.url = "github:/musnix/musnix";
eza = {
url = "github:eza-community/eza";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
bunny-yazi = {
url = "github:stelcodes/bunny.yazi";
flake = false;
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
niri.url = "github:sodiboo/niri-flake";
way-edges.url = "github:way-edges/way-edges";
catppuccin.url = "github:catppuccin/nix";
nix-alien.url = "github:thiagokokada/nix-alien";
nur-bandithedoge.url = "github:bandithedoge/nur-packages";
# home-manager for user configs
home-manager = {
url = "github:nix-community/home-manager/";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
catppuccin,
...
}@inputs:
{
# Please replace my-nixos with your hostname
nixosConfigurations = {
tayuun = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
system = "x86_64-linux";
modules = [
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
./hosts/laptop/configuration.nix
./home/cachix.nix
catppuccin.nixosModules.catppuccin
inputs.home-manager.nixosModules.home-manager
inputs.musnix.nixosModules.musnix
(
{ config, ... }:
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
system = config.nixpkgs.hostPlatform.system;
};
home-manager.users.yui = import ./home;
nixpkgs.overlays = with inputs; [
inputs.nix-alien.overlays.default
(final: prev: {
zen-browser = inputs.zen-browser.packages.${prev.system}.default;
})
(_: prev: {
bandithedoge = nur-bandithedoge.legacyPackages.${prev.system}
;})
];
}
)
{
home-manager.users.yui.imports = [
inputs.niri.homeModules.niri
catppuccin.homeModules.catppuccin
inputs.zen-browser.homeModules.default
inputs.way-edges.homeManagerModules.default
];
}
{
users.users.root = {
# normal root user config if any
};
# Add root home-manager config here:
home-manager.users.root = {
home.stateVersion = "25.11"; # <<< Add this
};
}
];
};
pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
./hosts/pc/configuration.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.yui = import ./home;
nixpkgs.overlays = with inputs; [
nix-alien.overlays.default
(final: prev: {
zen-browser = zen-browser.packages.${prev.system}.default;
})
];
}
{
home-manager.users.yui.imports = [
inputs.niri.homeModules.niri
catppuccin.homeModules.catppuccin
inputs.zen-browser.homeModules.default
inputs.way-edges.homeManagerModules.default
];
}
{
users.users.root = {
# normal root user config if any
};
# Add root home-manager config here:
home-manager.users.root = {
home.stateVersion = "25.11"; # <<< Add this
};
}
];
};
};
};
}