diff --git a/system/default.nix b/system/default.nix index d3ce6be..5cd5b92 100644 --- a/system/default.nix +++ b/system/default.nix @@ -10,6 +10,7 @@ in ./profile ./programs ./sessions + ./testing ]; config = {}; options.nixfiles = { diff --git a/system/testing/default.nix b/system/testing/default.nix new file mode 100644 index 0000000..91ee7be --- /dev/null +++ b/system/testing/default.nix @@ -0,0 +1,6 @@ +{...}: +{ + imports = [ + ./mutability.nix + ]; +} diff --git a/system/testing/mutability.nix b/system/testing/mutability.nix new file mode 100644 index 0000000..865c865 --- /dev/null +++ b/system/testing/mutability.nix @@ -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; + }; + }; +}