files: allow a wider range of source file names
In particular support source files whose name start with `.` or contain characters not allowed in the nix store, such as spaces. Also add some test cases for `home.file`.
This commit is contained in:
parent
46f787950a
commit
7c04351a57
12 changed files with 121 additions and 38 deletions
17
tests/modules/files/executable.nix
Normal file
17
tests/modules/files/executable.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
home.file."executable" = {
|
||||
text = "";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/executable
|
||||
assertFileIsExecutable home-files/executable;
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue