-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
61 lines (59 loc) · 1.93 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
{
description = "Home Manager configuration of crows";
inputs = {
stable-nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stratosphere = {
url = "git+https://git.sr.ht/~fubuki/stratosphere";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = input@{ nixpkgs, stable-nixpkgs, stratosphere, home-manager, ... }:
let
stablePackages = [ "awscli2" ];
stableOverlay = final: prev: builtins.listToAttrs
(map (name: { name = name; value = stable-nixpkgs.legacyPackages.${prev.system}.${name}; }) stablePackages);
stratosphereOverlay = final: prev: { stra = stratosphere.packages.${prev.system}; };
pkgModule = { pkgs, ... }: {
nixpkgs.overlays = [
input.rust-overlay.overlays.default
stableOverlay
stratosphereOverlay
];
nixpkgs.config = { allowUnfree = true; allowUnfreePredicate = (_: true); };
};
mkHome = home: system:
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
pkgModule
input.sops-nix.homeManagerModule
./modules
home
];
extraSpecialArgs = {
inherit system;
clips = import ./clips nixpkgs.legacyPackages.${system} system;
};
};
in
{
homeConfigurations = {
nest = mkHome ./homes/nest.nix "x86_64-linux";
pica = mkHome ./homes/pica.nix "aarch64-darwin";
raven = mkHome ./homes/raven.nix "aarch64-darwin";
};
};
}