feat: init

This commit is contained in:
2025-12-07 16:52:13 +08:00
commit 58ac814904
6 changed files with 54 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

17
flake.nix Normal file
View File

@@ -0,0 +1,17 @@
{
description = "imxyy_soope's flake templates";
outputs = { self }: {
templates = {
shell = {
description = "Basic nix shell";
path = ./shell;
};
sub-shell = {
description = "Basic nix shell in a `nix` subdirectory";
path = ./sub-shell;
};
};
defaultTemplate = self.templates.shell;
};
}

1
shell/.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

17
shell/flake.nix Normal file
View File

@@ -0,0 +1,17 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-25.11";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
];
};
}
);
}

1
sub-shell/.envrc Normal file
View File

@@ -0,0 +1 @@
use flake path:./nix

17
sub-shell/nix/flake.nix Normal file
View File

@@ -0,0 +1,17 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-25.11";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
];
};
}
);
}