Skip to content

Instantly share code, notes, and snippets.

View Lillecarl's full-sized avatar
🦕
Dinosaurs are a lie!

Carl Lillecarl

🦕
Dinosaurs are a lie!
View GitHub Profile
This file has been truncated, but you can view the full file.
 /
├──  bin
├──  boot
├──  dev
│ ├──  core ⇒ /proc/kcore
│ ├──  fd ⇒ /proc/self/fd
│ ├──  full
│ ├──  mqueue
│ ├──  null
│ ├──  ptmx ⇒ pts/ptmx
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
kubenix/k8s-version: '1.33'
kubenix/project-name: kubenix
name: expressions.cknix.cool
spec:
conversion:
strategy: None
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
kubenix/k8s-version: '1.33'
kubenix/project-name: kubenix
name: expressions.cknix.cool
spec:
conversion:
strategy: None
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
kubenix/k8s-version: '1.33'
kubenix/project-name: kubenix
name: expressions.cknix.cool
spec:
conversion:
strategy: None
let
pkgs = import <nixpkgs> { };
lib = pkgs.lib;
ipScript = pkgs.writeScript "sipscript" ''
#! ${lib.getExe pkgs.fish}
echo \'\'
${lib.getExe pkgs.ipcalc} $argv
echo \'\'
'';
# Apply function to all strings in an attrset recursively through lists as well.
mapStringsDeep =
function: value:
if builtins.isString value then
function value
else if builtins.isAttrs value then
lib.mapAttrs (name: mapStringsDeep function) value
else if builtins.isList value then
map (mapStringsDeep function) value
else
[01:22:40]❌1 ❯ nvd diff /nix/var/nix/profiles/system-838-link/ /nix/var/nix/profiles/system-839-link/
<<< /nix/var/nix/profiles/system-838-link
>>> /nix/var/nix/profiles/system-839-link
Version changes:
[U.] #001 bc 1.08.1 -> 1.08.2
[U.] #002 breeze-icons 6.14.0 -> 6.15.0
[U*] #003 curl 8.13.0 x2, 8.13.0-bin, 8.13.0-debug, 8.13.0-man -> 8.14.1 x2, 8.14.1-bin, 8.14.1-debug, 8.14.1-man
[U.] #004 elfutils 0.192 x2, 0.192-bin, 0.192-dev -> 0.193 x2, 0.193-bin, 0.193-dev
[U.] #005 ell 0.76 x2 -> 0.77 x2
[D*] #006 file 5.46 x3, 5.46-dev, 5.46-man -> 5.45 x3, 5.45-dev, 5.45-man
# Note: nix will also try to replace @@escapeCode@@ and @@text@@ with "@@" and whatever is in the full text. Won't matter in practice
let
replaceStrings' =
{ escapeCode, text, ... }@replacements:
let
names = builtins.map (name: "${escapeCode}${name}${escapeCode}") (builtins.attrNames replacements);
values = builtins.attrValues replacements;
replacedText = builtins.replaceStrings names values text;
verificationMatches = builtins.match "^.*(@@.*@@).*$" replacedText;
verificationError = "Found unreplaced text ${builtins.concatStringsSep " " verificationMatches}";
diff --git a/default.nix b/default.nix
index 18aafb6..0fabd2e 100644
--- a/default.nix
+++ b/default.nix
@@ -148,15 +148,20 @@ let
shortRev = builtins.substring 0 7 info.rev;
}
else if info.type == "path" then
- {
- outPath = builtins.path (
diff --git a/default.nix b/default.nix
index 18aafb6..0fabd2e 100644
--- a/default.nix
+++ b/default.nix
@@ -148,15 +148,20 @@ let
shortRev = builtins.substring 0 7 info.rev;
}
else if info.type == "path" then
- {
- outPath = builtins.path (