-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
92 lines (92 loc) · 2.85 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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
modded-minecraft-servers.url =
"github:frantisekhanzlikbl/nixos-modded-minecraft-servers/patch-1";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { home-manager, modded-minecraft-servers, nixos-generators
, nixos-hardware, nixpkgs, nixpkgs-stable, nixvim, sops-nix, ... }:
let
lib = nixpkgs.lib.extend (final: prev:
{
my = import ./lib.nix { lib = final; };
} // home-manager.lib);
system = "x86_64-linux";
pkgs-stable = import nixpkgs-stable { inherit system; };
in {
nixosConfigurations = {
nixos-desktop = lib.nixosSystem {
specialArgs = {
inherit (nixvim.homeManagerModules) nixvim;
inherit lib;
};
modules = [
home-manager.nixosModules.home-manager
{ home-manager.extraSpecialArgs = { inherit pkgs-stable; }; }
modded-minecraft-servers.module
sops-nix.nixosModules.sops
./hosts/desktop.nix
];
};
nixos-home-server = lib.nixosSystem {
specialArgs = {
inherit (nixvim.homeManagerModules) nixvim;
inherit lib;
};
modules = [
home-manager.nixosModules.home-manager
modded-minecraft-servers.module
sops-nix.nixosModules.sops
./hosts/home-server.nix
];
};
nixos-laptop = lib.nixosSystem {
specialArgs = {
inherit (nixvim.homeManagerModules) nixvim;
inherit lib;
};
modules = [
home-manager.nixosModules.home-manager
modded-minecraft-servers.module
nixos-hardware.nixosModules.apple-t2
sops-nix.nixosModules.sops
./hosts/laptop.nix
];
};
};
packages.${system} = {
iso = nixos-generators.nixosGenerate {
inherit system;
format = "iso";
specialArgs = {
inherit (nixvim.homeManagerModules) nixvim;
inherit lib;
};
modules = [
home-manager.nixosModules.home-manager
modded-minecraft-servers.module
./iso.nix
];
};
};
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-classic;
};
}