fix(minion): lib useless

This commit is contained in:
Patrick 2024-08-07 22:21:11 +02:00
parent f82c3ce165
commit 296c98870c
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
4 changed files with 6 additions and 11 deletions

View file

@ -1 +1 @@
inputs: [ (import ./misc.nix inputs) ]
_inputs: [ ]

View file

@ -1,9 +0,0 @@
_inputs: _self: super:
let
writeText = text: (super.writeText (builtins.hashString "sha256" "${text}") "${text}");
in
{
lib = super.lib // {
inherit writeText;
};
}

View file

@ -88,6 +88,9 @@ in
"dir_mode=0700"
"credentials=${cfg.credentials}"
"x-systemd.after=sys-devices-virtual-net-samba\\x2dpatrick.device"
"x-systemd.automount"
"x-systemd.mount-timeout=30"
"_netdev"
]
++ (optional (!cfg.automatic) "noauto");
in

View file

@ -1,7 +1,7 @@
{ lib, pkgs, ... }:
let
# addon-path is base64 encode path
cfgFile = lib.writeText ''
cfgFile = pkgs.writeText "mimion.xml" ''
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<minion>
<config-version>2</config-version>
@ -30,6 +30,7 @@ in
# yet another program that uses the config file as a live state file
# Why?
home.activation.installMinionConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run mkdir -p .minion
run cp -f ${cfgFile} .minion/minion.xml
'';
}