forked from Mic92/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
121 lines (100 loc) · 4.09 KB
/
Copy pathflake.nix
File metadata and controls
121 lines (100 loc) · 4.09 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
description = "NixOS configuration with flakes";
nixConfig.extra-substituters = [
#"https://mic92.cachix.org"
"https://cache.thalheim.io"
];
nixConfig.extra-trusted-public-keys = [
"cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc="
#"mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
];
# To update all inputs:
# $ nix flake update
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
#systemd.url = "git+file:///home/joerg/git/systemd";
#systemd.flake = false;
nixos-generators = {
#url = "github:nix-community/nixos-generators";
url = "github:Mic92/nixos-generators/fedf7136f27490402fe8ab93e67fafae80513e9b";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:Mic92/nixpkgs/main";
nixpkgs-systemd.url = "github:pennae/nixpkgs/systemd-oom";
# for development
#nixpkgs.url = "/home/joerg/git/nixpkgs";
nur.url = "github:nix-community/NUR";
# for development
#sops-nix.url = "/home/joerg/git/sops-nix";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
bme680-mqtt.url = "github:Mic92/bme680-mqtt";
bme680-mqtt.inputs.flake-parts.follows = "flake-parts";
bme680-mqtt.inputs.nixpkgs.follows = "nixpkgs";
retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
nixos-hardware.url = "github:NixOS/nixos-hardware";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
harmonia.url = "github:nix-community/harmonia";
harmonia.inputs.flake-parts.follows = "flake-parts";
harmonia.inputs.nixpkgs.follows = "nixpkgs";
doom-emacs.url = "github:doomemacs/doomemacs/master";
doom-emacs.flake = false;
flake-registry.url = "github:NixOS/flake-registry";
flake-registry.flake = false;
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
hyprland = {
url = "github:hyprwm/Hyprland";
# build with your own instance of nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
# build with your own instance of nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
srvos.url = "github:numtide/srvos";
srvos.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ { self, flake-parts, nixpkgs, ... }:
(flake-parts.lib.evalFlakeModule
{ inherit inputs; }
{
imports = [
./nixos/flake-module.nix
./nixos/images/flake-module.nix
./home-manager/flake-module.nix
./terraform/flake-module.nix
./devshell/flake-module.nix
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
perSystem = { config, inputs', ... }: {
# make pkgs available to all `perSystem` functions
_module.args.pkgs = inputs'.nixpkgs.legacyPackages;
formatter = config.treefmt.build.wrapper;
};
# CI
flake.hydraJobs =
let
inherit (nixpkgs) lib;
buildHomeManager = arch:
lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}-${arch}" config.activation-script) self.legacyPackages.${arch}.homeConfigurations;
in
(lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) self.nixosConfigurations)
// (buildHomeManager "x86_64-linux")
// (buildHomeManager "aarch64-linux")
// (buildHomeManager "aarch64-darwin")
// {
inherit (self.checks.x86_64-linux) treefmt;
};
}).config.flake;
}