mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 04:00:42 +00:00
Major rewrite: switching back to Arch from NixOS
This commit is contained in:
parent
df585b737b
commit
254181c0fc
121 changed files with 5433 additions and 2371 deletions
28
root/usr/lib/initcpio/install/numlock
Normal file
28
root/usr/lib/initcpio/install/numlock
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
build() {
|
||||
add_binary /bin/bash
|
||||
add_binary /usr/bin/setleds
|
||||
add_binary /usr/local/bin/numlock
|
||||
|
||||
cat >"$BUILDROOT/usr/lib/systemd/system/numlock.service" <<EOF
|
||||
[Unit]
|
||||
Description=Enable numlock
|
||||
Before=cryptsetup-pre.target
|
||||
DefaultDependencies=no
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/local/bin/numlock
|
||||
EOF
|
||||
|
||||
add_systemd_unit cryptsetup-pre.target
|
||||
cd "$BUILDROOT/usr/lib/systemd/system/sysinit.target.wants" || exit
|
||||
ln -sf /usr/lib/systemd/system/cryptsetup-pre.target cryptsetup-pre.target
|
||||
ln -sf /usr/lib/systemd/system/numlock.service numlock.service
|
||||
}
|
||||
|
||||
help() {
|
||||
cat <<EOF
|
||||
This hook adds support to enable numlock before sd-encrypt hook is run.
|
||||
EOF
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue