-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
93 lines (85 loc) · 2.61 KB
/
Copy pathflake.nix
File metadata and controls
93 lines (85 loc) · 2.61 KB
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
{
description = "AgentElement's configuration files";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/master";
# Nix user repository, mostly for firefox extensions
nur.url = "github:nix-community/nur";
nur.inputs.nixpkgs.follows = "nixpkgs";
# Home-manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Community hardware-specific configs
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Secrets management
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
self,
nixpkgs,
nur,
home-manager,
nixos-hardware,
sops-nix,
...
} @ inputs:
let
inherit (self) outputs;
systems = [ "x86_64-linux" ];
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
overlays = {
nuroverlay = nur.overlay;
} // import ./overlays { inherit inputs; };
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
nixosConfigurations = {
delta = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
./hardware/framework13/configuration.nix
sops-nix.nixosModules.sops
];
};
theta = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hardware/frameworkdesktop/configuration.nix
sops-nix.nixosModules.sops
];
};
lambda = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hardware/frameworkserver/configuration.nix
sops-nix.nixosModules.sops
];
};
};
homeConfigurations = {
agentelement = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
# use `pkgs.nur` to access nur packages.
nur.modules.homeManager.default
inputs.sops-nix.homeManagerModules.sops
./home/home.nix
];
};
};
};
}