Commit graph

54 commits

Author SHA1 Message Date
definfo 6f339bd25b nixos/virtualisation/podman: add shell completions for podman dockerCompat
This can fix shell completion for `podman.dockerCompat`.
2025-10-03 21:31:41 +08:00
Matt Sturgeon c97cfb38e6
fix(podman): add mandatory runtime dependencies (#444116) 2025-09-20 16:59:38 +00:00
Augusto Melo 0efb0c9c81 fix: add mandatory runtime dependencies
https://podman.io/docs/installation#building-from-source
2025-09-18 21:09:11 +01:00
René Neumann c26558c5cc nixos/podman: Introduce new option extraRuntimes
This disables the hard, not overridable, dependency on `runc`.
It also sharpens the description of `extraPackages` to highlight the
difference between those options.

Fixes #443274.
2025-09-18 14:19:18 +02:00
DSeeLP b30ba513b0
nixos/podman: use nftables as firewall when enabled 2025-09-07 21:10:05 +02:00
DSeeLP 57f735a19b
podman: move iptables to virtualisation.podman.extraPackages 2025-09-07 20:56:44 +02:00
dish 970dcca69c
treewide: Fix links in module documentation 2025-08-25 12:55:11 -04:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Benedikt Ritter ccdfb91b48
podman: use serviceConfig.ExecStart instead of script 2025-03-19 11:08:18 +01:00
Michael Hoang a6a7341fef nixos/podman: expose virtualisation.podman.package 2024-12-24 15:08:43 +11:00
Sandro 5f88672973
nixos/podman: add systemd to extraPackages (#362372) 2024-12-18 22:48:34 +01:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Nikita Pedorich 77e81fd860
nixos/podman: add systemd to extraPackages 2024-12-06 19:48:00 +09:00
nicoo 9e5a44bcfc
nixos/podman: set preferLocalBuild on trivial runCommands (#340980) 2024-09-10 10:53:46 +00:00
Aleksana 03e62e5bc3
podman: drop slirp4netns which has been replaced by passt (#313670) 2024-09-09 09:53:33 +08:00
Someone 2d7db58c2f
Merge pull request #313225 from ereslibre/nvidia-consistent-casing
docs: fix Nvidia casing to be consistent across different places
2024-08-22 16:51:41 +00:00
Rafael Fernández López 058e8f5ef1
nvidia-podman: remove nvidia wrapper
Since version 4.1.0, podman has support for CDI, and is the
recommended way to expose GPU's for containers for podman.

More information: https://web.archive.org/web/20240729183805/https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman
2024-08-16 18:16:23 +02:00
Winter 6c11488ce0 Revert "nixos/podman: use given package for dockerCompat"
This reverts commit df74ebcabb, which breaks
eval when Podman is enabled due to infinite recursion [0] [1].

I take full responsibility for merging this without looking too closely
nor running the NixOS test.

[0]: df74ebcabb (commitcomment-145003824)
[1]: https://github.com/NixOS/nixpkgs/pull/267321#issuecomment-2267076978
2024-08-03 15:13:24 -04:00
Chris Maniewski df74ebcabb nixos/podman: use given package for dockerCompat
Defining a package that isn't the default results in podman-compat linking to a different version of podman (always the default one). This PR changes the behavior so that the given alternative package is used for the dockerCompat option as well. This could technically break things for people who rely on this quirk, albeit the previous behavior is probably not what one would expect.

Co-authored-by: Winter <winter@winter.cafe>
2024-08-03 10:54:26 -04:00
Rafael Fernández López 3d2a21eddf virtualisation/{docker,podman}: update nvidia-ctk warning
Warnings and descriptions for `virtualisation.docker.enableNvidia` and
`virtualisation.podman.enableNvidia` point erroneously to set
`virtualisation.containers.cdi.dynamic.nvidia.enable`. This NixOS
option has been deprecated and the recommended NixOS option is
`hardware.nvidia-container-toolkit.enable`.
2024-07-28 13:12:27 +02:00
Basti 56e8106538
Remove trailing whitespace 2024-07-09 22:14:23 +00:00
Basti 2232311c93
Update nixos/modules/virtualisation/podman/default.nix 2024-07-09 22:12:12 +00:00
Sandro Jäckel e2e28f84f3
nixos/podman: add slirp4netns if configured 2024-06-11 01:01:19 +02:00
Rafael Fernández López 7749696f61 docs: fix Nvidia casing to be consistent across different places 2024-05-20 22:17:31 +02:00
Robert Hensing 188ba247d5
nixos/podman: Create docker socket symlink via socket unit (#305803)
This ensures that both "sockets" are available after sockets.target.
See https://github.com/hercules-ci/arion/issues/238
2024-05-02 14:04:37 +00:00
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Sandro b8ec4c1475
Merge pull request #290449 from Kiskae/patch-2
nixos/podman: pass proxy variables to podman API
2024-03-01 00:37:27 +01:00
Ryan Lahfa 077d41f9d8
Merge pull request #289856 from pennae/supfs-set
nixos/filesystems: make supportedFilesystems an attrset
2024-02-25 18:05:29 +01:00
Rafael Fernández López 8ba61ebb8a services/hardware: add nvidia-container-toolkit 2024-02-21 22:17:07 +01:00
Kiskae fe93ea4e8e
nixos/podman: pass proxy variables to podman API 2024-02-21 16:29:11 +01:00
pennae 258b935d70 nixos/filesystems: make supportedFilesystems an attrset
this lets us *dis*able filesystem explicitly, as is required by e.g. the
zfs-less installer images. currently that specifically is only easily
possible by adding an overlay that stubs out `zfs`, with the obvious
side-effect of also removing tooling that could run without the kernel
module loaded.
2024-02-19 11:46:52 +01:00
sohalt 38b2778765 nixos/podman: open firewall for aardvark-dns 2024-01-15 18:43:48 +01:00
Sandro Jäckel 9ad0793b40
nixos/podman: persist timer
otherwise the timer might never run on laptops which could be shutdown
during the night
2023-05-21 17:24:16 +02:00
Sandro Jäckel 056be64f11 nixos/podman: add example to enable network dns 2023-03-27 08:42:29 +10:00
Sandro 6f558d3009
Merge pull request #212599 from SuperSandro2000/podman-cleanup 2023-03-27 00:05:30 +02:00
zowoq 48642c634e podman: remove wrapper
trying to get all of the podman functionality to work with the wrapper
 is becoming more complicated with each release, it isn't sustainable

removing the wrapper does mean that using extraPackages will need to build from source

- remove unnecessary serviceConfig overrides

- set HELPER_BINARIES_DIR to libexec/podman

- use install.bin target on linux for podman/tmpfiles
  - also installs quadlet/rootlessport in libexec

- symlink binaries from helpersBin into HELPER_BINARIES_DIR

- remove unnecessary rootlessport output

- remove unnecessary substituteInPlace
2023-02-28 18:08:29 +10:00
zowoq 3e081095a4 Revert "podman: remove wrapper"
This reverts commit 02f9255044.

broke rootlessport port forwarding
2023-02-17 20:26:02 +10:00
zowoq 02f9255044 podman: remove wrapper
trying to get all of the podman functionality to work with the wrapper
 is becoming more complicated with each release, it isn't sustainable

removing the wrapper does mean that using extraPackages will need to build from source

- include pkgs.zfs by default in the wrapped podman used by the module so it is cached
  - anyone using zfsUnstable will need to build from source

- remove unnecessary serviceConfig overrides

- set HELPER_BINARIES_DIR during build

- use install.bin target on linux for podman/tmpfiles
  - also installs quadlet/rootlessport in libexec

- remove unnecessary rootlessport output

- remove unnecessary substituteInPlace
2023-02-14 19:22:24 +10:00
zowoq 04b9fcca93 nixos/podman: wrap /run/wrappers for setuid shadow binaries
adding it here so it only needs to be done once
2023-02-14 19:22:24 +10:00
Sandro Jäckel 7a7ff877b7 nixos/podman: remove unused mkMerge 2023-02-03 12:05:39 +10:00
zowoq 469aec905b nixos/podman, podman: switch to netavark network stack 2023-01-04 14:25:14 +10:00
Felix Buehler 6617511200 nixos/podman: add autoPrune option 2022-12-24 12:01:16 +01:00
pennae 3bddcf5f90
Merge branch 'master' into option-docs-md 2022-09-01 16:10:09 +02:00
pennae 9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
zowoq 464944c3f4 nixos/{containers,cri-o/podman}: drop outdated remove/rename
these have been around for a few release cycles
2022-08-30 17:05:48 +10:00
pennae 6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
zowoq 72a3a868a0 nixos/{containers,podman}: nixpkgs-fmt 2022-08-19 14:10:47 +10:00
pennae 087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae 16102dce2f nixos/*: replace <code> in option docs with <literal>
markdown can't represent the difference without another extension and
both the html manual and the manpage render them the same, so keeping the
distinction is not very useful on its own. with the distinction removed
we can automatically convert many options that use <code> tags to markdown.

the manpage remains unchanged, html manual does not render
differently (but class names on code tags do change from "code" to "literal").
2022-08-03 21:03:23 +02:00