repair sync command module
This commit is contained in:
@ -1,17 +1,31 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
/*
|
options.mods.sync = {
|
||||||
options.mods.sync.enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "enable desk_sync command";
|
description = "enable usr_sync command";
|
||||||
|
};
|
||||||
|
|
||||||
|
homeFolder = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/home/tom/";
|
||||||
|
description = "folder that will be synced with the server";
|
||||||
|
};
|
||||||
|
|
||||||
|
destFolder = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/raid/pc_sync";
|
||||||
|
description = "where on the server";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".local/bin/desk_sync" = pkgs.writeShellScriptBin "desk_sync" ''
|
config.home.file.".local/bin/usr_sync" = lib.mkIf config.mods.sync.enable {
|
||||||
${pkgs.unison}/
|
text = ''
|
||||||
config = lib.mkIf config.mods.sync.enable {
|
#!/bin/env
|
||||||
'';
|
unison "${config.mods.sync.homeFolder}" "ssh://tom@tmoron.fr:1880/${config.mods.sync.destFolder}" $@
|
||||||
|
'';
|
||||||
|
executable = true;
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user