mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
removed gitignore
This commit is contained in:
parent
08e48987d4
commit
32ed13ca57
17 changed files with 188 additions and 19 deletions
173
templates/rde/.devenv.flake.nix
Normal file
173
templates/rde/.devenv.flake.nix
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
{
|
||||
inputs =
|
||||
let
|
||||
version = "1.8.2";
|
||||
system = "aarch64-darwin";
|
||||
devenv_root = "/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde";
|
||||
devenv_dotfile = "/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/.devenv";
|
||||
devenv_dotfile_path = ./.devenv;
|
||||
devenv_tmpdir = "/tmp/nix-shell.loyuJp";
|
||||
devenv_runtime = "/tmp/nix-shell.loyuJp/devenv-e545512";
|
||||
devenv_istesting = false;
|
||||
devenv_direnvrc_latest_version = 1;
|
||||
container_name = null;
|
||||
|
||||
in {
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
pre-commit-hooks.follows = "git-hooks";
|
||||
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
|
||||
devenv.url = "github:cachix/devenv?dir=src/modules";
|
||||
} // (if builtins.pathExists (devenv_dotfile_path + "/flake.json")
|
||||
then builtins.fromJSON (builtins.readFile (devenv_dotfile_path + "/flake.json"))
|
||||
else { });
|
||||
|
||||
outputs = { nixpkgs, ... }@inputs:
|
||||
let
|
||||
version = "1.8.2";
|
||||
system = "aarch64-darwin";
|
||||
devenv_root = "/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde";
|
||||
devenv_dotfile = "/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/.devenv";
|
||||
devenv_dotfile_path = ./.devenv;
|
||||
devenv_tmpdir = "/tmp/nix-shell.loyuJp";
|
||||
devenv_runtime = "/tmp/nix-shell.loyuJp/devenv-e545512";
|
||||
devenv_istesting = false;
|
||||
devenv_direnvrc_latest_version = 1;
|
||||
container_name = null;
|
||||
|
||||
devenv =
|
||||
if builtins.pathExists (devenv_dotfile_path + "/devenv.json")
|
||||
then builtins.fromJSON (builtins.readFile (devenv_dotfile_path + "/devenv.json"))
|
||||
else { };
|
||||
getOverlays = inputName: inputAttrs:
|
||||
map
|
||||
(overlay:
|
||||
let
|
||||
input = inputs.${inputName} or (throw "No such input `${inputName}` while trying to configure overlays.");
|
||||
in
|
||||
input.overlays.${overlay} or (throw "Input `${inputName}` has no overlay called `${overlay}`. Supported overlays: ${nixpkgs.lib.concatStringsSep ", " (builtins.attrNames input.overlays)}"))
|
||||
inputAttrs.overlays or [ ];
|
||||
overlays = nixpkgs.lib.flatten (nixpkgs.lib.mapAttrsToList getOverlays (devenv.inputs or { }));
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = devenv.nixpkgs.per-platform."${system}".allowUnfree or devenv.nixpkgs.allowUnfree or devenv.allowUnfree or false;
|
||||
allowBroken = devenv.nixpkgs.per-platform."${system}".allowBroken or devenv.nixpkgs.allowBroken or devenv.allowBroken or false;
|
||||
cudaSupport = devenv.nixpkgs.per-platform."${system}".cudaSupport or devenv.nixpkgs.cudaSupport or false;
|
||||
cudaCapabilities = devenv.nixpkgs.per-platform."${system}".cudaCapabilities or devenv.nixpkgs.cudaCapabilities or [ ];
|
||||
permittedInsecurePackages = devenv.nixpkgs.per-platform."${system}".permittedInsecurePackages or devenv.nixpkgs.permittedInsecurePackages or devenv.permittedInsecurePackages or [ ];
|
||||
};
|
||||
inherit overlays;
|
||||
};
|
||||
lib = pkgs.lib;
|
||||
importModule = path:
|
||||
if lib.hasPrefix "./" path
|
||||
then if lib.hasSuffix ".nix" path
|
||||
then ./. + (builtins.substring 1 255 path)
|
||||
else ./. + (builtins.substring 1 255 path) + "/devenv.nix"
|
||||
else if lib.hasPrefix "../" path
|
||||
then throw "devenv: ../ is not supported for imports"
|
||||
else
|
||||
let
|
||||
paths = lib.splitString "/" path;
|
||||
name = builtins.head paths;
|
||||
input = inputs.${name} or (throw "Unknown input ${name}");
|
||||
subpath = "/${lib.concatStringsSep "/" (builtins.tail paths)}";
|
||||
devenvpath = "${input}" + subpath;
|
||||
devenvdefaultpath = devenvpath + "/devenv.nix";
|
||||
in
|
||||
if lib.hasSuffix ".nix" devenvpath
|
||||
then devenvpath
|
||||
else if builtins.pathExists devenvdefaultpath
|
||||
then devenvdefaultpath
|
||||
else throw (devenvdefaultpath + " file does not exist for input ${name}.");
|
||||
project = pkgs.lib.evalModules {
|
||||
specialArgs = inputs // { inherit inputs; };
|
||||
modules = [
|
||||
({ config, ... }: {
|
||||
_module.args.pkgs = pkgs.appendOverlays (config.overlays or [ ]);
|
||||
})
|
||||
(inputs.devenv.modules + /top-level.nix)
|
||||
{
|
||||
devenv.cliVersion = version;
|
||||
devenv.root = devenv_root;
|
||||
devenv.dotfile = devenv_dotfile;
|
||||
}
|
||||
({ options, ... }: {
|
||||
config.devenv = lib.mkMerge [
|
||||
(pkgs.lib.optionalAttrs (builtins.hasAttr "tmpdir" options.devenv) {
|
||||
tmpdir = devenv_tmpdir;
|
||||
})
|
||||
(pkgs.lib.optionalAttrs (builtins.hasAttr "isTesting" options.devenv) {
|
||||
isTesting = devenv_istesting;
|
||||
})
|
||||
(pkgs.lib.optionalAttrs (builtins.hasAttr "runtime" options.devenv) {
|
||||
runtime = devenv_runtime;
|
||||
})
|
||||
(pkgs.lib.optionalAttrs (builtins.hasAttr "direnvrcLatestVersion" options.devenv) {
|
||||
direnvrcLatestVersion = devenv_direnvrc_latest_version;
|
||||
})
|
||||
];
|
||||
})
|
||||
(pkgs.lib.optionalAttrs (container_name != null) {
|
||||
container.isBuilding = pkgs.lib.mkForce true;
|
||||
containers.${container_name}.isBuilding = true;
|
||||
})
|
||||
] ++ (map importModule (devenv.imports or [ ])) ++ [
|
||||
(if builtins.pathExists ./devenv.nix then ./devenv.nix else { })
|
||||
(devenv.devenv or { })
|
||||
(if builtins.pathExists ./devenv.local.nix then ./devenv.local.nix else { })
|
||||
(if builtins.pathExists (devenv_dotfile_path + "/cli-options.nix") then import (devenv_dotfile_path + "/cli-options.nix") else { })
|
||||
];
|
||||
};
|
||||
config = project.config;
|
||||
|
||||
options = pkgs.nixosOptionsDoc {
|
||||
options = builtins.removeAttrs project.options [ "_module" ];
|
||||
warningsAreErrors = false;
|
||||
# Unpack Nix types, e.g. literalExpression, mDoc.
|
||||
transformOptions =
|
||||
let isDocType = v: builtins.elem v [ "literalDocBook" "literalExpression" "literalMD" "mdDoc" ];
|
||||
in lib.attrsets.mapAttrs (_: v:
|
||||
if v ? _type && isDocType v._type then
|
||||
v.text
|
||||
else if v ? _type && v._type == "derivation" then
|
||||
v.name
|
||||
else
|
||||
v
|
||||
);
|
||||
};
|
||||
|
||||
# Recursively search for outputs in the config.
|
||||
# This is used when not building a specific output by attrpath.
|
||||
build = options: config:
|
||||
lib.concatMapAttrs
|
||||
(name: option:
|
||||
if lib.isOption option then
|
||||
let typeName = option.type.name or "";
|
||||
in
|
||||
if builtins.elem typeName [ "output" "outputOf" ] then
|
||||
{ ${name} = config.${name}; }
|
||||
else { }
|
||||
else
|
||||
let v = build option config.${name};
|
||||
in if v != { } then {
|
||||
${name} = v;
|
||||
} else { }
|
||||
)
|
||||
options;
|
||||
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
in
|
||||
{
|
||||
devShell = lib.genAttrs systems (system: config.shell);
|
||||
packages = lib.genAttrs systems (system: {
|
||||
optionsJSON = options.optionsJSON;
|
||||
# deprecated
|
||||
inherit (config) info procfileScript procfileEnv procfile;
|
||||
ci = config.ciDerivation;
|
||||
});
|
||||
devenv = config;
|
||||
build = build project.options project.config;
|
||||
};
|
||||
}
|
||||
1
templates/rde/.devenv/bash
Symbolic link
1
templates/rde/.devenv/bash
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/w6y2cw4j0x2vwfg5pbcdvs5777f9g6af-bash-interactive-5.3p0
|
||||
1
templates/rde/.devenv/devenv.json
Normal file
1
templates/rde/.devenv/devenv.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"inputs":{"nixpkgs":{"url":"github:cachix/devenv-nixpkgs/rolling"}}}
|
||||
1
templates/rde/.devenv/flake.json
Normal file
1
templates/rde/.devenv/flake.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"nixpkgs":{"url":"github:cachix/devenv-nixpkgs/rolling"}}
|
||||
1
templates/rde/.devenv/gc/shell
Symbolic link
1
templates/rde/.devenv/gc/shell
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
shell-7-link
|
||||
1
templates/rde/.devenv/gc/shell-7-link
Symbolic link
1
templates/rde/.devenv/gc/shell-7-link
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/d128nm92pwnf9zqc35q6lddwqf6scjlq-devenv-shell-env
|
||||
0
templates/rde/.devenv/imports.txt
Normal file
0
templates/rde/.devenv/imports.txt
Normal file
7
templates/rde/.devenv/input-paths.txt
Normal file
7
templates/rde/.devenv/input-paths.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/.devenv/flake.json
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/.devenv.flake.nix
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/.env
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/devenv.local.nix
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/devenv.lock
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/devenv.nix
|
||||
/Users/daniel/_work_system/10_19_development/13_configs/13.05_project_template/templates/rde/devenv.yaml
|
||||
1
templates/rde/.devenv/load-exports
Executable file
1
templates/rde/.devenv/load-exports
Executable file
|
|
@ -0,0 +1 @@
|
|||
|
||||
BIN
templates/rde/.devenv/nix-eval-cache.db
Normal file
BIN
templates/rde/.devenv/nix-eval-cache.db
Normal file
Binary file not shown.
BIN
templates/rde/.devenv/nix-eval-cache.db-shm
Normal file
BIN
templates/rde/.devenv/nix-eval-cache.db-shm
Normal file
Binary file not shown.
BIN
templates/rde/.devenv/nix-eval-cache.db-wal
Normal file
BIN
templates/rde/.devenv/nix-eval-cache.db-wal
Normal file
Binary file not shown.
1
templates/rde/.devenv/profile
Symbolic link
1
templates/rde/.devenv/profile
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/ddih6n6jg2804pmhqnmbf2xwbhm225wv-devenv-profile
|
||||
1
templates/rde/.devenv/run
Symbolic link
1
templates/rde/.devenv/run
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/tmp/nix-shell.loyuJp/devenv-e545512
|
||||
BIN
templates/rde/.devenv/tasks.db
Normal file
BIN
templates/rde/.devenv/tasks.db
Normal file
Binary file not shown.
BIN
templates/rde/.devenv/tasks.db-wal
Normal file
BIN
templates/rde/.devenv/tasks.db-wal
Normal file
Binary file not shown.
19
templates/rde/.gitignore
vendored
19
templates/rde/.gitignore
vendored
|
|
@ -1,19 +0,0 @@
|
|||
# Devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
|
||||
# Devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
Loading…
Add table
Add a link
Reference in a new issue