repair sync command module
This commit is contained in:
@ -1,17 +1,31 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
/*
|
||||
options.mods.sync.enable = lib.mkOption {
|
||||
options.mods.sync = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "enable desk_sync command";
|
||||
description = "enable usr_sync command";
|
||||
};
|
||||
|
||||
home.file.".local/bin/desk_sync" = pkgs.writeShellScriptBin "desk_sync" ''
|
||||
${pkgs.unison}/
|
||||
config = lib.mkIf config.mods.sync.enable {
|
||||
'';
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
config.home.file.".local/bin/usr_sync" = lib.mkIf config.mods.sync.enable {
|
||||
text = ''
|
||||
#!/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