Add flake templates and defaultApp
defaultApp lets you use bin/hey via nix run.
This commit is contained in:
parent
a1ab0811bb
commit
c92199848c
17
flake.nix
17
flake.nix
|
@ -64,10 +64,21 @@
|
||||||
devShell."${system}" =
|
devShell."${system}" =
|
||||||
import ./shell.nix { inherit pkgs; };
|
import ./shell.nix { inherit pkgs; };
|
||||||
|
|
||||||
templates.hey = {
|
templates = {
|
||||||
|
full = {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
description = "A grossly incandescent nixos framework";
|
description = "A grossly incandescent nixos config";
|
||||||
|
};
|
||||||
|
minimal = {
|
||||||
|
path = ./templates/minimal;
|
||||||
|
description = "A grossly incandescent and minimal nixos config";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
defaultTemplate = self.templates.minimal;
|
||||||
|
|
||||||
|
defaultApp."${system}" = {
|
||||||
|
type = "app";
|
||||||
|
program = ./bin/hey;
|
||||||
};
|
};
|
||||||
defaultTemplate = self.templates.hey;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
16
templates/minimal/flake.nix
Normal file
16
templates/minimal/flake.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
description = "A grossly incandescent nixos config.";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
dotfiles.url = "github:hlissner/dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ { dotfiles, ... }: {
|
||||||
|
nixosConfigurations = dotfiles.lib.mapHosts ./hosts {
|
||||||
|
imports = [
|
||||||
|
# If this is a linode machine
|
||||||
|
# "${dotfiles}/hosts/linode.nix"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
0
templates/minimal/hosts/.git-keep
Normal file
0
templates/minimal/hosts/.git-keep
Normal file
0
templates/minimal/hosts/main/default.nix
Normal file
0
templates/minimal/hosts/main/default.nix
Normal file
Loading…
Reference in a new issue