78 lines
1.4 KiB
Nix
78 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
devFolder = "~/dev/PT";
|
|
conf = config.pt;
|
|
in
|
|
{
|
|
options = {
|
|
pt = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf conf.enable {
|
|
home.packages = with pkgs; [
|
|
mattermost-desktop
|
|
];
|
|
|
|
programs = {
|
|
git = {
|
|
extraConfig = {
|
|
url = {
|
|
"git@gitlab.ptsecurity.com:" = {
|
|
insteadOf = "https://gitlab.ptsecurity.com";
|
|
};
|
|
};
|
|
};
|
|
includes = [
|
|
{
|
|
condition = "gitdir:${devFolder}";
|
|
contents = {
|
|
user = {
|
|
name = "Sergey Kostyuchenko";
|
|
email = "skostyuchenko@ptsecurity.com";
|
|
signingkey = "0x0574DBAF";
|
|
};
|
|
commit = {
|
|
gpgsign = true;
|
|
};
|
|
gpg = {
|
|
format = "x509";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
home.file.ptDevStIgnore = {
|
|
enable = true;
|
|
target = lib.removePrefix "~/" (devFolder + "/.stignore");
|
|
text = ''
|
|
**/.devenv/
|
|
**/.direnv/
|
|
'';
|
|
};
|
|
|
|
services.syncthing.settings = {
|
|
folders = {
|
|
"PTDev" = {
|
|
id = "pt-dev";
|
|
type = "sendreceive";
|
|
enabled = true;
|
|
label = "PTDev";
|
|
path = devFolder;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|