Commit graph

55 commits

Author SHA1 Message Date
Silvan Mosberger
2cc2e0225f
Revert "ci: module maintainer review requests; nixos/modules: init meta.teams" 2026-03-06 08:41:24 +01:00
Silvan Mosberger
dbb164c759 nixos/modules: Use meta.teams over meta.maintainers = lib.teams.*.members
This allows getting the team itself requested for a review instead of
the individual members
2026-03-02 10:59:09 +01:00
Dyego Aurélio
28096cc5e3 treewide: apply nixfmt 1.2.0 2026-01-22 18:37:56 -03:00
magicquark
2d293c04db nixos/virtualisation/podman: fix negated logic
- !stdenv.buildPlatform.canExecute stdenv.hostPlatform is incorrect.

- Example: buildPlatform = x86_64, hostPlatform = aarch64, x86_64 cannot
  execute (without emulation) aarch64 so this results in !false, which
  is true. This means that the optional string is inserted and x86_64
  will try to run aarch64 docker.
2025-12-06 06:09:42 +00:00
magicquark
4bf849b1f3 nixos/virtualisation/podman: fix broken evaluation
- The following error occurs when building:

error: A definition for option `environment.systemPackages."[definition 8-entry 2]"' is not of type `package'. Definition values:
  - In `/nix/store/dgp9wmspgm6zhl66f0c81rvg3v7wwbsb-source/nixos/modules/virtualisation/podman/default.nix':
    ''
      /nix/store/yyspp8pf5fhpx17wb2ndrhdd7y5kqb4g-podman-docker-compat-5.7.0export HOME=$(mktemp -d) # work around `docker <cmd>`
        installShellCompletion --cmd docker \
          --bash <($out/bin/docker completion bash) \
          --zsh <($out/bin/docker completion zsh) \

- This error occurs because the string is being concatenated to the output
  of the function evaluation of `pkgs.runCommand` instead of being
  concatenated to the string input of the function.

- Tested locally and the build works again.
2025-12-04 20:38:16 +00:00
Sizhe Zhao
3a7a4fb450
nixos/podman: don't open ports for firewalld 2025-11-20 12:38:47 +08:00
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
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
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
zowoq
72a3a868a0 nixos/{containers,podman}: nixpkgs-fmt 2022-08-19 14:10:47 +10:00