Skip to content

Instantly share code, notes, and snippets.

View KoviRobi's full-sized avatar

Kovacsics Robert KoviRobi

  • Cambridge Consultants
  • Cambridge, UK
  • 01:28 (UTC +01:00)
View GitHub Profile
downloading Nix 2.3.3 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.3.3/nix-2.3.3-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.DNen1PENRW'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 86 100 86 0 0 858 0 --:--:-- --:--:-- --:--:-- 860
100 16.4M 100 16.4M 0 0 95.5M 0 --:--:-- --:--:-- --:--:-- 95.5M
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
Switching to the Daemon-based Installer
Welcome to the Multi-User Nix Installation

This installation tool will set up your computer with the Nix package
@KoviRobi
KoviRobi / nixos-container-launch.sh
Created December 17, 2014 17:49
This accompanies nixos-container.nix
#!/bin/sh -xeu
restart="false";
echo $#
if [ "$#" -ge 1 ]; then
case "$1" in
"r"|"re"|"res"|"rest"|"resta"|"restar"|"restart")
sudo systemctl stop container@browser
restart="true";
;;
@KoviRobi
KoviRobi / nixos-container.nix
Last active June 7, 2023 11:11
NixOS container example, for a web browser container. Use "sudo systemctl start container@browser" to start.
# vim: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent syntax=nix nocompatible :
# Containers
{ config, pkgs, ... }:
{ containers.browser =
let hostAddr = "192.168.100.10";
in
{ privateNetwork = true;
hostAddress = hostAddr;