Removed npins
I can use flake's inputs features (I just have to mark the stuff I'm replacing with `flake = false`).
This commit is contained in:
parent
28035db14c
commit
2fc87419ac
73
flake.lock
73
flake.lock
|
@ -25,6 +25,23 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"base16-shell": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1663053609,
|
||||||
|
"narHash": "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=",
|
||||||
|
"owner": "chriskempson",
|
||||||
|
"repo": "base16-shell",
|
||||||
|
"rev": "588691ba71b47e75793ed9edfcfaa058326a6f41",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "chriskempson",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "base16-shell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"deploy-rs": {
|
"deploy-rs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
@ -475,16 +492,37 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"powerlevel10k": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1719815653,
|
||||||
|
"narHash": "sha256-jzLWxLLBB1MZZKJgt5R4oueuQIiqCDKRp+W+PXALHRs=",
|
||||||
|
"owner": "romkatv",
|
||||||
|
"repo": "powerlevel10k",
|
||||||
|
"rev": "2b7da93df04acd04d84f5de827e5b14077839a4b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "romkatv",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "powerlevel10k",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"base16-shell": "base16-shell",
|
||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"snowfall-lib": "snowfall-lib"
|
"powerlevel10k": "powerlevel10k",
|
||||||
|
"snowfall-lib": "snowfall-lib",
|
||||||
|
"tmux-nerd-font-window-name": "tmux-nerd-font-window-name",
|
||||||
|
"zsh-syntax-highlighting": "zsh-syntax-highlighting"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snowfall-lib": {
|
"snowfall-lib": {
|
||||||
|
@ -569,6 +607,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tmux-nerd-font-window-name": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711462967,
|
||||||
|
"narHash": "sha256-5BvzuxrYm/qbfbXLBDzZhJUae0JwNqf96otp/m1l26s=",
|
||||||
|
"owner": "joshmedeski",
|
||||||
|
"repo": "tmux-nerd-font-window-name",
|
||||||
|
"rev": "bc43f25e67ed2d87cb04e27983851da359d79df5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "joshmedeski",
|
||||||
|
"repo": "tmux-nerd-font-window-name",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -608,6 +662,23 @@
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zsh-syntax-highlighting": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704566212,
|
||||||
|
"narHash": "sha256-4rW2N+ankAH4sA6Sa5mr9IKsdAg7WTgrmyqJ2V1vygQ=",
|
||||||
|
"owner": "zsh-users",
|
||||||
|
"repo": "zsh-syntax-highlighting",
|
||||||
|
"rev": "e0165eaa730dd0fa321a6a6de74f092fe87630b0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zsh-users",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "zsh-syntax-highlighting",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -27,6 +27,18 @@
|
||||||
|
|
||||||
nixvim.url = "github:alejandro-angulo/nixvim-config";
|
nixvim.url = "github:alejandro-angulo/nixvim-config";
|
||||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
base16-shell.url = "github:chriskempson/base16-shell/master";
|
||||||
|
base16-shell.flake = false;
|
||||||
|
|
||||||
|
zsh-syntax-highlighting.url = "github:zsh-users/zsh-syntax-highlighting/master";
|
||||||
|
zsh-syntax-highlighting.flake = false;
|
||||||
|
|
||||||
|
powerlevel10k.url = "github:romkatv/powerlevel10k/master";
|
||||||
|
powerlevel10k.flake = false;
|
||||||
|
|
||||||
|
tmux-nerd-font-window-name.url = "github:joshmedeski/tmux-nerd-font-window-name";
|
||||||
|
tmux-nerd-font-window-name.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
namespace,
|
namespace,
|
||||||
...
|
...
|
||||||
|
@ -8,7 +9,6 @@
|
||||||
inherit (lib) mkEnableOption;
|
inherit (lib) mkEnableOption;
|
||||||
inherit (pkgs) tmuxPlugins;
|
inherit (pkgs) tmuxPlugins;
|
||||||
|
|
||||||
sources = import ../../../../npins;
|
|
||||||
cfg = config.${namespace}.apps.tmux;
|
cfg = config.${namespace}.apps.tmux;
|
||||||
in {
|
in {
|
||||||
options.${namespace}.apps.tmux = {
|
options.${namespace}.apps.tmux = {
|
||||||
|
@ -47,7 +47,7 @@ in {
|
||||||
{
|
{
|
||||||
pluginName = "tmux-nerd-font-window-name";
|
pluginName = "tmux-nerd-font-window-name";
|
||||||
version = "2.1.1";
|
version = "2.1.1";
|
||||||
src = sources.tmux-nerd-font-window-name;
|
src = inputs.tmux-nerd-font-window-name;
|
||||||
nativeBuildInputs = [pkgs.makeWrapper];
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
rtpFilePath = "tmux-nerd-font-window-name.tmux";
|
rtpFilePath = "tmux-nerd-font-window-name.tmux";
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
namespace,
|
namespace,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
|
||||||
sources = import ../../../../npins;
|
|
||||||
cfg = config.${namespace}.tools.zsh;
|
cfg = config.${namespace}.tools.zsh;
|
||||||
in {
|
in {
|
||||||
options.${namespace}.tools.zsh = {
|
options.${namespace}.tools.zsh = {
|
||||||
|
@ -35,12 +35,12 @@ in {
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "zsh-syntax-highlighting";
|
name = "zsh-syntax-highlighting";
|
||||||
src = sources.zsh-syntax-highlighting;
|
src = inputs.zsh-syntax-highlighting;
|
||||||
file = "zsh-syntax-highlighting.zsh";
|
file = "zsh-syntax-highlighting.zsh";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "powerlevel10k";
|
name = "powerlevel10k";
|
||||||
src = sources.powerlevel10k;
|
src = inputs.powerlevel10k;
|
||||||
file = "powerlevel10k.zsh-theme";
|
file = "powerlevel10k.zsh-theme";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ in {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "base16-shell";
|
name = "base16-shell";
|
||||||
src = sources.base16-shell;
|
src = inputs.base16-shell;
|
||||||
file = "base16-shell.plugin.zsh";
|
file = "base16-shell.plugin.zsh";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -26,7 +26,6 @@ in {
|
||||||
awscli2
|
awscli2
|
||||||
direnv
|
direnv
|
||||||
minio-client
|
minio-client
|
||||||
npins
|
|
||||||
pre-commit
|
pre-commit
|
||||||
git
|
git
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
# Generated by npins. Do not modify; will be overwritten regularly
|
|
||||||
let
|
|
||||||
data = builtins.fromJSON (builtins.readFile ./sources.json);
|
|
||||||
version = data.version;
|
|
||||||
|
|
||||||
mkSource =
|
|
||||||
spec:
|
|
||||||
assert spec ? type;
|
|
||||||
let
|
|
||||||
path =
|
|
||||||
if spec.type == "Git" then
|
|
||||||
mkGitSource spec
|
|
||||||
else if spec.type == "GitRelease" then
|
|
||||||
mkGitSource spec
|
|
||||||
else if spec.type == "PyPi" then
|
|
||||||
mkPyPiSource spec
|
|
||||||
else if spec.type == "Channel" then
|
|
||||||
mkChannelSource spec
|
|
||||||
else
|
|
||||||
builtins.throw "Unknown source type ${spec.type}";
|
|
||||||
in
|
|
||||||
spec // { outPath = path; };
|
|
||||||
|
|
||||||
mkGitSource =
|
|
||||||
{
|
|
||||||
repository,
|
|
||||||
revision,
|
|
||||||
url ? null,
|
|
||||||
hash,
|
|
||||||
branch ? null,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
assert repository ? type;
|
|
||||||
# At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository
|
|
||||||
# In the latter case, there we will always be an url to the tarball
|
|
||||||
if url != null then
|
|
||||||
(builtins.fetchTarball {
|
|
||||||
inherit url;
|
|
||||||
sha256 = hash; # FIXME: check nix version & use SRI hashes
|
|
||||||
})
|
|
||||||
else
|
|
||||||
assert repository.type == "Git";
|
|
||||||
let
|
|
||||||
urlToName =
|
|
||||||
url: rev:
|
|
||||||
let
|
|
||||||
matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url;
|
|
||||||
|
|
||||||
short = builtins.substring 0 7 rev;
|
|
||||||
|
|
||||||
appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else "";
|
|
||||||
in
|
|
||||||
"${if matched == null then "source" else builtins.head matched}${appendShort}";
|
|
||||||
name = urlToName repository.url revision;
|
|
||||||
in
|
|
||||||
builtins.fetchGit {
|
|
||||||
url = repository.url;
|
|
||||||
rev = revision;
|
|
||||||
inherit name;
|
|
||||||
# hash = hash;
|
|
||||||
};
|
|
||||||
|
|
||||||
mkPyPiSource =
|
|
||||||
{ url, hash, ... }:
|
|
||||||
builtins.fetchurl {
|
|
||||||
inherit url;
|
|
||||||
sha256 = hash;
|
|
||||||
};
|
|
||||||
|
|
||||||
mkChannelSource =
|
|
||||||
{ url, hash, ... }:
|
|
||||||
builtins.fetchTarball {
|
|
||||||
inherit url;
|
|
||||||
sha256 = hash;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
if version == 3 then
|
|
||||||
builtins.mapAttrs (_: mkSource) data.pins
|
|
||||||
else
|
|
||||||
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"
|
|
|
@ -1,62 +0,0 @@
|
||||||
{
|
|
||||||
"pins": {
|
|
||||||
"base16-shell": {
|
|
||||||
"type": "Git",
|
|
||||||
"repository": {
|
|
||||||
"type": "GitHub",
|
|
||||||
"owner": "chriskempson",
|
|
||||||
"repo": "base16-shell"
|
|
||||||
},
|
|
||||||
"branch": "master",
|
|
||||||
"revision": "588691ba71b47e75793ed9edfcfaa058326a6f41",
|
|
||||||
"url": "https://github.com/chriskempson/base16-shell/archive/588691ba71b47e75793ed9edfcfaa058326a6f41.tar.gz",
|
|
||||||
"hash": "0w8g0gyvahkm6zqlwy6lw9ac3hragwh3hvrnvvq2082hdyq4bksz"
|
|
||||||
},
|
|
||||||
"powerlevel10k": {
|
|
||||||
"type": "GitRelease",
|
|
||||||
"repository": {
|
|
||||||
"type": "GitHub",
|
|
||||||
"owner": "romkatv",
|
|
||||||
"repo": "powerlevel10k"
|
|
||||||
},
|
|
||||||
"pre_releases": false,
|
|
||||||
"version_upper_bound": null,
|
|
||||||
"release_prefix": null,
|
|
||||||
"version": "v1.20.0",
|
|
||||||
"revision": "ff0311157d6b24fea21aa70699783f362b0f554f",
|
|
||||||
"url": "https://api.github.com/repos/romkatv/powerlevel10k/tarball/v1.20.0",
|
|
||||||
"hash": "1ha7qb601mk97lxvcj9dmbypwx7z5v0b7mkqahzsq073f4jnybhi"
|
|
||||||
},
|
|
||||||
"tmux-nerd-font-window-name": {
|
|
||||||
"type": "GitRelease",
|
|
||||||
"repository": {
|
|
||||||
"type": "GitHub",
|
|
||||||
"owner": "joshmedeski",
|
|
||||||
"repo": "tmux-nerd-font-window-name"
|
|
||||||
},
|
|
||||||
"pre_releases": false,
|
|
||||||
"version_upper_bound": null,
|
|
||||||
"release_prefix": null,
|
|
||||||
"version": "v2.1.1",
|
|
||||||
"revision": "57961cb0a99b76f20e02639d398c973d81971d05",
|
|
||||||
"url": "https://api.github.com/repos/joshmedeski/tmux-nerd-font-window-name/tarball/v2.1.1",
|
|
||||||
"hash": "1p1biwzr18skjqkjki05ki60dc5cqa9hnh6ldp4py9hw94a27zph"
|
|
||||||
},
|
|
||||||
"zsh-syntax-highlighting": {
|
|
||||||
"type": "GitRelease",
|
|
||||||
"repository": {
|
|
||||||
"type": "GitHub",
|
|
||||||
"owner": "zsh-users",
|
|
||||||
"repo": "zsh-syntax-highlighting"
|
|
||||||
},
|
|
||||||
"pre_releases": false,
|
|
||||||
"version_upper_bound": null,
|
|
||||||
"release_prefix": null,
|
|
||||||
"version": "0.8.0",
|
|
||||||
"revision": "b1379f1ee96b1fe25701c9418c75f81eaabdab56",
|
|
||||||
"url": "https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/tarball/0.8.0",
|
|
||||||
"hash": "1yl8zdip1z9inp280sfa5byjbf2vqh2iazsycar987khjsi5d5w8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": 3
|
|
||||||
}
|
|
Loading…
Reference in a new issue