-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
80 lines (74 loc) · 2.88 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
{
description = "strum355's nix dotfiles";
nixConfig = {
extra-substituters = [ "https://personal-systems.cachix.org" ];
extra-trusted-public-keys = [ "personal-systems.cachix.org-1:yhmUti+2iOTrBWtmZGA71zaPbdQM7iE1k7X9VALPzXM=" ];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ld-rs = {
url = "github:nix-community/nix-ld-rs";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
let
forAllSystems = fn: nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: fn (nixpkgs.legacyPackages.${system}));
in {
nixosConfigurations = {
noah-nixos-desktop = import ./hosts/noah-nixos-desktop { inherit inputs self; };
wd-dl2100 = import ./hosts/wd-dl2100 { inherit inputs self; };
} // (import ./hosts/raspberrypi4 { inherit inputs self; });
overlays = (import ./util.nix).mkOverlays self.packages;
packages = forAllSystems (pkgs':
let
# does this override consumers' setting or will it error later? also apparently precludes x-compile
pkgs = import nixpkgs {
system = pkgs'.system;
config.allowUnfree = true;
};
in {
monostroom = pkgs.callPackage ./pkgs/monostroom.nix { };
code2000 = pkgs.callPackage ./pkgs/code2000.nix { };
polybar-zfs = pkgs.callPackage ./pkgs/polybar-zfs.nix { };
psgrep = pkgs.callPackage ./pkgs/psgrep.nix { };
splatmoji = pkgs.callPackage ./pkgs/splatmoji.nix { };
wdnas-hwdaemon = pkgs.callPackage ./pkgs/wdnas-hwdaemon.nix { };
starpls = pkgs.callPackage ./pkgs/starpls.nix {
rustPlatform = pkgs.makeRustPlatform {
cargo = inputs.rust-overlay.packages.${pkgs'.system}.rust-nightly_2023-12-06;
rustc = inputs.rust-overlay.packages.${pkgs'.system}.rust-nightly_2023-12-06;
};
};
# causes way too much to be rebuilt
# polkit = pkgs.callPackage ./pkgs/polkit.nix { };
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
nixosModules = {
wdnas-hwdaemon = import ./modules/wdnas-hwdaemon.nix;
};
};
}