Add:
virtualisation.libvirtd.enable = true;
and
users.users.<you>.extraGroups = [ "libvirtd" ];
{ config, pkgs, ... }: | |
let | |
p = import ./test.nix; | |
pkgsM1 = import <nixpkgs> { overlays = []; }; | |
inherit (import <nixpkgs> {}) fetchFromGitHub lib; | |
inherit (pkgsM1) ffmpeg imagemagick tmux zsh starship gnupg nodejs-14_x nodejs-16_x postgresql_13 rustup; |
import requests | |
r = requests.get("http://download.thinkbroadband.com/10MB.zip", | |
cookies={'cookie1': 'working'} | |
) | |
open('10MB.zip', 'wb').write(r.content) |
import requests | |
r = requests.get("http://download.thinkbroadband.com/10MB.zip", | |
cookies={'cookie1': 'working'} | |
) | |
open('10MB.zip', 'wb').write(r.content) |
Latest revision: 2021-12-05.
Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04
. Alternatively, you can simply run docker run -it ubuntu:18.04 bash
.
NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>)
after each failed service <service name> stop
to kill it.
This document is targeted at those who seek to build reproducible dev environment across machines, OS, and time.
It maybe easier for remote teams to work together and not spending hours each person setting up asdf/pyenv/rbenv
, LSP servers
, linters
, runtime/libs
. Nix is probably the closest thing to Docker in terms of development environment.
Flake is used here because it provides hermetic build, with absolutely no reliance on system environment (be it Arch/Catalina/Mojave). Also it freezes dependencies in flake.lock
so builds are reproducible.
This gist provides the setup to develop Java/Clojure/Python applications on Nix. But it can be easily adapted to ruby, nodejs, haskell.
#!/bin/sh | |
# | |
# For installing NixOS having booted from the minimal USB image. | |
# | |
# To run: | |
# | |
# sh -c "$(curl https://eipi.xyz/nixinst.sh)" | |
# | |
# https://eipi.xyz/blog/nixos-x86-64 |
#!/bin/bash | |
sudo mount -o remount,size=10G,noatime /tmp | |
echo "Done. Please use 'df -h' to make sure folder size is increased." |