-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
111 lines (103 loc) · 3.43 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
111
{
description = "A Super-Duper Invincible Shining Sparkly Magic NixOS Config"; # Credits: Genshin Impact
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable-small";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
nix-colors.url = "github:misterio77/nix-colors";
catppuccin.url = "github:catppuccin/nix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
distro-grub-themes = {
url = "github:AdisonCavani/distro-grub-themes";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
sops-nix = {
url = "github:Mic92/sops-nix?rev=59d6988329626132eaf107761643f55eb979eef1";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
rofi-jetbrains = {
url = "github:zakuciael/rofi-jetbrains";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
nostale-dev-env = {
url = "github:zakuciael/nostale-dev-env";
inputs.nixpkgs.follows = "nixpkgs";
};
aagl = {
url = "github:ezKEa/aagl-gtk-on-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
};
vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
...
} @ flakeInputs: let
system = "x86_64-linux";
username = "zakuciael";
pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
permittedInsecurePackages = [
"dotnet-sdk-7.0.410" # TODO: Remove when this is merged: https://github.com/NixOS/nixpkgs/pull/360383
];
};
overlays = lib.my.overlays.pkgs ++ lib.singleton (inputs.aagl.overlays.default);
};
inputs =
flakeInputs
// {
distro-grub-themes = flakeInputs.distro-grub-themes.packages.${system};
rofi-jetbrains = flakeInputs.rofi-jetbrains.packages.${system};
nostale-dev-env =
flakeInputs.nostale-dev-env
// {packages = flakeInputs.nostale-dev-env.packages.${system};};
catppuccin =
flakeInputs.catppuccin
// {
homeManagerModule = flakeInputs.catppuccin.homeManagerModules.catppuccin;
nixosModules =
flakeInputs.catppuccin.nixosModules
// {
default = flakeInputs.catppuccin.nixosModules.catppuccin;
};
};
aagl = flakeInputs.aagl // {packages = flakeInputs.aagl.packages.${system};};
vscode-server =
flakeInputs.vscode-server
// {
homeManagerModule = flakeInputs.vscode-server.homeModules.default;
};
};
lib = nixpkgs.lib.extend (self: super: {
hm = home-manager.lib.hm;
my = import ./lib {
inherit lib pkgs inputs username system;
};
});
in {
nixosConfigurations = let
inherit (lib.my.hosts) mkHost;
hosts = builtins.readDir ./hosts;
mappedHosts = builtins.mapAttrs (n: v: mkHost {name = n;}) hosts;
in
mappedHosts;
devShells.${system}.default = pkgs.callPackage ./shell.nix {};
inherit pkgs inputs lib;
};
}