comma / nh

This commit is contained in:
Joe Frikker
2026-03-13 15:36:47 -04:00
parent de1cad39d8
commit 7d84ed1711
3 changed files with 70 additions and 16 deletions

33
flake.lock generated
View File

@@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771756436, "lastModified": 1773422513,
"narHash": "sha256-Tl2I0YXdhSTufGqAaD1ySh8x+cvVsEI1mJyJg12lxhI=", "narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5bd3589390b431a63072868a90c0f24771ff4cbb", "rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,13 +58,33 @@
"url": "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz" "url": "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz"
} }
}, },
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772945408,
"narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "1c1d8ea87b047788fd7567adf531418c5da321ec",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1773122722, "lastModified": 1773282481,
"narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=", "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50", "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -93,6 +113,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"kube": "kube", "kube": "kube",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@@ -12,9 +12,14 @@
url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz"; url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { nixpkgs, home-manager, kube, ... }: outputs = { nixpkgs, home-manager, kube, nix-index-database, ... }:
let modules-for-system = pkgs: pkgs.stdenv.mkDerivation { let modules-for-system = pkgs: pkgs.stdenv.mkDerivation {
name = "home-manager-modules"; name = "home-manager-modules";
src = pkgs.lib.fileset.toSource { src = pkgs.lib.fileset.toSource {
@@ -43,6 +48,9 @@
inherit pkgs; inherit pkgs;
modules = modules =
[
nix-index-database.homeModules.default
] ++
(pkgs.lib.filter (pkgs.lib.filter
(n: pkgs.lib.strings.hasSuffix ".nix" n) (n: pkgs.lib.strings.hasSuffix ".nix" n)
(pkgs.lib.filesystem.listFilesRecursive "${modules}/base")) ++ (pkgs.lib.filesystem.listFilesRecursive "${modules}/base")) ++
@@ -64,7 +72,9 @@
in home-manager.lib.homeManagerConfiguration { in home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = modules = [
nix-index-database.homeModules.default
] ++
(pkgs.lib.filter (pkgs.lib.filter
(n: pkgs.lib.strings.hasSuffix ".nix" n) (n: pkgs.lib.strings.hasSuffix ".nix" n)
(pkgs.lib.filesystem.listFilesRecursive "${modules}/base")) ++ (pkgs.lib.filesystem.listFilesRecursive "${modules}/base")) ++

View File

@@ -208,6 +208,15 @@ but still nice to have.
} }
#+END_SRC #+END_SRC
** Comma
#+BEGIN_SRC nix :tangle target/base/comma.nix
{
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}
#+END_SRC
** Direnv ** Direnv
~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I ~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I
@@ -350,6 +359,20 @@ The best text editor ever? Heresy!
} }
#+END_SRC #+END_SRC
** Nh
~nh~ is an alternative frontend to home-manager and a few other nix tools that I'm trying out. It
shows what's changing when you update your config, which is nice.
#+BEGIN_SRC nix :tangle target/base/nh.nix
{
programs.nh = {
enable = true;
};
}
#+END_SRC
** Starship ** Starship
~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have ~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have