files: allow disabling creation of a file

PR #3622
This commit is contained in:
Lars Mühmel 2023-01-25 22:58:35 +01:00 committed by Robert Helgesson
parent c59f0eac51
commit 7efca2ca18
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
4 changed files with 24 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{
files-disabled = ./disabled.nix;
files-executable = ./executable.nix;
files-hidden-source = ./hidden-source.nix;
files-out-of-store-symlink = ./out-of-store-symlink.nix;

View file

@ -0,0 +1,14 @@
{ ... }:
{
home.file."disabled" = {
enable = false;
text = ''
This file should not exist
'';
};
nmt.script = ''
assertPathNotExists home-files/disabled
'';
}