add mutability test thing
This commit is contained in:
parent
6763726f3f
commit
2860b842e3
@ -10,6 +10,7 @@ in
|
|||||||
./profile
|
./profile
|
||||||
./programs
|
./programs
|
||||||
./sessions
|
./sessions
|
||||||
|
./testing
|
||||||
];
|
];
|
||||||
config = {};
|
config = {};
|
||||||
options.nixfiles = {
|
options.nixfiles = {
|
||||||
|
6
system/testing/default.nix
Normal file
6
system/testing/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{...}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./mutability.nix
|
||||||
|
];
|
||||||
|
}
|
22
system/testing/mutability.nix
Normal file
22
system/testing/mutability.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.nixfiles.testing.mutability;
|
||||||
|
file = pkgs.writeTextFile {
|
||||||
|
name = "test";
|
||||||
|
text = ''
|
||||||
|
meow!
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.nixfiles.testing.mutability = {
|
||||||
|
enable = lib.mkEnableOption "mutability test";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.etc.mutability-test = {
|
||||||
|
mode = "0644";
|
||||||
|
source = file;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user