-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
49 lines (44 loc) · 1.18 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
{
description = "A Home Manager flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
# our default nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, home-manager }: {
inherit home-manager;
makeDefaults = import ./home.nix;
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
thisHM = home-manager.packages.${system}.default;
install = pkgs.substituteAll {
src = ./install.sh;
isExecutable = true;
inherit (pkgs) bash git;
defaultFlake = ./default-flake.nix;
defaultReadme = ./default-readme.md;
};
update = pkgs.substituteAll {
src = ./update.sh;
isExecutable = true;
inherit (pkgs) bash;
homeManager = thisHM;
};
in
{
inherit pkgs;
apps.default = {
type = "app";
program = "${install}";
};
apps.update = {
type = "app";
program = "${update}";
};
}
);
}