From d63de0f8604a5155a62c88f04c94905238d00011 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 12 Jan 2018 12:01:08 +0100 Subject: jeschli enklave: import IMw --- jeschli/1systems/enklave/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli') diff --git a/jeschli/1systems/enklave/config.nix b/jeschli/1systems/enklave/config.nix index 010089017..76e718699 100644 --- a/jeschli/1systems/enklave/config.nix +++ b/jeschli/1systems/enklave/config.nix @@ -4,6 +4,7 @@ imports = [ + { networking.dhcpcd.allowInterfaces = [ -- cgit v1.2.3 From 05b3e4b0cb4e83dcc84939919ca0a83e694606bf Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 12 Jan 2018 12:03:01 +0100 Subject: jeschli: +irc alias --- jeschli/2configs/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'jeschli') diff --git a/jeschli/2configs/default.nix b/jeschli/2configs/default.nix index 6d788d283..0ac3708bb 100644 --- a/jeschli/2configs/default.nix +++ b/jeschli/2configs/default.nix @@ -23,6 +23,9 @@ with import ; proot populate + # aliases + (writeDashBin "irc" "ssh chat@enklave -t tmux a") + #style most rxvt_unicode.terminfo -- cgit v1.2.3 From 3131b72a7c2a260e2f985a0fc8abccae7cce9280 Mon Sep 17 00:00:00 2001 From: Markus Hihn Date: Fri, 19 Jan 2018 10:36:35 +0100 Subject: j bln: +virtualbox --- jeschli/1systems/bln/config.nix | 1 + jeschli/2configs/virtualbox.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 jeschli/2configs/virtualbox.nix (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 9e5f8c52e..9c491c8a1 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix # ./dcso-vpn.nix ]; diff --git a/jeschli/2configs/virtualbox.nix b/jeschli/2configs/virtualbox.nix new file mode 100644 index 000000000..b2cb851a1 --- /dev/null +++ b/jeschli/2configs/virtualbox.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +let + mainUser = config.users.extraUsers.markus; + +in { + #services.virtualboxHost.enable = true; + virtualisation.virtualbox.host.enable = true; + + users.extraUsers = { + virtual = { + name = "virtual"; + description = "user for running VirtualBox"; + home = "/home/virtual"; + useDefaultShell = true; + extraGroups = [ "vboxusers" "audio" ]; + createHome = true; + }; + }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(virtual) NOPASSWD: ALL + ''; +} -- cgit v1.2.3 From 7b4bb4646815beafb56782b7934fbc755602dcc4 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 19 Jan 2018 13:30:41 +0100 Subject: jeschli: +IM --- jeschli/2configs/IM.nix | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 jeschli/2configs/IM.nix (limited to 'jeschli') diff --git a/jeschli/2configs/IM.nix b/jeschli/2configs/IM.nix new file mode 100644 index 000000000..171b78242 --- /dev/null +++ b/jeschli/2configs/IM.nix @@ -0,0 +1,56 @@ +with (import ); +{ config, lib, pkgs, ... }: +let + tmux = pkgs.writeDashBin "tmux" '' + export TERM=xterm-256color + exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' + set-option -g default-terminal screen-256color + ''} "$@" + ''; +in { + + services.bitlbee = { + enable = true; + portNumber = 6666; + plugins = [ + pkgs.bitlbee-facebook + pkgs.bitlbee-steam + pkgs.bitlbee-discord + ]; + libpurple_plugins = [ pkgs.telegram-purple ]; + }; + + users.extraUsers.chat = { + home = "/home/chat"; + uid = genid "chat"; + useDefaultShell = true; + createHome = true; + openssh.authorizedKeys.keys = with config.krebs.users; [ + jeschli.pubkey + jeschli-bln.pubkey + jeschli-brauerei.pubkey + ]; + packages = [ tmux ]; + }; + + + systemd.services.chat = { + description = "chat environment setup"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + restartIfChanged = false; + + path = [ + pkgs.rxvt_unicode.terminfo + ]; + + serviceConfig = { + User = "chat"; + RemainAfterExit = true; + Type = "oneshot"; + ExecStart = "${tmux}/bin/tmux -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat"; + ExecStop = "${tmux}/bin/tmux kill-session -t IM"; + }; + }; +} -- cgit v1.2.3 From baf4fc520b9faae6ad07c1b9f6d6623b92768ce6 Mon Sep 17 00:00:00 2001 From: jeschli Date: Sat, 20 Jan 2018 20:49:48 +0000 Subject: j: +bolide --- jeschli/1systems/bolide/config.nix | 134 +++++++++++++++++++++ jeschli/1systems/bolide/hardware-configuration.nix | 32 +++++ jeschli/1systems/bolide/source.nix | 4 + 3 files changed, 170 insertions(+) create mode 100644 jeschli/1systems/bolide/config.nix create mode 100644 jeschli/1systems/bolide/hardware-configuration.nix create mode 100644 jeschli/1systems/bolide/source.nix (limited to 'jeschli') diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix new file mode 100644 index 000000000..cb3eb0396 --- /dev/null +++ b/jeschli/1systems/bolide/config.nix @@ -0,0 +1,134 @@ +# 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, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + + + ]; + + krebs.build.host = config.krebs.hosts.bolide; + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + # boot.loader.grub.efiSupport = true; + # boot.loader.grub.efiInstallAsRemovable = true; + # boot.loader.efi.efiSysMountPoint = "/boot/efi"; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only + boot.initrd.luks.devices = [ { + name = "bla"; + device = "/dev/disk/by-uuid/53f1eeaf-a7ac-456c-a2af-778dd8b8d5b0"; + preLVM = true; + allowDiscards = true; + } ]; +# networking.hostName = "bolide"; # Define your hostname. + networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Select internationalisation properties. + # i18n = { + # consoleFont = "Lat2-Terminus16"; + # consoleKeyMap = "us"; + # defaultLocale = "en_US.UTF-8"; + # }; + + # Set your time zone. + # time.timeZone = "Europe/Amsterdam"; + + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + wget vim + # system helper + ag + curl + copyq + dmenu + git + i3lock + keepass + networkmanagerapplet + rsync + terminator + tmux + wget + # rxvt_unicode + # editors + emacs + # internet + thunderbird + chromium + google-chrome + # programming languages + go + gcc + ghc + python35 + python35Packages.pip + # go tools + golint + gotools + # dev tools + gnumake + jetbrains.pycharm-professional + jetbrains.webstorm + jetbrains.goland + # document viewer + zathura + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.bash.enableCompletion = true; + # programs.mtr.enable = true; + # programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable the X11 windowing system. + services.xserver.enable = true; + # services.xserver.layout = "us"; + # services.xserver.xkbOptions = "eurosign:e"; + + services.xserver.displayManager.sddm.enable = true; + services.xserver.windowManager.xmonad.enable = true; + services.xserver.windowManager.xmonad.enableContribAndExtras = true; + # Enable touchpad support. + # services.xserver.libinput.enable = true; + + # Enable the KDE Desktop Environment. + # services.xserver.displayManager.sddm.enable = true; + # services.xserver.desktopManager.plasma5.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.extraUsers.jeschli = { + isNormalUser = true; + uid = 1000; + }; + + # This value determines the NixOS release with which your system is to be + # compatible, in order to avoid breaking some software such as database + # servers. You should change this only after NixOS release notes say you + # should. + system.stateVersion = "17.09"; # Did you read the comment? + +} + diff --git a/jeschli/1systems/bolide/hardware-configuration.nix b/jeschli/1systems/bolide/hardware-configuration.nix new file mode 100644 index 000000000..183b29e42 --- /dev/null +++ b/jeschli/1systems/bolide/hardware-configuration.nix @@ -0,0 +1,32 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = + { device = "/dev/bolide-pool/bolide-root"; + fsType = "ext4"; + }; + + fileSystems."/home" = + { device = "/dev/bolide-pool/bolide-home"; + fsType = "ext4"; + }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3aeb67c4-5b6e-4df2-8013-607fe0fb8525"; + fsType = "ext4"; + }; + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = "powersave"; +} diff --git a/jeschli/1systems/bolide/source.nix b/jeschli/1systems/bolide/source.nix new file mode 100644 index 000000000..0bd7af50f --- /dev/null +++ b/jeschli/1systems/bolide/source.nix @@ -0,0 +1,4 @@ +import { + name = "bolide"; + secure = true; +} -- cgit v1.2.3 From 10f27ee8bd7a7f56f634dc8ea2bc4d40db9e655a Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 23 Jan 2018 19:35:46 +0100 Subject: j vim: refactoring --- jeschli/2configs/vim.nix | 148 +++++++++++++++++++++++++++++------------------ 1 file changed, 92 insertions(+), 56 deletions(-) (limited to 'jeschli') diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 1a2231a86..65ce7dfa4 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -1,5 +1,6 @@ { config, pkgs, ... }: +with import ; let customPlugins.vim-javascript = pkgs.vimUtils.buildVimPlugin { name = "vim-javascript"; @@ -16,72 +17,76 @@ let owner = "mxw"; repo = "vim-jsx"; rev = "5b968dfa512c57c38ad7fe420f3e8ab75a73949a"; - sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; + sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; }; }; in { -# { environment.systemPackages = [ (pkgs.vim_configurable.customize { name = "vim"; - - vimrcConfig.customRC = '' - set nocompatible - - :imap jk - :vmap v v - :map gr :GoRun - :nnoremap :bnext - :nnoremap - :map nf :NERDTreeToggle - set autowrite - set number - set ruler - set path+=** - set wildmenu - - noremap x "_x - set clipboard=unnamedplus - - let g:jsx_ext_required = 0 - - let g:go_list_type = "quickfix" - let g:go_test_timeout = '10s' - let g:go_fmt_command = "goimports" - let g:go_snippet_case_type = "camelcase" - let g:go_highlight_types = 1 - let g:go_highlight_fields = 1 - let g:go_highlight_functions = 1 - let g:go_highlight_methods = 1 - let g:go_highlight_extra_types = 1 - autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 - let g:rehash256 = 1 - let g:molokai_original = 1 - colorscheme molokai - let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] - let g:go_metalinter_autosave = 1 - " let g:go_metalinter_autosave_enabled = ['vet', 'golint'] - " let g:go_def_mode = 'godef' - " let g:go_decls_includes = "func,type" - - - " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. - let g:UltiSnipsExpandTrigger="" - let g:UltiSnipsJumpForwardTrigger="" - let g:UltiSnipsJumpBackwardTrigger="" - - " If you want :UltiSnipsEdit to split your window. - let g:UltiSnipsEditSplit="vertical" - - if has('persistent_undo') "check if your vim version supports it - set undofile "turn on the feature - set undodir=$HOME/.vim/undo "directory where the undo files will be stored - endif + vimrcConfig.customRC = let + colorscheme = ''colorscheme molokai''; + setStatements = '' + set autowrite + set clipboard=unnamedplus + set nocompatible + set path+=** + set ruler + set undodir=$HOME/.vim/undo "directory where the undo files will be stored + set undofile "turn on the feature + set wildignore+=*.o,*.class,*.hi,*.dyn_hi,*.dyn_o + set wildmenu + set listchars=trail:¶ + ''; + remapStatements = '' + imap jk + map gr :GoRun " Map gr to execute go run + map nf :NERDTreeToggle + nnoremap + nnoremap :bnext + noremap x "_x + vmap v v + ''; + settingsForGo = '' + let g:go_decls_includes = "func,type" + let g:go_def_mode = 'godef' + let g:go_fmt_command = "goimports" + let g:go_highlight_extra_types = 1 + let g:go_highlight_fields = 1 + let g:go_highlight_functions = 1 + let g:go_highlight_methods = 1 + let g:go_highlight_types = 1 + let g:go_list_type = "quickfix" + let g:go_metalinter_autosave = 1 + let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] + let g:go_snippet_case_type = "camelcase" + let g:go_test_timeout = '10s' + let g:jsx_ext_required = 0 + let g:molokai_original = 1 + let g:rehash256 = 1 ''; + in '' + ${colorscheme} + ${remapStatements} + ${setStatements} + ${settingsForGo} + " I dont know what this line is about + autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 + ''; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; vimrcConfig.vam.pluginDictionaries = [ - { names = [ "undotree" "molokai" "Syntastic" "ctrlp" "surround" "snipmate" "nerdtree" "easymotion"]; } + { names = [ + "ctrlp" + "easymotion" + "molokai" + "nerdtree" + "snipmate" + "surround" + "Syntastic" + "undotree" + ]; + } { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } { names = [ "vim-go" ]; ft_regex = "^go\$"; } # wanted: nsf/gocode { names = [ "vim-javascript" ]; ft_regex = "^js\$"; } @@ -89,4 +94,35 @@ in { ]; }) ]; + + # set up the directories up if they are not there. +# Needs to be changed. +# vim = let +# dirs = { +# backupdir = "$HOME/.cache/vim/backup"; +# swapdir = "$HOME/.cache/vim/swap"; +# undodir = "$HOME/.cache/vim/undo"; +# }; +# files = { +# viminfo = "$HOME/.cache/vim/info"; +# }; +# +# mkdirs = let +# dirOf = s: let out = concatStringsSep "/" (init (splitString "/" s)); +# in assert out != ""; out; +# alldirs = attrValues dirs ++ map dirOf (attrValues files); +# in unique (sort lessThan alldirs); +# in +# pkgs.symlinkJoin { +# name = "vim"; +# paths = [ +# (pkgs.writeDashBin "vim" '' +# set -efu +# (umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs}) +# exec ${pkgs.vim}/bin/vim "$@" +# '') +# pkgs.vim +# ]; +# }; + } -- cgit v1.2.3 From dcae1c81a715081dfbf9b06b40c1ac78c2438a02 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 23 Jan 2018 19:40:10 +0100 Subject: jeschli brauerei: +aliases --- jeschli/1systems/brauerei/config.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'jeschli') diff --git a/jeschli/1systems/brauerei/config.nix b/jeschli/1systems/brauerei/config.nix index 2dec45795..e4109c638 100644 --- a/jeschli/1systems/brauerei/config.nix +++ b/jeschli/1systems/brauerei/config.nix @@ -35,6 +35,13 @@ time.timeZone = "Europe/Amsterdam"; nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget + environment.shellAliases = { + n = "nix-shell"; + stocki = pkgs.writeDash "deploy" '' + cd ~/stockholm + exec nix-shell -I stockholm="$PWD" --run 'deploy --system="brauerei"' + ''; + }; environment.systemPackages = with pkgs; [ # system helper ag -- cgit v1.2.3 From eb1ecbe5b49e74862d61e67235e9eb74862cae56 Mon Sep 17 00:00:00 2001 From: jeschli Date: Sun, 28 Jan 2018 18:32:29 +0000 Subject: jeschli vim: +vim-elm --- jeschli/2configs/vim.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'jeschli') diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 65ce7dfa4..7721b1d40 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -20,6 +20,7 @@ let sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; }; }; + in { environment.systemPackages = [ (pkgs.vim_configurable.customize { @@ -65,11 +66,17 @@ in { let g:molokai_original = 1 let g:rehash256 = 1 ''; - + settingsForElm = '' + let g:polyglot_disabled = ['elm'] + let g:elm_detailed_complete = 1 + let g:elm_format_autosave = 1 + let g:elm_syntastic_show_warnings = 1 + ''; in '' ${colorscheme} ${remapStatements} ${setStatements} + ${settingsForElm} ${settingsForGo} " I dont know what this line is about autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 @@ -85,6 +92,7 @@ in { "surround" "Syntastic" "undotree" + "elm-vim" ]; } { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } -- cgit v1.2.3 From 2682c735526d6593795d324a50dda5fd557c6ef1 Mon Sep 17 00:00:00 2001 From: jeschli Date: Sun, 28 Jan 2018 18:34:54 +0000 Subject: jeschli bolide: +j std config --- jeschli/1systems/bolide/config.nix | 184 +++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 88 deletions(-) (limited to 'jeschli') diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix index cb3eb0396..83640801f 100644 --- a/jeschli/1systems/bolide/config.nix +++ b/jeschli/1systems/bolide/config.nix @@ -26,7 +26,7 @@ device = "/dev/disk/by-uuid/53f1eeaf-a7ac-456c-a2af-778dd8b8d5b0"; preLVM = true; allowDiscards = true; - } ]; + } ]; # networking.hostName = "bolide"; # Define your hostname. networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -42,93 +42,101 @@ # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget - nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ - wget vim - # system helper - ag - curl - copyq - dmenu - git - i3lock - keepass - networkmanagerapplet - rsync - terminator - tmux - wget - # rxvt_unicode - # editors - emacs - # internet - thunderbird - chromium - google-chrome - # programming languages - go - gcc - ghc - python35 - python35Packages.pip - # go tools - golint - gotools - # dev tools - gnumake - jetbrains.pycharm-professional - jetbrains.webstorm - jetbrains.goland - # document viewer - zathura - ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.bash.enableCompletion = true; - # programs.mtr.enable = true; - # programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable the X11 windowing system. - services.xserver.enable = true; - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; - - services.xserver.displayManager.sddm.enable = true; - services.xserver.windowManager.xmonad.enable = true; - services.xserver.windowManager.xmonad.enableContribAndExtras = true; - # Enable touchpad support. - # services.xserver.libinput.enable = true; - - # Enable the KDE Desktop Environment. - # services.xserver.displayManager.sddm.enable = true; - # services.xserver.desktopManager.plasma5.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.extraUsers.jeschli = { - isNormalUser = true; - uid = 1000; - }; - - # This value determines the NixOS release with which your system is to be - # compatible, in order to avoid breaking some software such as database - # servers. You should change this only after NixOS release notes say you - # should. - system.stateVersion = "17.09"; # Did you read the comment? + environment.shellAliases = { + n = "nix-shell"; + stocki = pkgs.writeDash "deploy" '' + cd ~/stockholm + exec nix-shell -I stockholm="$PWD" --run 'deploy --system="bolide"' + ''; + }; + nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + wget vim + # system helper + ag + curl + copyq + dmenu + git + i3lock + keepass + networkmanagerapplet + rsync + terminator + tmux + wget + # rxvt_unicode + # editors + emacs + # internet + thunderbird + chromium + google-chrome + # programming languages + go + gcc + ghc + python35 + python35Packages.pip + # go tools + golint + gotools + # dev tools + elmPackages.elm + gnumake + jetbrains.pycharm-professional + jetbrains.webstorm + jetbrains.goland + # document viewer + zathura + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.bash.enableCompletion = true; + # programs.mtr.enable = true; + # programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable the X11 windowing system. + services.xserver.enable = true; + # services.xserver.layout = "us"; + # services.xserver.xkbOptions = "eurosign:e"; + + services.xserver.displayManager.sddm.enable = true; + services.xserver.windowManager.xmonad.enable = true; + services.xserver.windowManager.xmonad.enableContribAndExtras = true; + # Enable touchpad support. + # services.xserver.libinput.enable = true; + + # Enable the KDE Desktop Environment. + # services.xserver.displayManager.sddm.enable = true; + # services.xserver.desktopManager.plasma5.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.extraUsers.jeschli = { + isNormalUser = true; + uid = 1000; + }; + + # This value determines the NixOS release with which your system is to be + # compatible, in order to avoid breaking some software such as database + # servers. You should change this only after NixOS release notes say you + # should. + system.stateVersion = "17.09"; # Did you read the comment? } -- cgit v1.2.3 From 65eadae50972a5a4ad5a510ce1157d3c617fd757 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 09:25:22 +0100 Subject: j enklave +taskserver --- jeschli/1systems/enklave/config.nix | 10 ++++++++++ jeschli/1systems/enklave/taskserver.nix | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 jeschli/1systems/enklave/taskserver.nix (limited to 'jeschli') diff --git a/jeschli/1systems/enklave/config.nix b/jeschli/1systems/enklave/config.nix index 76e718699..470566a8b 100644 --- a/jeschli/1systems/enklave/config.nix +++ b/jeschli/1systems/enklave/config.nix @@ -40,6 +40,16 @@ }; }; } + { + services.taskserver = { + enable = true; + fqdn = "enklave.r"; + listenHost = "::"; + listenPort = 53589; + organisations.lass.users = [ "jeschli" ]; + }; + networking.firewall.allowedTCPPorts = [ 53589 ]; + } ]; krebs.build.host = config.krebs.hosts.enklave; diff --git a/jeschli/1systems/enklave/taskserver.nix b/jeschli/1systems/enklave/taskserver.nix new file mode 100644 index 000000000..23b235d70 --- /dev/null +++ b/jeschli/1systems/enklave/taskserver.nix @@ -0,0 +1,10 @@ + { + services.taskserver = { + enable = true; + fqdn = "enklave.r"; + listenHost = "::"; + listenPort = 53589; + organisations.lass.users = [ "jeschli" ]; + }; + networking.firewall.allowedTCPPorts = [ 53589 ]; + } -- cgit v1.2.3 From 3b23e6e8bbb42d0866b0d4d6c42f610510fa915c Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 09:38:47 +0100 Subject: j: +zsh --- jeschli/2configs/default.nix | 1 + jeschli/2configs/zsh.nix | 138 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 jeschli/2configs/zsh.nix (limited to 'jeschli') diff --git a/jeschli/2configs/default.nix b/jeschli/2configs/default.nix index 0ac3708bb..5aaabe24b 100644 --- a/jeschli/2configs/default.nix +++ b/jeschli/2configs/default.nix @@ -4,6 +4,7 @@ with import ; imports = [ ./vim.nix ./retiolum.nix + ./zsh.nix { environment.variables = { diff --git a/jeschli/2configs/zsh.nix b/jeschli/2configs/zsh.nix new file mode 100644 index 000000000..be5b661b4 --- /dev/null +++ b/jeschli/2configs/zsh.nix @@ -0,0 +1,138 @@ +{ config, lib, pkgs, ... }: +{ + environment.systemPackages = [ pkgs.fzf ]; + programs.zsh = { + enable = true; + shellInit = '' + #disable config wizard + zsh-newuser-install() { :; } + ''; + interactiveShellInit = '' + setopt autocd extendedglob + bindkey -e + + #history magic + bindkey "" up-line-or-local-history + bindkey "" down-line-or-local-history + + up-line-or-local-history() { + zle set-local-history 1 + zle up-line-or-history + zle set-local-history 0 + } + zle -N up-line-or-local-history + down-line-or-local-history() { + zle set-local-history 1 + zle down-line-or-history + zle set-local-history 0 + } + zle -N down-line-or-local-history + + setopt share_history + setopt hist_ignore_dups + # setopt inc_append_history + bindkey '^R' history-incremental-search-backward + + #C-x C-e open line in editor + autoload -z edit-command-line + zle -N edit-command-line + bindkey "^X^E" edit-command-line + + #fzf inclusion + source ${pkgs.fzf}/share/fzf/completion.zsh + source ${pkgs.fzf}/share/fzf/key-bindings.zsh + + #completion magic + autoload -Uz compinit + compinit + zstyle ':completion:*' menu select + + #enable automatic rehashing of $PATH + zstyle ':completion:*' rehash true + + eval $(dircolors -b ${pkgs.fetchFromGitHub { + owner = "trapd00r"; + repo = "LS_COLORS"; + rev = "master"; + sha256="05lh5w3bgj9h8d8lrbbwbzw8788709cnzzkl8yh7m1dawkpf6nlp"; + }}/LS_COLORS) + + #beautiful colors + alias ls='ls --color' + # zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS} + + #emacs bindings + bindkey "[7~" beginning-of-line + bindkey "[8~" end-of-line + bindkey "Oc" emacs-forward-word + bindkey "Od" emacs-backward-word + + #aliases + alias ll='ls -l' + alias la='ls -la' + + #fancy window title magic + ''; + promptInit = '' + # TODO: figure out why we need to set this here + HISTSIZE=900001 + HISTFILESIZE=$HISTSIZE + SAVEHIST=$HISTSIZE + + autoload -U promptinit + promptinit + + p_error='%(?..%F{red}%?%f )' + t_error='%(?..%? )' + + case $UID in + 0) + p_username='%F{red}root%f' + t_username='root' + ;; + 1337) + p_username="" + t_username="" + ;; + *) + p_username='%F{blue}%n%f' + t_username='%n' + ;; + esac + + if test -n "$SSH_CLIENT"; then + p_hostname='@%F{magenta}%M%f ' + t_hostname='@%M ' + else + p_hostname="" + t_hostname="" + fi + + #check if in nix shell + if test -n "$buildInputs"; then + p_nixshell='%F{green}[s]%f ' + t_nixshell='[s] ' + else + p_nixshell="" + t_nixshell="" + fi + + PROMPT="$p_error$p_username$p_hostname$p_nixshell%~ " + TITLE="$t_error$t_username$t_hostname$t_nixshell%~" + case $TERM in + (*xterm* | *rxvt*) + function precmd { + PROMPT_EVALED="$(print -P $TITLE)" + echo -ne "\033]0;$$ $PROMPT_EVALED\007" + } + # This is seen while the shell waits for a command to complete. + function preexec { + PROMPT_EVALED="$(print -P $TITLE)" + echo -ne "\033]0;$$ $PROMPT_EVALED $1\007" + } + ;; + esac + ''; + }; + users.defaultUserShell = "/run/current-system/sw/bin/zsh"; +} -- cgit v1.2.3 From 8a78dd604d9e8334e3db65bb2384ad2a641a68c0 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:54:53 +0100 Subject: j bln: +stocki --- jeschli/1systems/bln/config.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 9c491c8a1..c088dce7d 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -36,7 +36,15 @@ allowDiscards = true; } ]; - + environment.shellAliases = { + n = "nix-shell"; + gd = "cd /home/markus/go/src/gitlab.dcso.lolcat"; + gh = "cd /home/markus/go/src/github.com"; + stocki = pkgs.writeDash "deploy" '' + cd ~/stockholm + LOGNAME=jeschli exec nix-shell -I stockholm="$PWD" --run 'deploy --system="bln"' + ''; + }; networking.hostName = lib.mkForce "BLN02NB0154"; # Define your hostname. networking.networkmanager.enable = true; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -55,11 +63,6 @@ # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget nixpkgs.config.allowUnfree = true; - environment.shellAliases = { - n = "nix-shell"; - gd = "cd /home/markus/go/src/gitlab.dcso.lolcat"; - gh = "cd /home/markus/go/src/github.com"; - }; environment.variables = { GOROOT= [ "${pkgs.go.out}/share/go" ]; }; environment.systemPackages = with pkgs; [ # system helper -- cgit v1.2.3 From 52be338d64125398e363e6bfd52c35bccd08b885 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:55:14 +0100 Subject: j bln: +elm --- jeschli/1systems/bln/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index c088dce7d..14cbb7ed9 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -89,6 +89,7 @@ chromium google-chrome # programming languages + elmPackages.elm go gcc ghc -- cgit v1.2.3 From e5114f1bfb9f7f412236f05e15fb6023699c96d6 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:56:05 +0100 Subject: j fontsize default 12; bln 20 --- jeschli/1systems/bln/config.nix | 5 ++-- jeschli/2configs/urxvt.nix | 65 ++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 32 deletions(-) (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 14cbb7ed9..6893c6569 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -3,16 +3,17 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, lib, pkgs, ... }: - +# bln config file { imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix # ./dcso-vpn.nix ]; - + jeschliFontSize = 20; # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; diff --git a/jeschli/2configs/urxvt.nix b/jeschli/2configs/urxvt.nix index 69811eb0a..014918748 100644 --- a/jeschli/2configs/urxvt.nix +++ b/jeschli/2configs/urxvt.nix @@ -1,34 +1,39 @@ { config, pkgs, ... }: with import ; - { - services.urxvtd.enable = true; - krebs.xresources.enable = true; - krebs.xresources.resources.urxvt = '' - *foreground: rgb:a8/a8/a8 - *background: rgb:00/00/00 - *faceName: DejaVu Sans Mono - *faceSize: 12 - *color0: rgb:00/00/00 - *color1: rgb:a8/00/00 - *color2: rgb:00/a8/00 - *color3: rgb:a8/54/00 - *color4: rgb:00/00/a8 - *color5: rgb:a8/00/a8 - *color6: rgb:00/a8/a8 - *color7: rgb:a8/a8/a8 - *color8: rgb:54/54/54 - *color9: rgb:fc/54/54 - *color10: rgb:54/fc/54 - *color11: rgb:fc/fc/54 - *color12: rgb:54/54/fc - *color13: rgb:fc/54/fc - *color14: rgb:54/fc/fc - *color15: rgb:fc/fc/fc - - URxvt*scrollBar: false - URxvt*urgentOnBell: true - URxvt*font: xft:DejaVu Sans Mono:pixelsize=12 - URXvt*faceSize: 12 - ''; + options.jeschliFontSize = mkOption { + type = types.int; + default = 12; + }; + config = { + services.urxvtd.enable = true; + krebs.xresources.enable = true; + krebs.xresources.resources.urxvt = '' + *foreground: rgb:a8/a8/a8 + *background: rgb:00/00/00 + *faceName: DejaVu Sans Mono + *faceSize: ${toString config.jeschliFontSize} + *color0: rgb:00/00/00 + *color1: rgb:a8/00/00 + *color2: rgb:00/a8/00 + *color3: rgb:a8/54/00 + *color4: rgb:26/8b/d2 + *color5: rgb:a8/00/a8 + *color6: rgb:00/a8/a8 + *color7: rgb:a8/a8/a8 + *color8: rgb:54/54/54 + *color9: rgb:fc/54/54 + *color10: rgb:54/fc/54 + *color11: rgb:fc/fc/54 + *color12: rgb:54/54/fc + *color13: rgb:fc/54/fc + *color14: rgb:54/fc/fc + *color15: rgb:fc/fc/fc + + URxvt*scrollBar: false + URxvt*urgentOnBell: true + URxvt*font: xft:DejaVu Sans Mono:pixelsize=${toString config.jeschliFontSize} + URXvt*faceSize: ${toString config.jeschliFontSize} + ''; + }; } -- cgit v1.2.3 From 257f91eff3cf2ef01c25f4e88d186ea30dc250f7 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 7 Feb 2018 10:08:36 +0100 Subject: j vim: +trailing White detection; *cosmetics --- jeschli/2configs/vim.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'jeschli') diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 7721b1d40..02ea95f6e 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -27,6 +27,9 @@ in { name = "vim"; vimrcConfig.customRC = let colorscheme = ''colorscheme molokai''; + highlightTrailingWhiteSpaces = '' + au Syntax * syn match Garbage containedin=ALL /\s\+$/ + ''; setStatements = '' set autowrite set clipboard=unnamedplus @@ -74,11 +77,12 @@ in { ''; in '' ${colorscheme} + ${highlightTrailingWhiteSpaces} ${remapStatements} ${setStatements} ${settingsForElm} ${settingsForGo} - " I dont know what this line is about + " dont expand tabs in go files and show it with four whitespaces. autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 ''; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; -- cgit v1.2.3 From 057d428ef53632cd8e6df7efd9ed5ca84c9a7b56 Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 8 Feb 2018 11:20:24 +0100 Subject: j bln: +termite --- jeschli/1systems/bln/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 6893c6569..8a3090a49 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -66,6 +66,7 @@ nixpkgs.config.allowUnfree = true; environment.variables = { GOROOT= [ "${pkgs.go.out}/share/go" ]; }; environment.systemPackages = with pkgs; [ + termite # system helper ag copyq -- cgit v1.2.3 From ab24f3c3a802eabef3f425d2b46e1b4ffc626e71 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 9 Feb 2018 15:11:24 +0100 Subject: j vim.nix: remap tt to GoTest --- jeschli/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli') diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 02ea95f6e..c13113f1c 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -45,6 +45,7 @@ in { remapStatements = '' imap jk map gr :GoRun " Map gr to execute go run + map tt :GoTest " Map tt to execute go test map nf :NERDTreeToggle nnoremap nnoremap :bnext -- cgit v1.2.3 From 94c59247d13622b0293be54cdb5893526434f5d1 Mon Sep 17 00:00:00 2001 From: jeschli Date: Sun, 18 Feb 2018 10:41:57 +0100 Subject: brauerei: +backlight --- jeschli/1systems/brauerei/config.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jeschli') diff --git a/jeschli/1systems/brauerei/config.nix b/jeschli/1systems/brauerei/config.nix index e4109c638..eb2bb11d2 100644 --- a/jeschli/1systems/brauerei/config.nix +++ b/jeschli/1systems/brauerei/config.nix @@ -79,6 +79,8 @@ jetbrains.goland # document viewer zathura + # xorg + xorg.xbacklight ]; # Some programs need SUID wrappers, can be configured further or are -- cgit v1.2.3