mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 14:30:59 -05:00
corrected override inputs
This commit is contained in:
parent
f561def1a6
commit
94b25e5b5c
3 changed files with 265 additions and 0 deletions
1
templates/ed/.envrc
Normal file
1
templates/ed/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
||||||
146
templates/ed/flake.lock
generated
Normal file
146
templates/ed/flake.lock
generated
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"fran": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nvimConfig",
|
||||||
|
"rixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1768802006,
|
||||||
|
"narHash": "sha256-czGb4RwTBahNNK9S7ySXeTWIrn/jKH+74hN/uIS2XrM=",
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "fran",
|
||||||
|
"rev": "a3879317519fd3685f3b7679a1de4c5ae65a7cb9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "fran",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769598131,
|
||||||
|
"narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fa83fd837f3098e3e678e6cf017b2b36102c7211",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nvimConfig": {
|
||||||
|
"inputs": {
|
||||||
|
"fran": "fran",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"plugins-cmp-pandoc-references": "plugins-cmp-pandoc-references",
|
||||||
|
"plugins-r": "plugins-r",
|
||||||
|
"rixpkgs": [
|
||||||
|
"rixpkgs"
|
||||||
|
],
|
||||||
|
"wrappers": "wrappers"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769773342,
|
||||||
|
"narHash": "sha256-eHU4lhLWfCTTG3Wyn1M35PHxUcY+pILoTPwvyJ3X1jI=",
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "nvimConfig",
|
||||||
|
"rev": "8d183d78effd3d33398819f8eb2f6d673d46d4c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "dwinkler1",
|
||||||
|
"repo": "nvimConfig",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins-cmp-pandoc-references": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743491695,
|
||||||
|
"narHash": "sha256-XsdneGNJzmRBggk8lz9JNDQYk7wbYfUAF2oZLXzFb9c=",
|
||||||
|
"owner": "jmbuhr",
|
||||||
|
"repo": "cmp-pandoc-references",
|
||||||
|
"rev": "130eae4f75029d6495808e0ea4b769fa1ce4c9ac",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jmbuhr",
|
||||||
|
"repo": "cmp-pandoc-references",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins-r": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769736135,
|
||||||
|
"narHash": "sha256-T4QgcBL+LCXvrEiRE2JW4jtUKl8DKzFHk8czGUO1jgY=",
|
||||||
|
"owner": "R-nvim",
|
||||||
|
"repo": "R.nvim",
|
||||||
|
"rev": "2701ec64f5485e17c0e057081a9ae2058d776464",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "R-nvim",
|
||||||
|
"repo": "R.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769430759,
|
||||||
|
"narHash": "sha256-Z63gLlvj2WnJoi/3/3oOLBipuYII+sfTT1C+8BTt+5c=",
|
||||||
|
"owner": "rstats-on-nix",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4cf98f12168c1974a040ea34756f8dec5cfc793e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rstats-on-nix",
|
||||||
|
"ref": "2026-01-26",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nvimConfig": "nvimConfig",
|
||||||
|
"rixpkgs": "rixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrappers": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nvimConfig",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769745458,
|
||||||
|
"narHash": "sha256-Fq6THKEiAKx+wWQ4wTg9HvOAyD6i8JkWfHVQDZH7Byo=",
|
||||||
|
"owner": "BirdeeHub",
|
||||||
|
"repo": "nix-wrapper-modules",
|
||||||
|
"rev": "cc5e052dd1e93ae75dc06e3fabf46f0820c272f2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "BirdeeHub",
|
||||||
|
"repo": "nix-wrapper-modules",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
118
templates/ed/flake.nix
Normal file
118
templates/ed/flake.nix
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
{
|
||||||
|
description = "Project Editor";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
rixpkgs.url = "github:rstats-on-nix/nixpkgs/2026-01-26";
|
||||||
|
nvimConfig = {
|
||||||
|
url = "github:dwinkler1/nvimConfig";
|
||||||
|
inputs = {
|
||||||
|
rixpkgs.follows = "rixpkgs";
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nvimConfig,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
systems = nixpkgs.lib.systems.flakeExposed;
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
projectSettings = {pkgs}: {
|
||||||
|
cats = {
|
||||||
|
clickhouse = false;
|
||||||
|
gitPlugins = false;
|
||||||
|
julia = false;
|
||||||
|
lua = false;
|
||||||
|
markdown = false;
|
||||||
|
nix = true;
|
||||||
|
optional = false;
|
||||||
|
python = false;
|
||||||
|
r = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = let
|
||||||
|
# With `replace` packages are replaced otherwise they are merged with base packages
|
||||||
|
replace = pkgs.lib.mkForce;
|
||||||
|
in {
|
||||||
|
lang_packages = {
|
||||||
|
python = replace (
|
||||||
|
(with pkgs.python3Packages; [
|
||||||
|
duckdb
|
||||||
|
polars
|
||||||
|
])
|
||||||
|
++ (
|
||||||
|
if builtins.pathExists ./python-packages.nix
|
||||||
|
# p: with p; [ ... ]
|
||||||
|
then import ./python-packages.nix pkgs.python3Packages
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
r = replace (
|
||||||
|
(with pkgs.rpkgs.rPackages; [
|
||||||
|
fixest
|
||||||
|
# pkgs.extraRPackages.musicMetadata
|
||||||
|
])
|
||||||
|
++ (
|
||||||
|
if builtins.pathExists ./r-packages.nix
|
||||||
|
# p: with p.rPackages; [ ... ]
|
||||||
|
then import ./r-packages.nix pkgs.rpkgs
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
julia = replace ([
|
||||||
|
"StatsBase"
|
||||||
|
]
|
||||||
|
++ (
|
||||||
|
if builtins.pathExists ./julia-packages.nix
|
||||||
|
# [ ... ]
|
||||||
|
then import ./julia-packages.nix
|
||||||
|
else []
|
||||||
|
));
|
||||||
|
};
|
||||||
|
colorscheme = "kanagawa";
|
||||||
|
background = "dark";
|
||||||
|
wrapRc = true;
|
||||||
|
};
|
||||||
|
binName = "vv";
|
||||||
|
|
||||||
|
specs.extraLua = let
|
||||||
|
name = builtins.baseNameOf (builtins.toString ./.);
|
||||||
|
in {
|
||||||
|
data = pkgs.vimPlugins.mini-notify;
|
||||||
|
before = ["INIT_MAIN"];
|
||||||
|
config = ''
|
||||||
|
require("mini.notify").setup()
|
||||||
|
vim.notify = MiniNotify.make_notify()
|
||||||
|
vim.notify("Welcome to ${name}!")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
overlays = [inputs.nvimConfig.overlays.dependencies];
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (system: let
|
||||||
|
pkgs = import nixpkgs {inherit system overlays;};
|
||||||
|
baseNvim = nvimConfig.packages.${system}.default;
|
||||||
|
|
||||||
|
nvim = (baseNvim.eval (projectSettings {inherit pkgs;})).config.wrapper;
|
||||||
|
default = nvim;
|
||||||
|
in {
|
||||||
|
default = nvim;
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forAllSystems (system: let
|
||||||
|
pkgs = import nixpkgs {inherit system overlays;};
|
||||||
|
nv = self.packages.${system}.default;
|
||||||
|
in {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = [nv pkgs.updateR];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue