nixdirfmt + getAlias function

This commit is contained in:
kat witch 2021-08-30 03:31:55 +01:00
parent 589bef29fa
commit 5da38c626d
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
7 changed files with 89 additions and 83 deletions

View file

@ -1,8 +1,10 @@
{ config, tf, meta, kw, pkgs, lib, sources, ... }: with lib; let
oci-root = meta.deploy.targets.oci-root.tf;
addr_ipv6_nix = let
addr_ipv6_nix =
let
prefix = head (splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block"));
in assert hasSuffix "::" prefix; prefix + "7";
in
assert hasSuffix "::" prefix; prefix + "7";
in
{
imports = (with (import (sources.tf-nix + "/modules")); [

View file

@ -20,6 +20,9 @@ in
nano = ''
${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png}
'';
getAlias = ''
printf '%s\n' $aliases[$1]
'';
} // shellFunAliases {
sed = "sd";
find = "fd";

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
let initvim = pkgs.callPackage
let
initvim = pkgs.callPackage
({ stdenv, elinks, nodejs }: stdenv.mkDerivation {
name = "init.vim";
src = ./init.vim;