nix/modules/home/services/podman.nix

43 lines
917 B
Nix

{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.settings.services.podman;
in {
options = {
settings.services.podman.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable podman configuration
'';
};
settings.services.podman.systemctlAliases = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable podman systemctl aliases configuration
'';
};
};
config = mkIf cfg.enable {
services.podman = {
enable = true;
};
home.shellAliases = lib.mkIf cfg.systemctlAliases {
scu = "systemctl --user";
scus = "systemctl --user start";
scur = "systemctl --user restart";
scust = "systemctl --user stop";
scusts = "systemctl --user status";
jcu = "journalctl --user";
jcur = "journalctl --user -xe";
};
};
}