NixOS provide services.mingetty.autologinUser
option, but it can’t be used for the specific TTY.
TTY1 and user “guest”:
diff --git a/Grammar/Tokens b/Grammar/Tokens | |
index 618ae81..29bcfeb 100644 | |
--- a/Grammar/Tokens | |
+++ b/Grammar/Tokens | |
@@ -11,6 +11,7 @@ RPAR ')' | |
LSQB '[' | |
RSQB ']' | |
COLON ':' | |
+FUNC_SIGN '=>' | |
COMMA ',' |
# Import python packages which are installed in the nix store | |
# Note you NEED this if you install it via environment.systemPackages | |
# E.g environment.systemPackages = with pkgs; [ python27Packages.tensorflowWithCuda ] | |
# You DON'T NEED this if you do it like this: | |
# python-with-my-packages = pkgs.python27.withPackages (ps: with ps; [ tensorflowWithCuda]); | |
# environment.systemPackages = [ python-with-my-packages ] | |
import sys |
This is one way of managing your user profile declaratively.
Alternatives include:
nix-env
-based environment, installed using nix-env -ir
rather than nix-env --set
. LnL has an overlay which shows a way of doing this.$HOME
Note that this is incompatible with regular imperative use of nix-env
, e.g. nix-env -iA nixpkgs.hello
. It has the advantage of allowing the installation of multiple outputs of the same package much better than nix-env
's builtin profile builder does.
" Sample .vimrc file by Martin Brochhaus | |
" Presented at PyCon APAC 2012 | |
" ============================================ | |
" Note to myself: | |
" DO NOT USE <C-z> FOR SAVING WHEN PRESENTING! | |
" ============================================ | |
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
# Heavily cribbed from the equivalent NixOS login script. | |
# This should work better with multi-user nix setups. | |
export NIXPKGS_CONFIG="/etc/nix/nixpkgs-config.nix" | |
export NIX_OTHER_STORES="/run/nix/remote-stores/*/nix" | |
export NIX_USER_PROFILE_DIR="/nix/var/nix/profiles/per-user/$USER" | |
export NIX_PROFILES="/nix/var/nix/profiles/default $HOME/.nix-profile" | |
export NIX_PATH="/nix/var/nix/profiles/per-user/root/channels" | |
export PATH="$HOME/.nix-profile/bin:$HOME/.nix-profile/sbin:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:$PATH" |
class Book: | |
title = '' | |
pages = 0 | |
def __init__(self, title='', pages=0): | |
self.title = title | |
self.pages = pages | |
def __add__(self, other): | |
"""Control adding two Books together or a Book and a number""" |
pkgs: attrs: | |
with pkgs; | |
let defaultAttrs = { | |
builder = "${bash}/bin/bash"; | |
args = [ ./builder.sh ]; | |
setup = ./setup.sh; | |
baseInputs = [ gnutar gzip gnumake gcc binutils coreutils gawk gnused gnugrep patchelf findutils ]; | |
buildInputs = []; | |
system = builtins.currentSystem; | |
}; |
This guide follow instructions in the devpi quickstart server guide. We will install in own user home using virtualenvs, than, will setup a nginx instance. Server used here is Ubuntu Server 12.04 LTS in one virtualbox instance.
root ~ # useradd -m -U -s /bin/bash devpi
root ~ # passwd devpi