-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
115 lines (108 loc) · 2.9 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
112
113
114
115
{
description = "Sanzoghenzo home systems configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
catppuccin.url = "github:catppuccin/nix";
deploy-rs.url = "github:serokell/deploy-rs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs@{
self,
nixpkgs,
home-manager,
deploy-rs,
# disko,
nixos-hardware,
agenix,
...
}:
let
system = "x86_64-linux";
myPkgsOverlay = final: prev: (import ./pkgs { pkgs = prev; });
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
myPkgsOverlay
agenix.overlays.default
];
};
deployPkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
deploy-rs.overlay
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
inherit
(import ./utils.nix {
inherit
inputs
system
pkgs
deployPkgs
;
})
mkSystem
mkDeploy
;
in
rec {
# systems configuration
nixosConfigurations = {
discovery = mkSystem [
./systems/discovery
nixos-hardware.nixosModules.dell-xps-15-9560-intel
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.sanzo = import ./home/dev-desktop.nix;
};
}
];
viewscreen = mkSystem [
# disko.nixosModules.disko
./systems/viewscreen
nixos-hardware.nixosModules.common-cpu-intel
];
zora = mkSystem [
./systems/zora
nixos-hardware.nixosModules.common-cpu-intel
];
};
# profiles to use with nix develop
devShells."${system}".default = pkgs.mkShell {
buildInputs = [
pkgs.nix
pkgs.home-manager
pkgs.git
pkgs.go-task
pkgs.helix
pkgs.deploy-rs
];
};
# deploy-rs profiles
deploy.nodes = {
viewscreen = mkDeploy "viewscreen";
zora = mkDeploy "zora";
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
};
}