System: Install nps to search nixpkgs from a terminal environment
This commit is contained in:
180
flake.lock
generated
180
flake.lock
generated
@ -3,7 +3,9 @@
|
|||||||
"ags": {
|
"ags": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"astal": "astal",
|
"astal": "astal",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744557573,
|
"lastModified": 1744557573,
|
||||||
@ -107,7 +109,7 @@
|
|||||||
},
|
},
|
||||||
"devshell": {
|
"devshell": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741473158,
|
"lastModified": 1741473158,
|
||||||
@ -125,7 +127,9 @@
|
|||||||
},
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -157,6 +161,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"revCount": 57,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
@ -217,6 +235,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748942041,
|
"lastModified": 1748942041,
|
||||||
@ -302,11 +335,31 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"naersk": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733346208,
|
||||||
|
"narHash": "sha256-a4WZp1xQkrnA4BbnKrzJNr+dYoQr5Xneh2syJoddFyE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "naersk",
|
||||||
|
"rev": "378614f37a6bee5a3f2ef4f825a73d948d3ae921",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "naersk",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-alien": {
|
"nix-alien": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747908601,
|
"lastModified": 1747908601,
|
||||||
@ -361,16 +414,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743583204,
|
"lastModified": 1722073938,
|
||||||
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
|
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -393,82 +446,31 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722073938,
|
"lastModified": 1748693115,
|
||||||
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
|
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
|
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748693115,
|
"lastModified": 1734323986,
|
||||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/wj2qla569hnxwqfc26imv5hqbxc1rc27-source",
|
||||||
"repo": "nixpkgs",
|
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
|
||||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
"type": "path"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-unstable",
|
"type": "indirect"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747179050,
|
|
||||||
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_5": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1748693115,
|
|
||||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_6": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1748693115,
|
|
||||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
@ -494,10 +496,35 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nps": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"naersk": "naersk",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1738483270,
|
||||||
|
"narHash": "sha256-q/PkigsNAI7MCmeDFBMGuZJFXVL95pQCNOVhNvBH9dc=",
|
||||||
|
"owner": "OleMussmann",
|
||||||
|
"repo": "nps",
|
||||||
|
"rev": "2d005f22a52a0bda19d1afd8736ad5bfcb1d38cf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "OleMussmann",
|
||||||
|
"repo": "nps",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -547,8 +574,9 @@
|
|||||||
"hyprpanel": "hyprpanel",
|
"hyprpanel": "hyprpanel",
|
||||||
"nix-alien": "nix-alien",
|
"nix-alien": "nix-alien",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
|
"nps": "nps",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
18
flake.nix
18
flake.nix
@ -16,20 +16,34 @@
|
|||||||
# NeoVim <3
|
# NeoVim <3
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# blink-cmp.url = "github:saghen/blink.cmp";
|
|
||||||
|
|
||||||
# Nix User Repository (e.g. Firefox addons)
|
# Nix User Repository (e.g. Firefox addons)
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
|
nur.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Ags for widgets (this was a terrible idea)
|
# Ags for widgets (this was a terrible idea)
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
|
ags.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Hyprpanel
|
||||||
hyprpanel.url = "github:jas-singhfsu/hyprpanel";
|
hyprpanel.url = "github:jas-singhfsu/hyprpanel";
|
||||||
hyprpanel.inputs.nixpkgs.follows = "nixpkgs";
|
hyprpanel.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Other
|
# Nix Package Search - nps
|
||||||
|
nps.url = "github:OleMussmann/nps";
|
||||||
|
nps.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Declarative Flatpak
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||||
|
nix-flatpak.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Creates an environment containing required libraries for an executable
|
||||||
nix-alien.url = "github:thiagokokada/nix-alien";
|
nix-alien.url = "github:thiagokokada/nix-alien";
|
||||||
|
nix-alien.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Emacs nightly
|
||||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
|
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# TODO: Move away from devshell, as it breaks e.g. C++/Rust library propagation
|
# TODO: Move away from devshell, as it breaks e.g. C++/Rust library propagation
|
||||||
# and doesn't provide any benefits for me
|
# and doesn't provide any benefits for me
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with mylib.networking; {
|
with mylib.networking; {
|
||||||
@ -404,6 +405,9 @@ with mylib.networking; {
|
|||||||
# Start dynamically linked executable using "nix-alien-ld -- <Executable>"
|
# Start dynamically linked executable using "nix-alien-ld -- <Executable>"
|
||||||
inputs.nix-alien.packages.${system}.nix-alien
|
inputs.nix-alien.packages.${system}.nix-alien
|
||||||
|
|
||||||
|
# Search nixpkgs
|
||||||
|
inputs.nps.packages.${system}.default
|
||||||
|
|
||||||
# egl-wayland
|
# egl-wayland
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -538,6 +542,33 @@ with mylib.networking; {
|
|||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
# TODO: Technically this should be a user service if it runs as ${username}?
|
||||||
|
timers."refresh-nps-cache" = {
|
||||||
|
wantedBy = ["timers.target"];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "weekly"; # or however often you'd like
|
||||||
|
Persistent = true;
|
||||||
|
Unit = "refresh-nps-cache.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services."refresh-nps-cache" = {
|
||||||
|
# Make sure `nix` and `nix-env` are findable by systemd.services.
|
||||||
|
path = ["/run/current-system/sw/"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "${username}"; # ⚠️ replace with your "username" or "${user}", if it's defined
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
set -eu
|
||||||
|
echo "Start refreshing nps cache..."
|
||||||
|
${inputs.nps.packages.${system}.default}/bin/nps -dddd -e -r
|
||||||
|
echo "... finished nps cache with exit code $?."
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# The current system was installed on 22.05, do not change.
|
# The current system was installed on 22.05, do not change.
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
Reference in New Issue
Block a user