format: remove exception for keybase and kbfs modules
This commit is contained in:
parent
5ae7817dc5
commit
55ef8d3a10
2
format
2
format
|
@ -36,8 +36,6 @@ find . -name '*.nix' \
|
||||||
! -path ./modules/programs/tmux.nix \
|
! -path ./modules/programs/tmux.nix \
|
||||||
! -path ./modules/programs/zsh.nix \
|
! -path ./modules/programs/zsh.nix \
|
||||||
! -path ./modules/services/gpg-agent.nix \
|
! -path ./modules/services/gpg-agent.nix \
|
||||||
! -path ./modules/services/kbfs.nix \
|
|
||||||
! -path ./modules/services/keybase.nix \
|
|
||||||
! -path ./modules/services/mpd.nix \
|
! -path ./modules/services/mpd.nix \
|
||||||
! -path ./modules/services/sxhkd.nix \
|
! -path ./modules/services/sxhkd.nix \
|
||||||
! -path ./modules/systemd.nix \
|
! -path ./modules/systemd.nix \
|
||||||
|
|
|
@ -6,9 +6,7 @@ let
|
||||||
|
|
||||||
cfg = config.services.kbfs;
|
cfg = config.services.kbfs;
|
||||||
|
|
||||||
in
|
in {
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
services.kbfs = {
|
services.kbfs = {
|
||||||
enable = mkEnableOption "Keybase File System";
|
enable = mkEnableOption "Keybase File System";
|
||||||
|
@ -24,11 +22,8 @@ in
|
||||||
|
|
||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [ ];
|
||||||
example = [
|
example = [ "-label kbfs" "-mount-type normal" ];
|
||||||
"-label kbfs"
|
|
||||||
"-mount-type normal"
|
|
||||||
];
|
|
||||||
description = ''
|
description = ''
|
||||||
Additional flags to pass to the Keybase filesystem on launch.
|
Additional flags to pass to the Keybase filesystem on launch.
|
||||||
'';
|
'';
|
||||||
|
@ -44,21 +39,18 @@ in
|
||||||
After = [ "keybase.service" ];
|
After = [ "keybase.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service =
|
Service = let mountPoint = ''"%h/${cfg.mountPoint}"'';
|
||||||
let
|
|
||||||
mountPoint = "\"%h/${cfg.mountPoint}\"";
|
|
||||||
in {
|
in {
|
||||||
Environment = "PATH=/run/wrappers/bin KEYBASE_SYSTEMD=1";
|
Environment = "PATH=/run/wrappers/bin KEYBASE_SYSTEMD=1";
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${mountPoint}";
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${mountPoint}";
|
||||||
ExecStart ="${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${mountPoint}";
|
ExecStart =
|
||||||
|
"${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${mountPoint}";
|
||||||
ExecStopPost = "/run/wrappers/bin/fusermount -u ${mountPoint}";
|
ExecStopPost = "/run/wrappers/bin/fusermount -u ${mountPoint}";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install.WantedBy = [ "default.target" ];
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [ pkgs.kbfs ];
|
home.packages = [ pkgs.kbfs ];
|
||||||
|
|
|
@ -6,22 +6,14 @@ let
|
||||||
|
|
||||||
cfg = config.services.keybase;
|
cfg = config.services.keybase;
|
||||||
|
|
||||||
in
|
in {
|
||||||
|
options.services.keybase.enable = mkEnableOption "Keybase";
|
||||||
{
|
|
||||||
options = {
|
|
||||||
services.keybase = {
|
|
||||||
enable = mkEnableOption "Keybase";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.keybase ];
|
home.packages = [ pkgs.keybase ];
|
||||||
|
|
||||||
systemd.user.services.keybase = {
|
systemd.user.services.keybase = {
|
||||||
Unit = {
|
Unit.Description = "Keybase service";
|
||||||
Description = "Keybase service";
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.keybase}/bin/keybase service --auto-forked";
|
ExecStart = "${pkgs.keybase}/bin/keybase service --auto-forked";
|
||||||
|
@ -29,9 +21,7 @@ in
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install.WantedBy = [ "default.target" ];
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue