Merge remote-tracking branch 'prism/staging/jeschli'

This commit is contained in:
lassulus 2018-06-28 00:12:19 +02:00
commit 5eabc074b7
6 changed files with 140 additions and 68 deletions

View File

@ -11,8 +11,22 @@
<stockholm/jeschli/2configs/xserver> <stockholm/jeschli/2configs/xserver>
]; ];
boot.loader.systemd-boot.enable = true; # boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot";
boot.loader.grub = {
devices = [ "nodev" ];
efiSupport = true;
enable = true;
extraEntries = ''
menuentry "Debian" {
insmod ext2
insmod chain
chainloader /EFI/debian/grubx64.efi
}
'';
version = 2;
};
jeschliFontSize = 20; jeschliFontSize = 20;
@ -56,7 +70,6 @@
sqlite sqlite
# internet # internet
thunderbird thunderbird
hipchat
chromium chromium
google-chrome google-chrome
# programming languages # programming languages
@ -78,6 +91,7 @@
texlive.combined.scheme-full texlive.combined.scheme-full
pandoc pandoc
redis redis
vagrant
# document viewer # document viewer
zathura zathura
]; ];
@ -92,14 +106,23 @@
services.printing.enable = true; services.printing.enable = true;
services.printing.drivers = [ pkgs.postscript-lexmark ]; services.printing.drivers = [ pkgs.postscript-lexmark ];
# Enable the X11 windowing system. services.xserver = {
services.xserver.videoDrivers = [ "nvidia" ];
desktopManager.session = lib.mkForce [];
enable = true;
display = 11;
tty = 11;
dpi = 200;
videoDrivers = [ "nvidia" ];
synaptics = {
enable = false;
};
};
# services.xserver.windowManager.xmonad.enable = true;
# services.xserver.windowManager.xmonad.enableContribAndExtras = true;
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.dpi = 100;
# fonts.fontconfig.dpi = 100;
users.extraUsers.jeschli = { users.extraUsers.jeschli = {
isNormalUser = true; isNormalUser = true;

View File

@ -0,0 +1,44 @@
with import <stockholm/lib>;
{ ... }:
{
users.extraUsers = {
dcsovpn = rec {
name = "dcsovpn";
uid = genid "dcsovpn";
description = "user for running dcso openvpn";
home = "/home/${name}";
};
};
users.extraGroups.dcsovpn.gid = genid "dcsovpn";
services.openvpn.servers = {
dcso = {
config = ''
client
dev tun
tun-mtu 1356
mssfix
proto udp
float
remote 217.111.55.41 1194
nobind
user dcsovpn
group dcsovpn
persist-key
persist-tun
ca ${toString <secrets/dcsovpn/ca.pem>}
cert ${toString <secrets/dcsovpn/cert.pem>}
key ${toString <secrets/dcsovpn/cert.key>}
verb 3
mute 20
auth-user-pass ${toString <secrets/dcsovpn/login.txt>}
route-method exe
route-delay 2
'';
updateResolvConf = true;
};
};
}

View File

@ -1,5 +1,5 @@
# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running nixos-help). # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
imports = [ imports = [
<stockholm/jeschli> <stockholm/jeschli>
@ -8,6 +8,7 @@
<stockholm/jeschli/2configs/emacs.nix> <stockholm/jeschli/2configs/emacs.nix>
<stockholm/jeschli/2configs/xdg.nix> <stockholm/jeschli/2configs/xdg.nix>
<stockholm/jeschli/2configs/xserver> <stockholm/jeschli/2configs/xserver>
<stockholm/jeschli/2configs/virtualbox.nix>
]; ];
krebs.build.host = config.krebs.hosts.brauerei; krebs.build.host = config.krebs.hosts.brauerei;
@ -24,9 +25,10 @@
preLVM = true; preLVM = true;
allowDiscards = true; allowDiscards = true;
} ]; } ];
# networking.hostName = "nixos"; # networking.hostName = "brauerei";
# Define your hostname. # Define your hostname.
networking.wireless.enable = true; # networking.wireless.enable = true;
networking.networkmanager.enable = true;
# Enables wireless support via wpa_supplicant. # Enables wireless support via wpa_supplicant.
# Select internationalisation properties. # Select internationalisation properties.
# i18n = { # i18n = {
@ -66,12 +68,25 @@
chromium chromium
google-chrome google-chrome
# programming languages # programming languages
elixir
elmPackages.elm
exercism exercism
go go
gcc gcc
ghc ghc
python35 python35
python35Packages.pip python35Packages.pip
(vagrant.override {
bundlerEnv = bundlerEnv.override {
bundler = bundler.overrideAttrs (old: {
name = "bundler-1.16.1";
src = fetchurl {
url = "https://rubygems.org/gems/bundler-1.16.1.gem";
sha256 = "1s2nq4qnffxg3kwrk7cnwxcvfihlhxm9absl2l6d3qckf3sy1f22";
};
});
};
})
# go tools # go tools
golint golint
gotools gotools
@ -84,6 +99,7 @@
jetbrains.webstorm jetbrains.webstorm
jetbrains.goland jetbrains.goland
# document viewer # document viewer
evince
zathura zathura
# xorg # xorg
xorg.xbacklight xorg.xbacklight
@ -100,33 +116,29 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
# Open ports in the firewall. services.xserver = {
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents. # Don't install feh into systemPackages
# services.printing.enable = true; # refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
desktopManager.session = lib.mkForce [];
# Enable the X11 windowing system. enable = true;
# services.xserver.enable = true; display = 11;
# services.xserver.layout = "us"; tty = 11;
# services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support. dpi = 96;
# services.xserver.libinput.enable = true;
# videoDrivers = [ "nvidia" ];
synaptics = {
enable = true;
twoFingerScroll = true;
accelFactor = "0.035";
};
};
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.desktopManager.plasma5.enable = true;
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.windowManager.xmonad.enable = true;
# services.xserver.windowManager.xmonad.enableContribAndExtras = true;
#
# Define a user account. Don't forget to set a password with passwd.
users.extraUsers.jeschli = { # TODO: define as krebs.users users.extraUsers.jeschli = { # TODO: define as krebs.users
isNormalUser = true; isNormalUser = true;
extraGroups = ["docker" "vboxusers"];
uid = 1000; uid = 1000;
}; };
users.extraUsers.jamie = { users.extraUsers.jamie = {

View File

@ -20,7 +20,15 @@ let
sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a";
}; };
}; };
customPlugins.vim-fileline = pkgs.vimUtils.buildVimPlugin {
name = "file-line-1.0";
src = pkgs.fetchFromGitHub {
owner = "bogado";
repo = "file-line";
rev = "1.0";
sha256 = "0z47zq9rqh06ny0q8lpcdsraf3lyzn9xvb59nywnarf3nxrk6hx0";
};
};
in { in {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.vim_configurable.customize { (pkgs.vim_configurable.customize {
@ -33,6 +41,8 @@ in {
setStatements = '' setStatements = ''
set autowrite set autowrite
set clipboard=unnamedplus set clipboard=unnamedplus
set listchars=trail:
set mouse=a
set nocompatible set nocompatible
set path+=** set path+=**
set ruler set ruler
@ -40,7 +50,6 @@ in {
set undofile "turn on the feature set undofile "turn on the feature
set wildignore+=*.o,*.class,*.hi,*.dyn_hi,*.dyn_o set wildignore+=*.o,*.class,*.hi,*.dyn_hi,*.dyn_o
set wildmenu set wildmenu
set listchars=trail:
''; '';
remapStatements = '' remapStatements = ''
imap jk <Esc> imap jk <Esc>
@ -91,13 +100,14 @@ in {
{ names = [ { names = [
"ctrlp" "ctrlp"
"easymotion" "easymotion"
"elm-vim"
"vim-fileline"
"molokai" "molokai"
"nerdtree" "nerdtree"
"snipmate" "snipmate"
"surround" "surround"
"Syntastic" "Syntastic"
"undotree" "undotree"
"elm-vim"
]; ];
} }
{ names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; }

View File

@ -34,26 +34,6 @@ in {
}; };
}; };
services.xserver = {
# Don't install feh into systemPackages
# refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
desktopManager.session = mkForce [];
enable = true;
display = 11;
tty = 11;
dpi = 200;
videoDrivers = [ "nvidia" ];
synaptics = {
enable = true;
twoFingerScroll = true;
accelFactor = "0.035";
};
};
systemd.services.display-manager.enable = false; systemd.services.display-manager.enable = false;
systemd.services.xmonad = { systemd.services.xmonad = {

View File

@ -90,7 +90,7 @@ mainNoArgs = do
, startupHook = do , startupHook = do
setWMName "LG3D" setWMName "LG3D"
whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK"))
(\path -> forkFile path [] Nothing) (\path -> forkFile path [] Nothing) <+> setWMName "LG3D"
, normalBorderColor = "#1c1c1c" , normalBorderColor = "#1c1c1c"
, focusedBorderColor = "#f000b0" , focusedBorderColor = "#f000b0"
, handleEventHook = handleShutdownEvent , handleEventHook = handleShutdownEvent
@ -130,13 +130,16 @@ spawnTermAt ws = do
let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env
forkFile urxvtcPath [] (Just env') forkFile urxvtcPath [] (Just env')
myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ())
myKeys conf = Map.fromList $ myKeys conf = Map.fromList $
[ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing) [ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing)
, ((_4S , xK_c ), kill) , ((_4S , xK_c ), kill)
, ((_4 , xK_p ), forkFile "${pkgs.pass}/bin/passmenu" ["--type"] Nothing) , ((_4 , xK_p ), spawn "${pkgs.writeDash "my-dmenu" ''
export PATH=$PATH:${pkgs.dmenu}/bin
exec dmenu_run "$@"
''}")
, ((_4 , xK_x ), chooseAction spawnTermAt) , ((_4 , xK_x ), chooseAction spawnTermAt)
, ((_4C , xK_x ), spawnRootTerm) , ((_4C , xK_x ), spawnRootTerm)