-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
97 lines (89 loc) · 2.76 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
{
description = "My config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
# nixgl = {
# url = "github:guibou/nixGL";
# inputs.nixpkgs.follows = "nixpkgs";
# };
terminal-config.url = "github:iancleary/terminal-config";
};
outputs =
{ self
, nixpkgs
, nixpkgs-unstable
, nixos-hardware
, home-manager
, agenix
# , nixgl
, terminal-config
, ...
}@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
in
rec {
overlays = {
unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
inherit (nixpkgs-unstable.legacyPackages.${prev.system}) neovim-unwrapped;
};
neovimPlugins = terminal-config.overlays.default;
agenix = agenix.overlays.default;
# nixgl = nixgl.overlays.default;
};
legacyPackages = forAllSystems (system:
import inputs.nixpkgs {
inherit system;
overlays = builtins.attrValues overlays;
config.allowUnfree = true;
}
);
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
devShells = forAllSystems (system: {
default = nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { };
ansible = nixpkgs.legacyPackages.${system}.callPackage ./shells/ansible.nix { };
lint = nixpkgs.legacyPackages.${system}.callPackage ./shells/lint.nix { };
});
formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixpkgs-fmt);
nixosConfigurations =
let
defaultModules = (builtins.attrValues nixosModules) ++ [
agenix.nixosModules.default
home-manager.nixosModules.default
];
specialArgs = { inherit inputs outputs; };
in
{
odroid1 = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "x86_64-linux";
modules = defaultModules ++ [
./nixos/odroid1
];
};
odroid2 = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "x86_64-linux";
modules = defaultModules ++ [
./nixos/odroid2
];
};
};
};
}