diff options
author | nikstur <nikstur@outlook.com> | 2023-12-29 16:29:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 16:29:11 +0100 |
commit | 5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d (patch) | |
tree | fa53a4f5373da9639728bea0ff31c2b0eb23c24c /nixos/tests | |
parent | fbb85dabad163855cd90d5f6f8943155d365623f (diff) | |
parent | 0ebd39b5418cc8b5d8635c41e893ee4dfc19c7de (diff) | |
download | nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar.gz nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar.bz2 nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar.lz nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar.xz nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.tar.zst nixlib-5a9c0b76008b9494ce41b53e0c84d11c7aa97a5d.zip |
Merge pull request #267983 from nikstur/replace-simple-activation-2
nixos: replace activationScripts 2/x
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/incron.nix | 6 | ||||
-rw-r--r-- | nixos/tests/nextcloud/basic.nix | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/nixos/tests/incron.nix b/nixos/tests/incron.nix index c978ff27dfad..d016360ba0ef 100644 --- a/nixos/tests/incron.nix +++ b/nixos/tests/incron.nix @@ -13,9 +13,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: ''; # ensure the directory to be monitored exists before incron is started - system.activationScripts.incronTest = '' - mkdir /test - ''; + systemd.tmpfiles.settings.incron-test = { + "/test".d = { }; + }; }; testScript = '' diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index ab1d8353dba0..428fe0aa10db 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -13,10 +13,12 @@ in { # The only thing the client needs to do is download a file. client = { ... }: { services.davfs2.enable = true; - system.activationScripts.davfs2-secrets = '' - echo "http://nextcloud/remote.php/dav/files/${adminuser} ${adminuser} ${adminpass}" > /tmp/davfs2-secrets - chmod 600 /tmp/davfs2-secrets - ''; + systemd.tmpfiles.settings.nextcloud = { + "/tmp/davfs2-secrets"."f+" = { + mode = "0600"; + argument = "http://nextcloud/remote.php/dav/files/${adminuser} ${adminuser} ${adminpass}"; + }; + }; virtualisation.fileSystems = { "/mnt/dav" = { device = "http://nextcloud/remote.php/dav/files/${adminuser}"; |