From 24649826263de93057dbc811d3088fe85595d3f0 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 15 Mar 2023 16:12:57 +0800 Subject: [PATCH] skeleton: init --- modules/home-manager/fetch-mutable-files.nix | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 modules/home-manager/fetch-mutable-files.nix diff --git a/modules/home-manager/fetch-mutable-files.nix b/modules/home-manager/fetch-mutable-files.nix new file mode 100644 index 0000000..9c66e05 --- /dev/null +++ b/modules/home-manager/fetch-mutable-files.nix @@ -0,0 +1,33 @@ +{ config, options, lib, pkgs, ... }: + +let + cfg = config.home.mutableFiles; + file = { config, name, ... }: { + }; +in +{ + options.home.mutableFile = lib.mkOption { + type = with lib.types; attrsOf (submodule file); + default = { }; + description = lib.mkDoc '' + An attribute set of mutable files and directories to be fetched into the + home directory. + ''; + example = lib.literalExpression '' + "''${config.xdg.userDirs.documents}/dotfiles" = { + url = "https://github.com/foo-dogsquared/dotfiles.git"; + type = "git"; + }; + + "''${config.xdg.userDirs.documents}/top-secret" = { + url = "https://example.com/file.zip"; + type = "fetch"; + }; + ''; + }; + + config = { + systemd.user.services.fetch-mutable-files = { + }; + }; +}