-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
85 lines (83 loc) · 2.54 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 = "panavtec/NixOS configuration";
inputs = {
nixos.url = "github:NixOS/nixpkgs/nixos-24.11";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nur.url = "github:nix-community/NUR";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixos";
};
nvchad-starter = {
url = "path:./config/nvchad";
flake = false;
};
nvchad4nix = {
url = "github:nix-community/nix4nvchad";
inputs.nixpkgs.follows = "nixos";
inputs.nvchad-starter.follows = "nvchad-starter";
};
};
outputs =
{ nixos
, nixos-unstable
, nixos-hardware
, home-manager
, nur
, nvchad4nix
, ...
}@attrs:
let
overlayNixOSUnstable = final: prev: {
unstable = import nixos-unstable {
system = prev.system;
config.allowUnfree= true;
};
};
overlayNvChad = final: prev: {
nvchad = nvchad4nix.packages."${prev.system}".nvchad;
};
baseModules = [
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ overlayNixOSUnstable overlayNvChad nur.overlays.default ];
}
nur.modules.nixos.default
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = false;
users.panavtec = import ./nixos/home.nix;
extraSpecialArgs = attrs;
};
}
];
in
{
nixosConfigurations = {
# sudo nixos-rebuild --flake .#goku switch
goku = nixos.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.channels = { inherit nixos nixos-unstable; };
modules = baseModules ++ [
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-hidpi
nixos-hardware.nixosModules.common-cpu-amd-pstate
./nixos/machines/goku/configuration.nix
];
};
# sudo nixos-rebuild --flake .#jiren switch
jiren = nixos.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.channels = { inherit nixos nixos-unstable; };
modules = baseModules ++ [
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-gpu-amd
./nixos/machines/jiren/configuration.nix
];
};
};
};
}