diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-11-23 04:20:34 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-11-23 04:20:34 +0300 |
commit | 67b82386d8ad8ae3eea5083bd22809f6192d92a8 (patch) | |
tree | 41829a0b3e05a9dbb4b0189e34a7b53e401f489e /modules/nixos/podman.nix | |
parent | 2023-11-19 (diff) |
2023-11-23
Diffstat (limited to 'modules/nixos/podman.nix')
-rw-r--r-- | modules/nixos/podman.nix | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/modules/nixos/podman.nix b/modules/nixos/podman.nix index 0f6db48..f6ee6bf 100644 --- a/modules/nixos/podman.nix +++ b/modules/nixos/podman.nix @@ -18,6 +18,8 @@ in { } ]; + nixfiles.modules.common.shell.aliases.p = "podman"; + secrets.containers-auth = { file = "${inputs.self}/secrets/containers-auth"; path = "${config.dirs.config}/containers/auth.json"; @@ -31,38 +33,26 @@ in { my.extraGroups = ["podman"]; - hm = { - xdg.configFile = { - # This removes a really annoying registry search. 100% of the time I - # would need to look up stuff from the Docker and not Quay! - "containers/registries.conf".text = '' - [registries.search] - registries = ["docker.io"] - ''; - - # As for plain OverlayFS in Podman over ZFS[1]... I guess we are waiting - # for Podman to catch up now. - # - # [1]: https://github.com/openzfs/zfs/pull/14070#issuecomment-1309116666 - "containers/storage.conf".text = optionalString config.boot.zfs.enabled '' - [storage] - driver = "overlay" - - [storage.options] - mount_program = "${getExe' pkgs.fuse-overlayfs "fuse-overlayfs"}" - mountopt = "noatime,nodev,nosuid" - ''; - }; - - programs.bash = { - shellAliases = { - podman = "grc -es ${getExe' pkgs.podman "podman"}"; - p = "podman"; - }; - initExtra = mkAfter '' - _complete_alias p __start_podman podman - ''; - }; + hm.xdg.configFile = { + # This removes a really annoying registry search. 100% of the time I + # would need to look up stuff from the Docker and not Quay! + "containers/registries.conf".text = '' + [registries.search] + registries = ["docker.io"] + ''; + + # As for plain OverlayFS in Podman over ZFS[1]... I guess we are waiting + # for Podman to catch up now. + # + # [1]: https://github.com/openzfs/zfs/pull/14070#issuecomment-1309116666 + "containers/storage.conf".text = optionalString config.boot.zfs.enabled '' + [storage] + driver = "overlay" + + [storage.options] + mount_program = "${getExe' pkgs.fuse-overlayfs "fuse-overlayfs"}" + mountopt = "noatime,nodev,nosuid" + ''; }; }; } |