diff options
author | Karel Kočí <cynerd@email.cz> | 2022-06-27 21:55:07 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-06-27 22:03:38 +0200 |
commit | 16dba0e7e389319cec6967e628d85837f5d46915 (patch) | |
tree | 6c8d09d1ff6c2c79d8406635f81f561bbf97c7a4 /pkgs | |
parent | dbfa517f33ab35f78d8dc3f246aa0078d3db8e05 (diff) | |
download | nixos-personal-16dba0e7e389319cec6967e628d85837f5d46915.tar.gz nixos-personal-16dba0e7e389319cec6967e628d85837f5d46915.tar.bz2 nixos-personal-16dba0e7e389319cec6967e628d85837f5d46915.zip |
nixos/machine/ridcully: update
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/luks-hw-password/default.nix | 20 | ||||
-rwxr-xr-x | pkgs/luks-hw-password/luks-hw-password.sh | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 64de2ac..9950e7b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -13,6 +13,8 @@ let ]; }); + luks-hw-password = callPackage ./luks-hw-password { }; + delft-icon-theme = callPackage ./theme/delft-icon-theme.nix { }; background-lnxpcs = callPackage ./theme/background-lnxpcs.nix { }; swaybackground = callPackage ./theme/swaybackground.nix { }; diff --git a/pkgs/luks-hw-password/default.nix b/pkgs/luks-hw-password/default.nix new file mode 100644 index 0000000..9797735 --- /dev/null +++ b/pkgs/luks-hw-password/default.nix @@ -0,0 +1,20 @@ +{ lib, stdenvNoCC, makeWrapper +, dmidecode, coreutils +}: + +stdenvNoCC.mkDerivation { + pname = "luks-hw-password"; + version = "1.0"; + meta = with lib; { + license = licenses.gpl3; + platforms = platforms.linux; + }; + + nativeBuildInputs = [ makeWrapper ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/bin + makeWrapper ${./luks-hw-password.sh} $out/bin/luks-hw-password \ + --prefix PATH : ${lib.makeBinPath [ dmidecode coreutils ]} + ''; +} diff --git a/pkgs/luks-hw-password/luks-hw-password.sh b/pkgs/luks-hw-password/luks-hw-password.sh new file mode 100755 index 0000000..8ad64bb --- /dev/null +++ b/pkgs/luks-hw-password/luks-hw-password.sh @@ -0,0 +1,6 @@ +#!/bin/sh +{ + dmidecode -s system-uuid + dmidecode -s baseboard-serial-number + dmidecode -s processor-version +} | sha512sum | cut -f1 -d ' ' |