-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
executable file
·77 lines (71 loc) · 2.94 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
{
description = "<Shuritch NixOS configuration>";
inputs = {
#################### Official NixOS and HM Package Sources ####################
systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
#################### Utilities ####################
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.url = "github:nix-community/NixOS-WSL";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nix-colors.url = "github:misterio77/nix-colors";
};
outputs = inputs:
let
inherit (inputs.self) outputs;
lib = inputs.nixpkgs.lib // inputs.home-manager.lib;
myLib = import ./src/library { inherit inputs lib; };
inherit (myLib) pkgsForSys mkSystem;
in {
packages = pkgsForSys (pkgs: import ./src/packages { inherit pkgs lib; });
checks = pkgsForSys (pkgs: import ./hooks.nix { inherit inputs pkgs; });
overlays = import ./src/overlays { inherit inputs outputs lib; };
devShells = pkgsForSys (pkgs: import ./shell.nix { inherit pkgs; });
formatter = pkgsForSys (pkgs: pkgs.nixfmt-classic);
templates = import ./src/templates;
/* * * *\
Yes i know i can do it automatically with
`builtins.readDir ./cluster` but i prefer
to do this manually, as it is more clear.
*/
nixosConfigurations.atlas = mkSystem "atlas" {
extraArguments = { inherit myLib inputs outputs; };
source = ./cluster/atlas/configuration.nix;
roles = [ "nodejs-devkit" ];
platform = "x86_64-linux";
home-manager = true;
admin = "chief";
class = "desktop";
origin = "23.11";
};
nixosConfigurations.hermes = mkSystem "hermes" {
extraArguments = { inherit myLib inputs outputs; };
source = ./cluster/hermes/configuration.nix;
roles = [ "nodejs-devkit" "python-devkit" ];
platform = "x86_64-linux";
home-manager = true;
admin = "shuritch";
class = "laptop";
origin = "24.05";
};
nixosConfigurations.pandora = mkSystem "pandora" {
extraArguments = { inherit myLib inputs outputs; };
source = ./cluster/pandora/configuration.nix;
roles = [ "headless" ];
platform = "x86_64-linux";
home-manager = false;
admin = "nixos";
class = "iso";
origin = "24.05";
};
};
}