mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

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-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
imports = [
|
|
../profiles/docker-container.nix # FIXME, shouldn't include something from profiles/
|
|
];
|
|
|
|
boot.postBootCommands = ''
|
|
# Set virtualisation to docker
|
|
echo "docker" > /run/systemd/container
|
|
'';
|
|
|
|
# Iptables do not work in Docker.
|
|
networking.firewall.enable = false;
|
|
|
|
# Socket activated ssh presents problem in Docker.
|
|
services.openssh.startWhenNeeded = false;
|
|
}
|
|
|
|
# Example usage:
|
|
#
|
|
## default.nix
|
|
# let
|
|
# nixos = import <nixpkgs/nixos> {
|
|
# configuration = ./configuration.nix;
|
|
# system = "x86_64-linux";
|
|
# };
|
|
# in
|
|
# nixos.config.system.build.tarball
|
|
#
|
|
## configuration.nix
|
|
# { pkgs, config, lib, ... }:
|
|
# {
|
|
# imports = [
|
|
# <nixpkgs/nixos/modules/virtualisation/docker-image.nix>
|
|
# <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
|
# ];
|
|
#
|
|
# documentation.doc.enable = false;
|
|
#
|
|
# environment.systemPackages = with pkgs; [
|
|
# bashInteractive
|
|
# cacert
|
|
# nix
|
|
# ];
|
|
# }
|
|
#
|
|
## Run
|
|
# Build the tarball:
|
|
# $ nix-build default.nix
|
|
# Load into docker:
|
|
# $ docker import result/tarball/nixos-system-*.tar.xz nixos-docker
|
|
# Boots into systemd
|
|
# $ docker run --privileged -it nixos-docker /init
|
|
# Log into the container
|
|
# $ docker exec -it <container-name> /run/current-system/sw/bin/bash
|