mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: [WIP] add hm and server profiles
This commit is contained in:
parent
bd95ef4c9b
commit
9034735f84
38 changed files with 2559 additions and 2178 deletions
|
|
@ -1,21 +1,24 @@
|
|||
{ self, pkgs, ... }:
|
||||
{ self, lib, config, pkgs, ... }:
|
||||
{
|
||||
programs.nix-index =
|
||||
let
|
||||
commandNotFound = pkgs.runCommandLocal "command-not-found.sh" { } ''
|
||||
mkdir -p $out/etc/profile.d
|
||||
substitute ${self + /scripts/command-not-found.sh} \
|
||||
$out/etc/profile.d/command-not-found.sh \
|
||||
--replace-fail @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \
|
||||
--replace-fail @tput@ ${pkgs.ncurses}/bin/tput
|
||||
'';
|
||||
in
|
||||
options.swarselsystems.modules.nix-index = lib.mkEnableOption "nix-index settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.nix-index {
|
||||
programs.nix-index =
|
||||
let
|
||||
commandNotFound = pkgs.runCommandLocal "command-not-found.sh" { } ''
|
||||
mkdir -p $out/etc/profile.d
|
||||
substitute ${self + /scripts/command-not-found.sh} \
|
||||
$out/etc/profile.d/command-not-found.sh \
|
||||
--replace-fail @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \
|
||||
--replace-fail @tput@ ${pkgs.ncurses}/bin/tput
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "nix-index";
|
||||
paths = [ commandNotFound ];
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "nix-index";
|
||||
paths = [ commandNotFound ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue