nh: init and remove makeshift fish function

This commit is contained in:
Christoph Hollizeck 2025-06-13 11:57:39 +02:00
parent c49d449516
commit 50150710e9
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
4 changed files with 35 additions and 2 deletions

21
flake.lock generated
View file

@ -1057,6 +1057,26 @@
"type": "github" "type": "github"
} }
}, },
"nh-flake": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1749409404,
"narHash": "sha256-v02NsZ589zzPq5xsCxyrG1/ZkFbbMkUthly50QdmYKo=",
"owner": "nix-community",
"repo": "nh",
"rev": "003dd72d3234361c93d5be7ec9766c88e0dd1052",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nh",
"type": "github"
}
},
"nix": { "nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -1451,6 +1471,7 @@
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"hyprlock": "hyprlock", "hyprlock": "hyprlock",
"hyprpanel": "hyprpanel", "hyprpanel": "hyprpanel",
"nh-flake": "nh-flake",
"nix-ld": "nix-ld", "nix-ld": "nix-ld",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",

View file

@ -28,6 +28,11 @@
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
nh-flake = {
url = "github:nix-community/nh";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
### ###
# hyprland stuff # hyprland stuff
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";

View file

@ -44,7 +44,6 @@ in
}; };
functions = { functions = {
checkHash = "nix hash to-sri --type sha256 $(nix-prefetch-url --unpack $argv)"; checkHash = "nix hash to-sri --type sha256 $(nix-prefetch-url --unpack $argv)";
buildandDeployYggdrasil = "nom build '.#nixosConfigurations.yggdrasil.config.system.build.toplevel' && sudo nixos-rebuild switch --flake .#yggdrasil";
deployNixberry = "nixos-rebuild switch --flake .#nixberry --target-host nixberry --use-remote-sudo --fast"; deployNixberry = "nixos-rebuild switch --flake .#nixberry --target-host nixberry --use-remote-sudo --fast";
deployLoptland = "nixos-rebuild switch --flake .#loptland --target-host christophhollizeck.dev --use-remote-sudo --fast"; deployLoptland = "nixos-rebuild switch --flake .#loptland --target-host christophhollizeck.dev --use-remote-sudo --fast";
checkPR = "cd nixpkgs && ${lib.getExe pkgs.nixpkgs-review} pr $argv --post-result --approve"; checkPR = "cd nixpkgs && ${lib.getExe pkgs.nixpkgs-review} pr $argv --post-result --approve";

View file

@ -1,8 +1,10 @@
{ {
config, config,
inputs,
lib, lib,
namespace, namespace,
pkgs, pkgs,
system,
... ...
}: }:
with lib; with lib;
@ -50,6 +52,12 @@ in
nix-output-monitor nix-output-monitor
]; ];
programs.nh = {
enable = true;
package = inputs.nh-flake.packages.${system}.nh;
flake = "/home/cholli/projects/config";
};
nix = nix =
let let
users = [ users = [
@ -63,7 +71,7 @@ in
settings = settings =
{ {
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes repl-flake";
http-connections = 50; http-connections = 50;
warn-dirty = false; warn-dirty = false;
log-lines = 50; log-lines = 50;