mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
format: remove exception for keybase and kbfs modules
This commit is contained in:
parent
5ae7817dc5
commit
55ef8d3a10
3 changed files with 18 additions and 38 deletions
2
format
2
format
|
@ -36,8 +36,6 @@ find . -name '*.nix' \
|
|||
! -path ./modules/programs/tmux.nix \
|
||||
! -path ./modules/programs/zsh.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/sxhkd.nix \
|
||||
! -path ./modules/systemd.nix \
|
||||
|
|
|
@ -6,9 +6,7 @@ let
|
|||
|
||||
cfg = config.services.kbfs;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
services.kbfs = {
|
||||
enable = mkEnableOption "Keybase File System";
|
||||
|
@ -25,10 +23,7 @@ in
|
|||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"-label kbfs"
|
||||
"-mount-type normal"
|
||||
];
|
||||
example = [ "-label kbfs" "-mount-type normal" ];
|
||||
description = ''
|
||||
Additional flags to pass to the Keybase filesystem on launch.
|
||||
'';
|
||||
|
@ -44,21 +39,18 @@ in
|
|||
After = [ "keybase.service" ];
|
||||
};
|
||||
|
||||
Service =
|
||||
let
|
||||
mountPoint = "\"%h/${cfg.mountPoint}\"";
|
||||
Service = let mountPoint = ''"%h/${cfg.mountPoint}"'';
|
||||
in {
|
||||
Environment = "PATH=/run/wrappers/bin KEYBASE_SYSTEMD=1";
|
||||
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}";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.kbfs ];
|
||||
|
|
|
@ -6,22 +6,14 @@ let
|
|||
|
||||
cfg = config.services.keybase;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
services.keybase = {
|
||||
enable = mkEnableOption "Keybase";
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.services.keybase.enable = mkEnableOption "Keybase";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.keybase ];
|
||||
|
||||
systemd.user.services.keybase = {
|
||||
Unit = {
|
||||
Description = "Keybase service";
|
||||
};
|
||||
Unit.Description = "Keybase service";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.keybase}/bin/keybase service --auto-forked";
|
||||
|
@ -29,9 +21,7 @@ in
|
|||
PrivateTmp = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue