├── .gitignore ├── .gitmodules ├── Makefile ├── README.md ├── ansible ├── inventory ├── playbook.yml └── roles │ └── nixos_info │ └── tasks │ └── main.yml ├── configuration-common.nix ├── configuration.nix ├── dotfiles ├── Xdefaults ├── aliases ├── azilink.ovpn ├── bash_profile ├── bashrc ├── bin │ ├── chrome.exe │ ├── cmd.exe │ ├── explorer.exe │ ├── outlook.exe │ ├── rdpexec │ └── vs12.exe ├── common ├── gitconfig ├── grconfig.json ├── irssi │ ├── config │ └── scripts │ │ ├── autorun │ │ └── irssinotifier.pl │ │ └── irssinotifier.pl ├── mailrc ├── nixpkgs │ ├── config.nix │ └── environments │ │ ├── deploy.nix │ │ ├── migrate.nix │ │ ├── opengl.nix │ │ ├── swc.nix │ │ ├── teensy.nix │ │ ├── tots.nix │ │ ├── wld.nix │ │ └── xmonad.nix ├── pwclientrc ├── ssh │ ├── authorized_keys │ └── config ├── tmux.conf ├── tmuxinator │ ├── asterisk.yml │ ├── clusters.yml │ ├── cose.yml │ ├── dev.yml │ ├── finance.yml │ ├── irc.yml │ ├── main.yml │ ├── mesa.yml │ ├── school.yml │ ├── website.yml │ └── work.yml ├── unison │ ├── common.prf │ └── default.prf ├── velox.conf ├── vimlatex ├── vimnotepad ├── vimpython ├── vimrc ├── vimtabs ├── ycm_extra_conf.py └── zshrc ├── install.sh ├── libvirt_qemu.conf ├── machines ├── asbel.nix ├── dhaos.nix ├── hakase.nix ├── hazuki.nix ├── heldarf.nix ├── kresnik.nix ├── lain.nix ├── miku.nix └── nixos.nix ├── nixops.nix ├── patches └── urxvt-text-shadows.patch ├── pkgs ├── asterisk-testsuite │ └── default.nix ├── asterisk │ ├── default.nix │ ├── disable-create-vardirs.patch │ ├── disable-download.patch │ └── runtime-vardirs.patch ├── dahdi-linux │ ├── default.nix │ └── updateFirmware.pl ├── dahdi-tools │ └── default.nix ├── dmenu-wl │ └── default.nix ├── ebview │ ├── default.nix │ └── remove_gtk_disable_deprecated.patch ├── festival │ └── default.nix ├── fourchan-dl │ └── default.nix ├── gentoo │ ├── chrootenv.nix │ └── default.nix ├── gl2ps │ └── default.nix ├── glapse │ ├── default.nix │ └── fix-paths.patch ├── godot │ └── default.nix ├── heirloom-mailx │ └── default.nix ├── image-sdf │ ├── default.nix │ ├── package.json │ └── packages.json ├── libeb │ └── default.nix ├── libswc │ └── default.nix ├── libwld │ └── default.nix ├── makehuman │ └── default.nix ├── ospray │ └── default.nix ├── osvr-core │ └── default.nix ├── osvr-libfunctionality │ └── default.nix ├── osvr-tracker-viewer │ └── default.nix ├── pcsx2 │ └── default.nix ├── piglit │ ├── default.nix │ └── hack-for-wrapper.patch ├── polish-shell │ └── default.nix ├── popcorn-time │ └── default.nix ├── pwclient │ └── default.nix ├── qtsixa │ ├── QtSixA-1.5.1-unistd-fix.patch │ └── default.nix ├── qtspim │ ├── default.nix │ └── fix-bool-int-declarations.patch ├── sipp │ ├── default.nix │ └── fix-configure.patch ├── spawner │ └── default.nix ├── speech_tools │ └── default.nix ├── spim │ └── default.nix ├── st-wl │ └── default.nix ├── steam │ └── chrootenv.nix ├── tesseract │ ├── default.nix │ └── tess_client ├── tots │ └── default.nix ├── unison │ └── unison-2.40.102.nix ├── velox │ └── default.nix ├── virt-manager │ └── default.nix └── waffle │ └── default.nix ├── private └── .gitignore ├── profiles ├── android.nix ├── arduino.nix ├── audio.nix ├── default.nix ├── desktop.nix ├── development.nix ├── games.nix ├── graphics.nix ├── laptop.nix ├── mathematics.nix ├── mesa.nix ├── mesa │ ├── piglit-builder │ │ └── default.nix │ └── piglits │ │ └── master.nix ├── networking.nix ├── printing.nix ├── redshift.nix ├── scanning.nix ├── school.nix ├── sdr.nix ├── server.nix ├── telephony.nix ├── telephony │ ├── BLA.nix │ ├── BLA_autocontext.nix │ ├── app_bla.nix │ ├── asteriskTests.nix │ ├── confBridge.nix │ └── confBridgeSLA.nix ├── vfio.nix ├── virtualization.nix ├── virtualreality.nix └── wayland.nix ├── rebuild-local.sh ├── rebuild.sh ├── services ├── asterisk.nix ├── display │ ├── default.nix │ ├── display-managers │ │ ├── auto.nix │ │ ├── default.nix │ │ ├── wayland │ │ │ ├── default.nix │ │ │ ├── swc-launch.nix │ │ │ └── weston-launch.nix │ │ └── x11 │ │ │ └── default.nix │ ├── sessions │ │ ├── default.nix │ │ └── wayland │ │ │ ├── default.nix │ │ │ └── velox │ │ │ └── default.nix │ └── xserver.nix ├── ssh-phone-home.nix └── wayland │ ├── swc-launch.nix │ └── swc-servers │ ├── default.nix │ └── velox.nix └── update.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | .*.swo 3 | .*.swn 4 | hardware-configuration.nix 5 | hostname 6 | Session.vim 7 | private 8 | /result 9 | /core 10 | /livecd 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dotfiles/oh-my-zsh"] 2 | path = dotfiles/oh-my-zsh 3 | url = https://github.com/auntieNeo/oh-my-zsh.git 4 | branch = auntie 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: rebuild 2 | 3 | .PHONY: rebuild 4 | rebuild: 5 | ./rebuild.sh 6 | 7 | .PHONY: update 8 | update: 9 | ./update.sh 10 | 11 | livecd: 12 | nix-build -A iso_minimal.x86_64-linux -o ./livecd "${HOME}/code/nixpkgs/nixos/release.nix" 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | ###### # ####### ##### ##### 3 | # # # # # # # # 4 | # # # # # # 5 | ###### # ##### ##### ##### 6 | # # # # # # 7 | # # # # # # # # 8 | ###### ####### ####### ##### ##### 9 | 10 | ####### # # ### ##### 11 | # # # # # # 12 | # # # # # 13 | # ####### # ##### 14 | # # # # # 15 | # # # # # # 16 | # # # ### ##### 17 | 18 | # # ####### ##### ##### 19 | ## ## # # # # # 20 | # # # # # # # 21 | # # # ##### ##### ##### 22 | # # # # # 23 | # # # # # # # 24 | # # ####### ##### ##### 25 | ``` 26 | -------------------------------------------------------------------------------- /ansible/inventory: -------------------------------------------------------------------------------- 1 | hakase ansible_ssh_user=auntieneo ansible_python_interpreter=/run/current-system/sw/bin/python 2 | hazuki ansible_ssh_user=auntieneo ansible_python_interpreter=/run/current-system/sw/bin/python 3 | miku ansible_ssh_user=auntieneo ansible_python_interpreter=/run/current-system/sw/bin/python 4 | -------------------------------------------------------------------------------- /ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: hakase 3 | sudo: yes 4 | roles: 5 | - { role: nixos_info } 6 | - hosts: hazuki 7 | sudo: yes 8 | roles: 9 | - { role: nixos_info } 10 | - hosts: miku 11 | sudo: yes 12 | roles: 13 | - { role: nixos_info } 14 | -------------------------------------------------------------------------------- /ansible/roles/nixos_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: check the installed nixos version 4 | command: /run/current-system/sw/bin/nixos-version 5 | register: nixos_version 6 | 7 | - debug: msg="{{ nixos_version.stdout }}" 8 | -------------------------------------------------------------------------------- /configuration.nix: -------------------------------------------------------------------------------- 1 | # Edit this configuration file to define what should be installed on 2 | # your system. Help is available in the configuration.nix(5) man page 3 | # and in the NixOS manual (accessible by running ‘nixos-help’). 4 | 5 | # This configuration file simply determines the hostname before importing most 6 | # of the actual configuration from ./configuration-common.nix. This is done so 7 | # that the same configuration files can be used with both conventionally 8 | # installed NixOS (see nixos-install) and NixOS installed by Nixops. 9 | 10 | { config, pkgs, ... }: 11 | 12 | # TODO: Determine the hostname from either UUID or MAC address... or, whatever Nixops does 13 | let hostName = "${builtins.readFile ./hostname}"; 14 | in 15 | rec { 16 | imports = 17 | [ # Include the results of the hardware scan. 18 | ./hardware-configuration.nix # FIXME: what to do with this? 19 | # Configuration common to conventional and Nixops-provisioned computers 20 | ./configuration-common.nix 21 | # Import machine-specific configuration files. 22 | (./machines + "/${hostName}.nix") 23 | ]; 24 | 25 | networking.hostName = "${hostName}"; 26 | 27 | boot = { 28 | # Use more recent kernel for Intel HD Graphics 520 support 29 | # kernelPackages = pkgs.linuxPackages_4_3; 30 | kernelPackages = pkgs.linuxPackages_4_8; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /dotfiles/Xdefaults: -------------------------------------------------------------------------------- 1 | XTerm*metaSendsEscape: true 2 | xterm*Background: #FFFFFF 3 | xterm*Foreground: #000000 4 | URxvt*termName: rxvt 5 | URxvt*scrollstyle: plain 6 | URxvt*borderColor: 7 7 | 8 | #Psudo transparency for white backgrounds... 9 | #URxvt*shading: -50 10 | URxvt*tintColor: white 11 | URxvt*foreground: black 12 | URxvt*background: white 13 | URxvt*inheritPixmap: true 14 | URxvt*textShadow: true 15 | URxvt*shadowColor: #FFFFFF 16 | URxvt.iso14755_52: false 17 | 18 | #urxvt*font: fixed, xft:Kochi Gothic:antialias=false 19 | 20 | #X broke and made the up key printscr 21 | URxvt.print-pipe: echo "echoing print" 22 | 23 | ## The default font 24 | #URxvt*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 25 | #URxvt*boldFont: -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1 26 | 27 | ## Large version of the default font 28 | #URxvt*font: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1 29 | #URxvt*boldFont: -misc-fixed-bold-r-normal--20-200-75-75-c-100-iso8859-1 30 | 31 | ## dina font looks pretty readable at this size 32 | #URxvt*font: -windows-dina-medium-r-normal--13-100-96-96-c-80-iso8859-1 33 | #URxvt*boldFont: -windows-dina-bold-r-normal--13-100-96-96-c-80-iso8859-1 34 | 35 | # dina font looks less squat at 15 pixels than 13 pixels, but is still the same width 36 | #URxvt*font: -windows-dina-medium-r-normal--15-90-96-96-c-70-*-* 37 | #URxvt*boldFont: -windows-dina-bold-r-normal--15-90-96-96-c-70-*-* 38 | 39 | #URxvt*font: xft:dina:size=15 40 | #URxvt*boldFont: xft:dina:bold:size=15 41 | 42 | ## terminus can be nice and large for a programmer font 43 | #URxvt*font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-*-* 44 | 45 | #URxvt*font: -*-proggyclean-medium-r-normal-*-13-*-*-*-*-*-*-* 46 | #URxvt*boldFont: -*-proggyclean-medium-r-normal-*-13-*-*-*-*-*-*-* 47 | 48 | #URxvt*font: -*-proggysmall-medium-r-normal-*-10-*-*-*-*-*-*-* 49 | #URxvt*boldFont: -*-proggysmall-medium-r-normal-*-10-*-*-*-*-*-*-* 50 | 51 | #URxvt*font: -*-proggytiny-medium-r-normal-*-10-*-*-*-*-*-*-* 52 | #URxvt*boldFont: -*-proggytiny-medium-r-normal-*-10-*-*-*-*-*-*-* 53 | 54 | #URxvt*font: -*-proggysquare-medium-r-normal-*-11-*-*-*-*-*-*-* 55 | #URxvt*boldFont: -*-proggysquare-medium-r-normal-*-11-*-*-*-*-*-*-* 56 | 57 | #URxvt*font: -windows-dina-medium-r-normal--15-*-*-*-*-*-*-* 58 | #URxvt*boldFont: -*-dina-bold-r-normal-*-15-*-*-*-*-*-*-* 59 | 60 | #URxvt*shading: 0 61 | #URxvt*tintColor: white 62 | #URxvt*foreground: white 63 | #URxvt*background: black 64 | #URxvt*inheritPixmap: true 65 | #URxvt.iso14755_52: false 66 | 67 | #Real transparency for white backgrounds... 68 | #URxvt*depth: 32 69 | #URxvt*foreground: black 70 | ##URxvt*background: rgba:7777/7777/7777/7777 71 | #URxvt*background: rgba:EEEE/EEEE/EEEE/7777 72 | 73 | #Xcursor.theme: zelda-cursors-1.0 74 | Xcursor*theme: Jimmac 75 | 76 | ##Gnome terminal colors 77 | ! black 78 | URxvt*color0 : #2E3436 79 | URxvt*color8 : #555753 80 | ! red 81 | URxvt*color1 : #CC0000 82 | URxvt*color9 : #EF2929 83 | ! green 84 | URxvt*color2 : #4E9A06 85 | URxvt*color10 : #8AE234 86 | ! yellow 87 | URxvt*color3 : #C4A000 88 | URxvt*color11 : #FCE94F 89 | ! blue 90 | URxvt*color4 : #3465A4 91 | URxvt*color12 : #729FCF 92 | ! magenta 93 | URxvt*color5 : #75507B 94 | URxvt*color13 : #AD7FA8 95 | ! cyan 96 | URxvt*color6 : #06989A 97 | URxvt*color14 : #34E2E2 98 | ! white 99 | URxvt*color7 : #D3D7CF 100 | URxvt*color15 : #EEEEEC 101 | -------------------------------------------------------------------------------- /dotfiles/aliases: -------------------------------------------------------------------------------- 1 | # TODO: make aliases work in dmenu 2 | # Set some aliases for easy NixOS package development. 3 | NIXPKGS_LOCAL="/home/auntieneo/code/nixpkgs" 4 | alias nix-build-local='nix-build $NIXPKGS_LOCAL' 5 | alias nbl='nix-build-local' 6 | alias nix-env-local='nix-env -f $NIXPKGS_LOCAL' 7 | alias nel='nix-env-local' 8 | alias nix-shell-local='nix-shell $NIXPKGS_LOCAL' # FIXME: prevent nix-shell from changing the prompt to green 9 | alias nsl='nix-shell-local' 10 | 11 | # Misc options 12 | alias alsamixer="alsamixer --no-color" 13 | alias gr-unpushed="gr git --no-pager log --branches --not --remotes --simplify-by-decoration --decorate --oneline" 14 | alias unison="unison -ui text" 15 | alias grep="grep --color=auto --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn" 16 | -------------------------------------------------------------------------------- /dotfiles/azilink.ovpn: -------------------------------------------------------------------------------- 1 | dev tun 2 | 3 | remote 127.0.0.1 41927 tcp-client 4 | proto tcp-client 5 | ifconfig 192.168.56.2 192.168.56.1 6 | route 0.0.0.0 128.0.0.0 7 | route 128.0.0.0 128.0.0.0 8 | socket-flags TCP_NODELAY 9 | #keepalive 10 30 10 | ping 10 11 | dhcp-option DNS 192.168.56.1 12 | 13 | -------------------------------------------------------------------------------- /dotfiles/bash_profile: -------------------------------------------------------------------------------- 1 | if [ -f $HOME/.bashrc ]; then 2 | source $HOME/.bashrc 3 | fi 4 | -------------------------------------------------------------------------------- /dotfiles/bashrc: -------------------------------------------------------------------------------- 1 | if [ -f $HOME/.aliases ]; then 2 | source $HOME/.aliases 3 | fi 4 | 5 | if [ -f $HOME/.common ]; then 6 | source $HOME/.common 7 | fi 8 | 9 | # Set the prompt to Arch Linux's default user prompt. 10 | if [ "$UID" -ne 0 ]; then 11 | PS1='[\u@\h \W]\$ ' 12 | fi 13 | -------------------------------------------------------------------------------- /dotfiles/bin/chrome.exe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rdpexec="`dirname $0`/rdpexec" 3 | # FIXME: chrome doesn't seem to work 4 | $rdpexec '%programfiles(x86)%\Google\Chrome\Application\chrome.exe' 5 | -------------------------------------------------------------------------------- /dotfiles/bin/cmd.exe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rdpexec="`dirname $0`/rdpexec" 3 | $rdpexec '%windir%\system32\cmd.exe' 4 | -------------------------------------------------------------------------------- /dotfiles/bin/explorer.exe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rdpexec="`dirname $0`/rdpexec" 3 | $rdpexec '%windir%\explorer.exe' 4 | -------------------------------------------------------------------------------- /dotfiles/bin/outlook.exe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rdpexec="`dirname $0`/rdpexec" 3 | $rdpexec '%programfiles(x86)%\Microsoft Office\office12\outlook.exe' 4 | -------------------------------------------------------------------------------- /dotfiles/bin/rdpexec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env expect 2 | 3 | # Get the RDP command to run 4 | set command [lindex $argv 0] 5 | 6 | # Get the RDP password 7 | set password_file "/etc/nixos/private/rdp_password" 8 | set f [open $password_file] 9 | set rdp_password [read -nonewline $f] 10 | close $f 11 | 12 | set timeout 10 13 | 14 | # TODO: get clipboard redirection working 15 | spawn -ignore HUP xfreerdp -u fg6tqj --app --plugin rail --data '$command' -- 192.168.122.65 16 | 17 | expect { 18 | Password: { 19 | send_user "password from $password_file\n" 20 | send "$rdp_password\r" 21 | } 22 | } 23 | 24 | expect { 25 | "Do you trust the above certificate? (Y/N)" { 26 | send_user "Y\n" 27 | send "Y\r" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /dotfiles/bin/vs12.exe: -------------------------------------------------------------------------------- 1 | rdpexec="`dirname $0`/rdpexec" 2 | $rdpexec '%programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' 3 | -------------------------------------------------------------------------------- /dotfiles/common: -------------------------------------------------------------------------------- 1 | # Disable annoying ctrl+s flow control. 2 | stty -ixon 3 | 4 | # Set the default editor. 5 | EDITOR=vim 6 | 7 | # Set the corporate proxy for certain machines. 8 | if [ `hostname` = "kresnik" ]; then 9 | for i in http https ftp rsync; do export ${i}_proxy='http://ongate.onsemi.com:80'; done 10 | fi 11 | 12 | # Add custom bin, including Windows RDP "executables", to the PATH 13 | PATH="$PATH:$HOME/.bin" 14 | 15 | # Disable the deprecated GREP_OPTIONS (now in my aliases) 16 | GREP_OPTIONS= 17 | 18 | # Use GnuPG as the ssh agent 19 | export SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh 20 | gpg-agent --daemon --enable-ssh-support >/dev/null 2>/dev/null 21 | -------------------------------------------------------------------------------- /dotfiles/gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | email = jonathan@glines.net 3 | name = Jonathan Glines 4 | 5 | [push] 6 | default = simple 7 | 8 | [merge] 9 | tool = vimdiff 10 | -------------------------------------------------------------------------------- /dotfiles/grconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "all": [ 4 | "/home/auntieneo/code/nixpkgs", 5 | "/home/auntieneo/code/nixrc" 6 | ], 7 | "nix": [ 8 | "/home/auntieneo/code/nixpkgs", 9 | "/home/auntieneo/code/nixrc" 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /dotfiles/irssi/config: -------------------------------------------------------------------------------- 1 | servers = ( 2 | { 3 | address = "irc.freenode.net"; 4 | chatnet = "freenode"; 5 | autoconnect = "Yes"; 6 | }, 7 | ); 8 | 9 | chatnets = { 10 | FreeNode = { 11 | type = "IRC"; 12 | autosendcmd = "MSG NickServ IDENTIFY 888yanksucks; /MODE nick -i"; 13 | }; 14 | }; 15 | 16 | channels = ( 17 | { name = "#peltkore"; chatnet = "freenode"; autojoin = "Yes"; }, 18 | ); 19 | settings = { 20 | core = { 21 | real_name = "Jonathan Glines"; 22 | user_name = "auntieNeo"; 23 | nick = "auntie"; 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /dotfiles/irssi/scripts/autorun/irssinotifier.pl: -------------------------------------------------------------------------------- 1 | ../irssinotifier.pl -------------------------------------------------------------------------------- /dotfiles/mailrc: -------------------------------------------------------------------------------- 1 | account gmail { 2 | set folder=imaps://auntieNeo@imap.gmail.com 3 | set password-auntieNeo@imap.gmail.com="PASSWORD" 4 | set imap-use-starttls 5 | set ssl-ca-dir=/home/auntieneo/.certs 6 | set record=+[Gmail]/Sent\ Mail 7 | set from="Jonathan Glines " 8 | set replyto="auntieNeo@gmail.com" 9 | set sender="auntieNeo@gmail.com" 10 | set smtp-use-starttls 11 | set smtp="smtp.gmail.com:587" 12 | set smtp-auth="login" 13 | set smtp-auth-user=auntieNeo@gmail.com 14 | set smtp-auth-password="PASSWORD" 15 | 16 | # IMAP SHORTCUTS SECTION for standard Gmail folders 17 | shortcut allmail +[Gmail]/All\ Mail 18 | shortcut in +INBOX 19 | shortcut spam +[Gmail]/Spam 20 | shortcut trash +[Gmail]/Bin 21 | shortcut sent +[Gmail]/Sent\ Mail 22 | } 23 | 24 | # Binary options 25 | set askattach 26 | set askcc 27 | set askbcc 28 | set autoinc 29 | set autothread 30 | set bsdannounce 31 | set bsdflags 32 | set bsdheadline 33 | set bsdmsgs 34 | set bsdorder 35 | set datefield 36 | set dot 37 | set editheaders 38 | set emptystart 39 | set fullnames 40 | set hold 41 | set keep 42 | set markanswered 43 | set print-alternatives 44 | set quiet 45 | set reply-in-same-charset 46 | set showlast 47 | set showname 48 | set showto 49 | set noautocollapse 50 | 51 | # String Options 52 | fwdretain subject date from to 53 | ignore received in-reply-to message-id references 54 | ignore mime-version content-transfer-encoding 55 | retain subject date from to cc x-mailer user-agent message-id list-Id 56 | set autosort=thread 57 | set contenttype-cntrl=text/plain 58 | set crt=20 59 | set encoding=quoted-printable 60 | set headline="%>%a%m %27f %24d %4l/%-5o %i%S" 61 | set imap-keepalive=240 62 | set imap-list-depth=5 63 | set indentprefix="> " 64 | set newmail=nopoll 65 | set PAGER="/usr/bin/env most -C -d +u" 66 | # set pipe-text/plain="/usr/bin/env par -B=ISO8859-15 -R0f0g1l0w70j0 | /usr/bin/env most -C -d +u" 67 | set pipe-text/plain="/usr/bin/env fold -s | /usr/bin/env most -C -d +u" 68 | set quote=headers 69 | set sendcharsets=iso-8859-1,iso-8859-15,utf-8 70 | set signature=/arpa/gm/h//happy/.signature 71 | 72 | # String Options 73 | fwdretain subject date from to 74 | ignore received in-reply-to message-id references 75 | ignore mime-version content-transfer-encoding 76 | retain subject date from to cc x-mailer user-agent message-id list-Id 77 | set autosort=thread 78 | set contenttype-cntrl=text/plain 79 | set crt=20 80 | set encoding=quoted-printable 81 | set headline="%>%a%m %27f %24d %4l/%-5o %i%S" 82 | set imap-keepalive=240 83 | set imap-list-depth=5 84 | set indentprefix="> " 85 | set newmail=nopoll 86 | set PAGER="/usr/bin/env most -C -d +u" 87 | # set pipe-text/plain="/usr/bin/env par -B=ISO8859-15 -R0f0g1l0w70j0 | /usr/bin/env most -C -d +u" 88 | set pipe-text/plain="/usr/bin/env fold -s | /usr/bin/env most -C -d +u" 89 | set quote=headers 90 | set sendcharsets=iso-8859-1,iso-8859-15,utf-8 91 | set signature=/arpa/gm/h//happy/.signature 92 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/config.nix: -------------------------------------------------------------------------------- 1 | rec { 2 | allowUnfree = true; 3 | 4 | home = builtins.getEnv "HOME"; 5 | # packageOverrides = import "${home}/.nixpkgs/environments/migrate.nix"; 6 | # packageOverrides = import "${home}/.nixpkgs/environments/opengl.nix"; 7 | # packageOverrides = import "${home}/.nixpkgs/environments/swc.nix"; 8 | # packageOverrides = import "${home}/.nixpkgs/environments/wld.nix"; 9 | # packageOverrides = import "${home}/.nixpkgs/environments/teensy.nix"; 10 | # packageOverrides = import "${home}/.nixpkgs/environments/tots.nix"; 11 | # packageOverrides = import "${home}/.nixpkgs/environments/xmonad.nix"; 12 | # packageOverrides = import "${home}/.nixpkgs/livemedia/installer.nix"; 13 | 14 | packageOverrides = pkgs: { 15 | # Environment for Java development 16 | env-java = pkgs.myEnvFun { 17 | name = "java"; 18 | buildInputs = with pkgs; [ 19 | antlr3 20 | gnumake 21 | gradle 22 | maven 23 | netbeans 24 | openjdk 25 | # openjdk8 26 | ]; 27 | }; 28 | 29 | # Environment for making Jekyll websites 30 | env-jekyll = pkgs.myEnvFun { 31 | name = "jekyll"; 32 | buildInputs = with pkgs; let ruby = ruby_2_1; in [ 33 | rubyLibs.jekyll # FIXME: figure out how to get this to use ruby_2_1 34 | ]; 35 | }; 36 | 37 | # Environment for developing programs that use ncurses. 38 | env-ncurses = pkgs.myEnvFun { 39 | name = "ncurses"; 40 | buildInputs = with pkgs; [ 41 | ncurses 42 | ]; 43 | }; 44 | 45 | # Environment for python development. 46 | env-python = pkgs.myEnvFun { 47 | name = "python"; 48 | buildInputs = with pkgs; [ 49 | pypyPackages.pyyaml 50 | ]; 51 | }; 52 | 53 | # Environment for developing swc-based window managers. 54 | # See htpps://github.com/michaelforney/swc 55 | env-swc = pkgs.myEnvFun { 56 | name = "swc"; 57 | buildInputs = with pkgs; [ 58 | fontconfig 59 | libdrm 60 | libevdev 61 | libwld 62 | # libxcb 63 | libxkbcommon 64 | pixman 65 | pkgconfig 66 | udev 67 | wayland 68 | # xcbutilwm 69 | ]; 70 | }; 71 | 72 | # Environment for programming USB Teensy development boards. 73 | env-teensy = pkgs.myEnvFun { 74 | name = "teensy"; 75 | buildInputs = with pkgs; [ 76 | arduino_core 77 | avrgcclibc 78 | teensy-loader 79 | ]; 80 | }; 81 | 82 | # Environment for developing PIAB-live 83 | env-piab = pkgs.myEnvFun { 84 | name = "piab"; 85 | buildInputs = with pkgs; [ 86 | gnumake 87 | autotools 88 | ]; 89 | }; 90 | 91 | # Environment I am using for developing a game engine. 92 | env-tots = pkgs.myEnvFun { 93 | name = "tots"; 94 | buildInputs = with pkgs; [ 95 | allegro5 96 | boost 97 | cmake 98 | gdb 99 | glew 100 | gmock 101 | graphviz 102 | gtest 103 | lua5_2 104 | mesa 105 | pkgconfig 106 | SDL2 107 | stdenv 108 | xorg_sys_opengl 109 | ]; 110 | }; 111 | 112 | env-berb = pkgs.myEnvFun { 113 | name = "berb"; 114 | buildInputs = with pkgs; [ 115 | cmake 116 | gdb 117 | glew 118 | mesa 119 | pkgconfig 120 | SDL2 121 | stdenv 122 | xorg_sys_opengl 123 | ]; 124 | }; 125 | }; 126 | } 127 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/deploy.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | deploy = pkgs.myEnvFun { 5 | name = "deploy"; 6 | buildInputs = with pkgs; [ 7 | bash 8 | findutils 9 | stdenv 10 | which 11 | ansible 12 | ]; 13 | }; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/migrate.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | let 5 | stdenv = pkgs.stdenv; 6 | in rec { 7 | migrate = pkgs.myEnvFun { 8 | name = "migrate"; 9 | buildInputs = with pkgs; [ 10 | bash 11 | findutils 12 | python3 13 | python3Packages.pexpect 14 | python3Packages.zc_buildout_nix 15 | stdenv 16 | which 17 | ]; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/opengl.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | opengl = pkgs.myEnvFun { 5 | name = "opengl"; 6 | buildInputs = with pkgs; [ 7 | cmake 8 | mesa 9 | pkgconfig 10 | SDL2 11 | ]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/swc.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | swc = pkgs.myEnvFun { 5 | name = "swc"; 6 | buildInputs = with pkgs; [ 7 | fontconfig 8 | libdrm 9 | libevdev 10 | libwld 11 | # libxcb 12 | libxkbcommon 13 | pixman 14 | pkgconfig 15 | udev 16 | wayland 17 | # xcbutilwm 18 | ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/teensy.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | teensy = pkgs.myEnvFun { 5 | name = "teensy"; 6 | buildInputs = with pkgs; [ 7 | arduino_core 8 | avrgcclibc 9 | teensy-loader 10 | ]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/tots.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | tots = pkgs.myEnvFun { 5 | name = "tots"; 6 | buildInputs = with pkgs; [ 7 | allegro5 8 | boost 9 | cmake 10 | gdb 11 | glew 12 | gmock 13 | graphviz 14 | gtest 15 | lua5_2 16 | mesa 17 | pkgconfig 18 | SDL2 19 | xorg_sys_opengl 20 | ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/wld.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | wld = pkgs.myEnvFun { 5 | name = "wld"; 6 | buildInputs = with pkgs; [ 7 | libdrm 8 | fontconfig 9 | pixman 10 | pkgconfig 11 | wayland 12 | ]; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /dotfiles/nixpkgs/environments/xmonad.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | { 4 | xmonadEnv = pkgs.haskellPackages_ghc782.ghcWithPackages (p: with p; [ 5 | xmonad xmonadContrib xmonadExtras xmobar 6 | ]); 7 | } 8 | -------------------------------------------------------------------------------- /dotfiles/pwclientrc: -------------------------------------------------------------------------------- 1 | [options] 2 | default = mesa 3 | 4 | [mesa] 5 | url = https://patchwork.freedesktop.org/xmlrpc/ 6 | -------------------------------------------------------------------------------- /dotfiles/ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN7FVz9xuGlRhzpXh7qdtbLDVO2bCkzztmTyG/GO35dao0YOgksy9aPJ+D/v33oru2SZ8lPn/H0PtaXqwAplrJaSk0NguAhNb3J8T5tjCHUWiFlN3HHvPehgL6YkQLQnA2RPzYQcjtJlj0CjhEaKXrswvF7n6A4DSWVfzmiuWSWDfV+ranJyqJoE/EfhlSn8XOxa/B64tHsVjrCBBXlO2++fRg7vSleiNoCdCWoeTN4AwMhwlFVSpV8dhfjEnq5p99GJgXKcGd2qcD+N3b9PFwjezxBy1pTLWhHZiVBUs/2aR1cnj1Myne75i9EblaHGMGWnZTobWepSpGzzzQsZX3 auntieneo@hazuki 2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxCSKq/XqG0K4Lr05cBXCyVuLgVabDhd5ND4IFojwSoyJPhjkrGcXB4El0D+dQLBHsZz4n6P5bCtW19eRBGO5n5BydrIhddsU+v+BC3RRoxz1uSuTefZN2MlPcjk6vvWy/Bbov67b4iHxVkJlUifjSKMReV2xbwlY5Ramdpc4OrQb0zfxacAW4XdKY1jzY6sY+RtxQC2LN/3SgerPsNMyixyw4N8Q3G+sKz50v42QCIdRqrhnEWdDxT4c79RYtMSa0Ath4nXZxgWQhYnRdyyxgS9LgGpvP+oVtbh7+vcMEgS1fZdZFMFrBY/LI5B5mnKOr2zo30/TiS0RaOVYtfZql auntieneo@hakase 3 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCk24v8kNWBq0LrhCkob1+pOhOwNopN4Ec4cJO+p9VVfSbaxfNHdSY+KsmxkMGd/kmYFJmtCwJeeCGCqlqI4hTbZKD3sgc3IVRs2WO8Pk6Y4/9DPJfMViN1rYXuQlcnFnaOLPULFaXg36Xz9ReHNANNB0W+P7FoKswyxbyeKQAxqw3+Z0aEuMVLNu78yrMDy2N9XJhVd9sO2AQ7MbVT4chpTadLmhMR97WdKZt23xdC9y8taJjSL7YduvlH/gXDz40Ub9jKacdamrIHmmjXp9gMhqY7KdIqfFav8niwnu/+DUGcwpthWPEh4pOsUWZNLLTNR+HPO56zmOFNE+fMwBIsKEd3pWxCi4BRLSdVN2KYubWe6PVaJ9sSjRrojx5vOkh1S0mPuoQP2spnGg22kBmGPMUNW6ephhbGt32mMgxxlTFDnZEI/FoWfF2vSWyYNJzCFpHc/0Tsz0aaMf7eKsmYf6f1LpWyfyfc08wR8rppTFJ3b5hp5UbqtcIy9GaNzr/f4Chlt0mpWE6gNrqiS1cO9xKUqFstjb6+P0fN+IXkK2zQ8Tk2TOFhIVA/DatgWn4PMRLpl4ZqF5zW4yuErYVEY+QM5ifWfrSPhwxSVKdWHWHUkPrLY4P9tW9rsiVtsNSuSHHXI0oEVPRpq5kHAzll/zrUJFFBTbwRf9+U6DlaSQ== auntieneo@fluttershy 4 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDYmiCMocpJaMO6opID0JM9L76esUG23eGcX3WtgIfhypAW4pTgVr+pZUFvqurltjilFWbRhPCtd8UsrBlGdORAjC6KGrlZuwBJZMat2AoNSU4QoUhZE5VYZ8cIWD5aB6dV8oGOEupW4JmOFZVY0HtxpUJulGaydlMtwjqE1TvrJ+HjOE08BpbJkCCazCbk6o5ovE88+KSJZfXBqNFu8i1/KQ8lZkgIEuq4RrQfYf6JVk+o2yjq5roH3nyYfSPFpaUoEDBp4SdQJlp+N+JS8jslF+/cEfDqKe9yPL3Mty6pC7ZGS5NO0Ze9tNBcQdbH4QQe33jdeehbsaFXRcVys673Ozj5hmf0RpM2EwVkYZ9W43T23Y52mwdf2lPTH/60pRkgYUWETlB5UNxGuAQtCp6kkrOhwsPRRdbYK1AvqjOwFHyXGoX3lfU1SCGe8xNUumTqq10mtrH/3At6ojHIQFYVy0LXdGck+HIW/Z2ZzQovFTOZsMe+KtuZsqdVT/pcTmx2cbEa0Oe/5S2bvIQFyW/vgjWzKDAc3W9A35SnDSjKzUmVE6o3HTlSkWe24mDzU6mA8zzoIPL1JdNgsRQ4Uc0OEm+u/d2fC0sT6Dn0S0LndWMZ/biEgy2uyGvoc6kUyliXGHv4+S/XuJEvvnmZt7D9DJzZK3xFx6Z3jyR9BFsQLw== auntieneo@miku 5 | -------------------------------------------------------------------------------- /dotfiles/ssh/config: -------------------------------------------------------------------------------- 1 | Host dhaos 2 | Hostname auntieneo.net 3 | User auntieneo 4 | 5 | Host hazuki 6 | ProxyCommand ssh dhaos -W localhost:2200 7 | User auntieneo 8 | 9 | Host miku 10 | ProxyCommand ssh dhaos -W localhost:2211 11 | User auntieneo 12 | 13 | Host hakase 14 | ProxyCommand ssh dhaos -W localhost:2244 15 | User auntieneo 16 | -------------------------------------------------------------------------------- /dotfiles/tmux.conf: -------------------------------------------------------------------------------- 1 | bind-key -r t select-pane -t :.+ 2 | bind-key -r n select-pane -t :.- 3 | bind-key -r s next-window 4 | bind-key -r h previous-window 5 | bind-key S choose-session 6 | set-option -g message-attr reverse 7 | set-option -g message-bg default 8 | set-option -g message-fg default 9 | set-option -g pane-active-border-bg default 10 | set-option -g pane-active-border-fg black 11 | set-option -g pane-border-fg white 12 | set-option -g status-bg white 13 | setw -g aggressive-resize on 14 | set-option -g allow-rename off 15 | set-window-option -g automatic-rename off 16 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/asterisk.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/asterisk.yml 2 | 3 | name: asterisk 4 | root: ~/code/asterisk 5 | 6 | windows: 7 | - debugging: 8 | layout: main-horizontal 9 | panes: 10 | - sudo journalctl -f -u asterisk 11 | - sudo gdb 12 | - sipp -h 13 | - asterisk: 14 | layout: main-horizontal 15 | panes: 16 | - cd asterisk-gerrit; vim -S Session.vim 17 | - cd asterisk-gerrit; nix-shell '' -A asterisk 18 | - testsuite: 19 | layout: main-horizontal 20 | panes: 21 | - cd testsuite; vim -S Session.vim 22 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/clusters.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/clusters.yml 2 | 3 | name: clusters 4 | root: ~/work/cose/code/cluster_scripts 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | windows: 22 | - leela: 23 | layout: main-horizontal 24 | panes: 25 | - cd playbooks/leela; vim -S Session.vim 26 | - cd playbooks/leela; ansible-playbook -i inventory playbook.yml 27 | - cd playbooks/leela; ssh -t leela 'tmux attach || bash' 28 | - luna: 29 | layout: main-horizontal 30 | panes: 31 | - ssh -t luna 'tmux attach || bash' 32 | - minerve: 33 | layout: main-horizontal 34 | panes: 35 | - ssh -t minerve 'tmux attach || bash' 36 | - minerve2: 37 | layout: main-horizontal 38 | panes: 39 | - cd playbooks/minerve; vim -S Session.vim 40 | - cd playbooks/minerve; ansible-playbook -i inventory playbook.yml 41 | - cd playbooks/minerve; ssh -t minerve2 'tmux attach || bash' 42 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/cose.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/cose.yml 2 | 3 | name: CoSE 4 | root: ~/work/cose 5 | 6 | windows: 7 | - shell: 8 | layout: main-horizontal 9 | panes: 10 | - cd 11 | - Math108: 12 | layout: main-horizontal 13 | panes: 14 | - echo "TODO" 15 | - CreamSoda: 16 | layout: main-horizontal 17 | panes: 18 | - cd code/CreamSoda; vim -S Session.vim 19 | - cd code/CreamSoda; nix-env -i env-java && load-env-java 20 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/dev.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/dev.yml 2 | 3 | name: dev 4 | root: ~/code 5 | 6 | windows: 7 | - sandbox: 8 | layout: main-horizontal 9 | panes: 10 | - cd sandbox; echo "TODO" 11 | - posh: 12 | layout: main-horizontal 13 | panes: 14 | - cd polish-shell; vim -S Session.vim 15 | - cd polish-shell; nix-shell -E '(import {}).callPackage /home/auntieneo/code/nixrc/pkgs/polish-shell/default.nix {}' 16 | - cd polish-shell; git status 17 | - rtrace: 18 | layout: main-horizontal 19 | panes: 20 | - cd rtrace; echo "TODO" 21 | - tripripper: 22 | layout: main-horizontal 23 | panes: 24 | - cd tripripper; echo "TODO" 25 | - tots: 26 | layout: main-horizontal 27 | panes: 28 | - cd tots; echo "TODO" 29 | - blender: 30 | layout: main-horizontal 31 | panes: 32 | - cd blender; echo "TODO" 33 | - cd blender; nix-shell '' -A blender 34 | - asterisk: 35 | layout: main-horizontal 36 | panes: 37 | - cd asterisk; echo "TODO" 38 | - cd asterisk; nix-shell '' -A asterisk 39 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/finance.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/irc.yml 2 | 3 | name: finance 4 | root: ~/finance 5 | 6 | windows: 7 | - ledger: 8 | layout: main-horizontal 9 | panes: 10 | - vim ./ledger.dat 11 | - watch -n60 ledger -f ./ledger.dat balance 12 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/irc.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/irc.yml 2 | 3 | name: IRC 4 | root: ~ 5 | 6 | windows: 7 | - irssi: 8 | layout: main-horizontal 9 | panes: 10 | - irssi 11 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/main.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/main.yml 2 | 3 | name: main 4 | root: ~ 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | windows: 22 | - shell: 23 | layout: main-horizontal 24 | panes: 25 | - cd 26 | - nixrc: 27 | layout: main-horizontal 28 | panes: 29 | - cd ~/code/nixrc; vim -S Session.vim 30 | - cd ~/code/nixrc 31 | - nixpkgs: 32 | layout: main-horizontal 33 | panes: 34 | - cd ~/code/nixpkgs; vim -S Session.vim 35 | - cd ~/code/nixpkgs 36 | - NixOps: 37 | layout: main-horizontal 38 | panes: 39 | - cd ~/code/nixrc 40 | - unison: 41 | layout: main-horizontal 42 | panes: 43 | - cd 44 | # - media: 45 | # layout: main-horizontal 46 | # panes: 47 | # - cmus 48 | # - alsamixer 49 | # - clear 50 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/mesa.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: mesa 4 | root: ~/code/mesa 5 | 6 | windows: 7 | - mesa: 8 | layout: main-horizontal 9 | panes: 10 | - vim -S Session.vim 11 | - mesa-patches: 12 | layout: maim-horizontal 13 | panes: 14 | - git for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short) %(authorname)' refs/remotes/ | less 15 | - pwclient list -p mesa -m 1000 | less 16 | - piglit: 17 | layout: main-horizontal 18 | panes: 19 | - cd ../piglit; vim -S Session.vim 20 | - cd ../piglit 21 | - piglit-patches: 22 | layout: main-horizontal 23 | panes: 24 | - cd ../piglit; git for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short) %(authorname)' refs/remotes/ | less 25 | - cd ../piglit; pwclient list -p piglit -m 1000 | less 26 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/school.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/school.yml 2 | 3 | name: school 4 | root: ~/school/spring2016 5 | 6 | windows: 7 | - linear: 8 | layout: main-horizontal 9 | panes: 10 | - cd 'linearAlgebra' 11 | - opSystems: 12 | layout: main-horizontal 13 | panes: 14 | - cd 'operatingSystems' 15 | - DSP: 16 | layout: main-horizontal 17 | panes: 18 | - cd 'digitalSignalProcessing' 19 | - techWriting: 20 | layout: main-horizontal 21 | panes: 22 | - cd 'technicalWriting' 23 | - probability: 24 | layout: main-horizontal 25 | panes: 26 | - cd 'probability' 27 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/website.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: website 4 | root: ~/code/website 5 | 6 | windows: 7 | - website: 8 | layout: main-horizontal 9 | panes: 10 | - ls 11 | -------------------------------------------------------------------------------- /dotfiles/tmuxinator/work.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/school.yml 2 | 3 | name: work 4 | root: ~/code 5 | 6 | windows: 7 | - berb: 8 | layout: main-horizontal 9 | panes: 10 | - cd 'berb' 11 | - cd 'berb' && nix-shell -E '(import {}).callPackage ./default.nix {}' 12 | -------------------------------------------------------------------------------- /dotfiles/unison/common.prf: -------------------------------------------------------------------------------- 1 | ignore = Name .*.swp 2 | ignore = Name .*.swo 3 | ignore = Name *.o 4 | ignore = Name *~ 5 | -------------------------------------------------------------------------------- /dotfiles/unison/default.prf: -------------------------------------------------------------------------------- 1 | include common 2 | 3 | root = /home/auntieneo 4 | root = ssh://dhaos//home/auntieneo 5 | servercmd = /run/current-system/sw/bin/unison 6 | 7 | path = code 8 | ignore = Path code/asterisk/sandbox 9 | path = work 10 | ignore = Path work/cose/code/cluster_scripts/playbooks/minerve/site 11 | ignore = Path work/cose/code/cluster_scripts/playbooks/skynet/site 12 | path = images 13 | path = finance 14 | path = school 15 | -------------------------------------------------------------------------------- /dotfiles/velox.conf: -------------------------------------------------------------------------------- 1 | # velox.conf 2 | 3 | # property value 4 | set mod logo 5 | set window.border_color_active 0xff338833 6 | set window.border_color_inactive 0xff888888 7 | set window.border_width 2 8 | 9 | set tag.1.name 1 10 | set tag.2.name 2 11 | set tag.3.name 3 12 | set tag.4.name 4 13 | set tag.5.name 5 14 | set tag.6.name 6 15 | set tag.7.name 7 16 | set tag.8.name 8 17 | set tag.9.name 9 18 | 19 | # name type arguments 20 | action spawn_terminal spawn st-wl 21 | action spawn_run spawn dmenu_run-wl -b -fn Terminus:pixelsize=14 -nb "#1a1a1a" -nf "#999999" -sb "#338833" -sf "#ffffff" 22 | 23 | # key modifiers action 24 | key t mod focus_next 25 | key n mod focus_prev 26 | key d mod zoom 27 | key k mod close_focused_window 28 | key space mod layout_next 29 | key 0 mod previous_tags 30 | key q mod,shift quit 31 | 32 | key h mod tall.decrease_master_size 33 | key s mod tall.increase_master_size 34 | key e mod tall.increase_num_masters 35 | key u mod tall.decrease_num_masters 36 | key e mod,shift tall.increase_num_columns 37 | key u mod,shift tall.decrease_num_columns 38 | 39 | key Return mod spawn_terminal 40 | key r mod spawn_run 41 | 42 | key 1 mod tag.1.activate 43 | key 2 mod tag.2.activate 44 | key 3 mod tag.3.activate 45 | key 4 mod tag.4.activate 46 | key 5 mod tag.5.activate 47 | key 6 mod tag.6.activate 48 | key 7 mod tag.7.activate 49 | key 8 mod tag.8.activate 50 | key 9 mod tag.9.activate 51 | 52 | key 1 mod,ctrl tag.1.toggle 53 | key 2 mod,ctrl tag.2.toggle 54 | key 3 mod,ctrl tag.3.toggle 55 | key 4 mod,ctrl tag.4.toggle 56 | key 5 mod,ctrl tag.5.toggle 57 | key 6 mod,ctrl tag.6.toggle 58 | key 7 mod,ctrl tag.7.toggle 59 | key 8 mod,ctrl tag.8.toggle 60 | key 9 mod,ctrl tag.9.toggle 61 | 62 | key 1 mod,shift tag.1.apply 63 | key 2 mod,shift tag.2.apply 64 | key 3 mod,shift tag.3.apply 65 | key 4 mod,shift tag.4.apply 66 | key 5 mod,shift tag.5.apply 67 | key 6 mod,shift tag.6.apply 68 | key 7 mod,shift tag.7.apply 69 | key 8 mod,shift tag.8.apply 70 | key 9 mod,shift tag.9.apply 71 | 72 | button left mod window.begin_move:window.end_move 73 | button right mod window.begin_resize:window.end_resize 74 | -------------------------------------------------------------------------------- /dotfiles/vimlatex: -------------------------------------------------------------------------------- 1 | :nmap :w:!pdflatex -shell-escape -synctex=1 -interaction=nonstopmode % 2 | :imap :w:!pdflatex -shell-escape -synctex=1 -interaction=nonstopmode % 3 | :nmap :w:!xelatex -shell-escape -synctex=1 -interaction=nonstopmode % 4 | :imap :w:!xelatex -shell-escape -synctex=1 -interaction=nonstopmode % 5 | 6 | " This sequence works best for GraphViz graphs 7 | " :nmap :w:!latex -shell-escape -interaction=nonstopmode %; latex -shell-escape -interaction=nonstopmode %:!dvips $(basename % .tex).dvi:!ps2pdf $(basename % .tex).ps 8 | " :imap :w:!latex -shell-escape -interaction=nonstopmode %; latex -shell-escape -interaction=nonstopmode %:!dvips $(basename % .tex).dvi:!ps2pdf $(basename % .tex).ps 9 | 10 | " This sequence works for GraphViz graphs and bibtex 11 | :nmap :w:!latex -shell-escape -interaction=nonstopmode %; bibtex $(basename % '.tex').aux; latex -shell-escape -interaction=nonstopmode %; latex -shell-escape -interaction=nonstopmode %:!dvips $(basename % .tex).dvi:!ps2pdf $(basename % .tex).ps 12 | :imap :w:!latex -shell-escape -interaction=nonstopmode %; bibtex $(basename % '.tex).aux; latex -shell-escape -interaction=nonstopmode %; latex -shell-escape -interaction=nonstopmode %:!dvips $(basename % .tex).dvi:!ps2pdf $(basename % .tex).ps 13 | 14 | :nmap :w:!evince %<.pdf & 15 | set nocindent 16 | -------------------------------------------------------------------------------- /dotfiles/vimnotepad: -------------------------------------------------------------------------------- 1 | noremap t gj 2 | noremap n gk 3 | set lbr 4 | -------------------------------------------------------------------------------- /dotfiles/vimpython: -------------------------------------------------------------------------------- 1 | set tabstop=4 2 | set shiftwidth=4 3 | set expandtab 4 | -------------------------------------------------------------------------------- /dotfiles/vimrc: -------------------------------------------------------------------------------- 1 | " change movement keys to dvorak 2 | noremap t j 3 | noremap n k 4 | noremap s l 5 | " and remap the keys that were displaced 6 | noremap j t 7 | noremap k n 8 | noremap l s 9 | 10 | " remap screen line based movement keys to dvorak 11 | noremap gt gj 12 | noremap gn gk 13 | 14 | " remap window movement keys to dvorak 15 | " displaces the back 'till command, which I don't know what it does 16 | noremap T 17 | " displaces the prev(find) command, which is important 18 | noremap N 19 | " displaces the screen-top command, which is worthless 20 | noremap H 21 | " displaces the subst line command, which is important 22 | noremap S 23 | " remap keys that were displaced 24 | " displaces the help command, which is worthless 25 | noremap K N 26 | " displaces the screen bottom command, which is worthless 27 | noremap L S 28 | 29 | " map some tab navigation keys 30 | nmap :tabprevious 31 | nmap :tabnext 32 | 33 | " map the tag navigation key () is difficult to reach 34 | nnoremap 35 | " command for updating ctags with Nix include directories 36 | command Ctags !ctags -R ../src $(echo $NIX_CFLAGS_COMPILE | grep -o '\S*include\S*') 37 | 38 | " map as a quick build key 39 | nmap :make!:cw 40 | set autowrite 41 | 42 | " Vim is a piece of shit when it comes to failing gracefully, so disable these for now. 43 | "" YCM key bindings (tab binding is added later with hacks below) 44 | "let g:ycm_key_list_select_completion = ['', ''] 45 | "let g:ycm_key_list_previous_completion = ['', ''] 46 | " 47 | "" UltiSnips key bindings 48 | "" FIXME: none of my terminals support shift+tab or ctrl+tab 49 | "" FIXME: JumpBackward isn't working at all 50 | "let g:UltiSnipsExpandTrigger = "" 51 | "let g:UltiSnipsJumpForwardTrigger = "" 52 | "let g:UltiSnipsJumpBackwardTrigger = "" 53 | "let g:UltiSnipsListSnippets = "" 54 | " 55 | "" Some hacks to make UltiSnips play with YCM 56 | "" from 57 | "function! g:UltiSnips_Complete() 58 | " call UltiSnips#ExpandSnippetOrJump() 59 | " if g:ulti_expand_or_jump_res == 0 60 | " if pumvisible() 61 | " return "\" 62 | " else 63 | " return "\" 64 | " endif 65 | " endif 66 | " return "" 67 | "endfunction 68 | "au BufEnter * exec "inoremap " . g:UltiSnipsJumpForwardTrigger . " =g:UltiSnips_Complete()" 69 | 70 | set tabstop=2 71 | set expandtab 72 | set shiftwidth=2 73 | set smarttab 74 | set cindent 75 | set formatoptions=rolq 76 | 77 | set backspace=2 78 | 79 | set laststatus=2 80 | 81 | com -range=% Csort ,sort i r /\<\w*(.\{-})/ " sort C function prototypes 82 | 83 | "setlocal spell spelllang=en_us " turn on spell checking 84 | 85 | " Make file tab completion behave more like bash 86 | set wildmode=list:longest 87 | 88 | " line number information displayed in the status bar 89 | set ruler 90 | 91 | syntax on 92 | colorscheme desert 93 | -------------------------------------------------------------------------------- /dotfiles/vimtabs: -------------------------------------------------------------------------------- 1 | set tabstop=8 2 | set sw=8 3 | set noexpandtab 4 | -------------------------------------------------------------------------------- /dotfiles/zshrc: -------------------------------------------------------------------------------- 1 | # Path to your oh-my-zsh installation. 2 | export ZSH=$HOME/.oh-my-zsh 3 | 4 | # Set name of the theme to load. 5 | # Look in ~/.oh-my-zsh/themes/ 6 | # Optionally, if you set this to "random", it'll load a random theme each 7 | # time that oh-my-zsh is loaded. 8 | ZSH_THEME="auntie" 9 | 10 | # Example aliases 11 | # alias zshconfig="mate ~/.zshrc" 12 | # alias ohmyzsh="mate ~/.oh-my-zsh" 13 | 14 | # Uncomment the following line to use case-sensitive completion. 15 | # CASE_SENSITIVE="true" 16 | 17 | # Uncomment the following line to disable bi-weekly auto-update checks. 18 | DISABLE_AUTO_UPDATE="true" 19 | 20 | # Uncomment the following line to change how often to auto-update (in days). 21 | # export UPDATE_ZSH_DAYS=13 22 | 23 | # Uncomment the following line to disable colors in ls. 24 | # DISABLE_LS_COLORS="true" 25 | 26 | # Uncomment the following line to disable auto-setting terminal title. 27 | DISABLE_AUTO_TITLE="true" 28 | 29 | # Uncomment the following line to disable command auto-correction. 30 | # DISABLE_CORRECTION="true" 31 | 32 | # Uncomment the following line to display red dots whilst waiting for completion. 33 | # COMPLETION_WAITING_DOTS="true" 34 | 35 | # Uncomment the following line if you want to disable marking untracked files 36 | # under VCS as dirty. This makes repository status check for large repositories 37 | # much, much faster. 38 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 39 | 40 | # Uncomment the following line if you want to change the command execution time 41 | # stamp shown in the history command output. 42 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 43 | # HIST_STAMPS="mm/dd/yyyy" 44 | 45 | # Would you like to use another custom folder than $ZSH/custom? 46 | # ZSH_CUSTOM=/path/to/new-custom-folder 47 | 48 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 49 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 50 | # Example format: plugins=(rails git textmate ruby lighthouse) 51 | plugins=(git) 52 | 53 | source $ZSH/oh-my-zsh.sh 54 | 55 | # User configuration 56 | 57 | export PATH=$HOME/bin:/usr/local/bin:$PATH 58 | # export MANPATH="/usr/local/man:$MANPATH" 59 | 60 | # You may need to manually set your language environment 61 | # export LANG=en_US.UTF-8 62 | 63 | # Preferred editor for local and remote sessions 64 | # if [[ -n $SSH_CONNECTION ]]; then 65 | # export EDITOR='vim' 66 | # else 67 | # export EDITOR='mvim' 68 | # fi 69 | 70 | # Compilation flags 71 | # export ARCHFLAGS="-arch x86_64" 72 | 73 | # ssh 74 | # export SSH_KEY_PATH="~/.ssh/dsa_id" 75 | 76 | setopt autolist 77 | unsetopt menucomplete 78 | 79 | source $HOME/.aliases 80 | source $HOME/.common 81 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/run/current-system/sw/bin/bash 2 | 3 | # 4 | # This script automates configuration and installation of NixOS. It is intended 5 | # to be run from the within the NixOS live boot medium. Filesystems creation 6 | # and network configuration must be done beforehand, followed by running 7 | # 'nixos-generate-config --root /mnt' (see the NixOS manual). 8 | # 9 | 10 | HOSTNAME_FILE="/mnt/etc/nixos/hostname" 11 | NIXRC="/mnt/nixrc" 12 | NIXOS_CONFIG="/mnt/etc/nixos" 13 | UUID_FILE="/sys/class/dmi/id/product_uuid" 14 | 15 | # Check for files created by nixos-generate-config first. 16 | if [ ! -d $NIXOS_CONFIG ]; then 17 | echo "Error: Could not find /mnt/etc/nixos." 18 | echo "Run 'nixos-generate-config --root /mnt' and review output first." 19 | exit 1 20 | fi 21 | 22 | # Clone the git repository containing the NixOS configuration. 23 | if [ ! -d $NIXRC ]; then 24 | nix-env --install git 25 | cd /mnt/ 26 | git clone "https://github.com/auntieNeo/nixrc" 27 | fi 28 | 29 | # Determine the hostname from either UUID or MAC address. 30 | if grep --quiet "01572D33-7B50-CB11-A0BB-8DFA84B41F9C" $UUID_FILE; then 31 | echo -n "hakase" > $HOSTNAME_FILE 32 | elif grep --quiet "00:25:22:cb:23:c1" "/sys/class/net/enp3s0/address"; then 33 | echo -n "hazuki" > $HOSTNAME_FILE 34 | elif grep --quiet "44454C4C-4E00-1057-8046-C3C04F484E31" $UUID_FILE; then 35 | echo -n "kresnik" > $HOSTNAME_FILE 36 | elif grep --quiet "50:e5:49:cb:df:23" "/sys/class/net/enp8s0/address"; then 37 | echo -n "lain" > $HOSTNAME_FILE 38 | elif grep --quiet "4C4C4544-0044-3010-8038-C4C04F513332" $UUID_FILE; then 39 | echo -n "heldarf" > $HOSTNAME_FILE 40 | else 41 | echo -n "nixos" > $HOSTNAME_FILE 42 | fi 43 | 44 | # Rsync files from the git repository to their final destination. 45 | rsync --filter="protect /hardware-configuration.nix" \ 46 | --filter="protect /hostname" \ 47 | --filter="protect /private" \ 48 | --filter="exclude,s *.gitignore" \ 49 | --filter="exclude,s *.gitmodules" \ 50 | --filter="exclude,s *.git" \ 51 | --filter="exclude .*.swp" \ 52 | --filter="exclude Session.vim" \ 53 | --delete --recursive --perms \ 54 | $NIXRC/ $NIXOS_CONFIG/ 55 | nixos-install && rm -rf /mnt/nixrc && reboot 56 | -------------------------------------------------------------------------------- /libvirt_qemu.conf: -------------------------------------------------------------------------------- 1 | cgroup_device_acl = [ 2 | "/dev/vfio/1", 3 | "/dev/vfio/12", 4 | "/dev/vfio/vfio", 5 | "/dev/kvm" 6 | ] 7 | nvram = [ 8 | "/home/auntieneo/sandbox/ovmf/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/home/auntieneo/sandbox/ovmf/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd", 9 | ] 10 | -------------------------------------------------------------------------------- /machines/asbel.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/android.nix 7 | ../profiles/audio.nix 8 | ../profiles/desktop.nix 9 | ../profiles/development.nix 10 | ../profiles/graphics.nix 11 | ../profiles/laptop.nix 12 | # ../profiles/mathematics.nix 13 | ../profiles/printing.nix 14 | # ../profiles/redshift.nix 15 | ../profiles/school.nix 16 | ../profiles/server.nix 17 | # ../profiles/telephony.nix 18 | ../profiles/virtualization.nix 19 | ../profiles/games.nix 20 | ../profiles/drawing.nix 21 | 22 | # Experimental: 23 | # ../profiles/mesa.nix 24 | # ../profiles/wayland.nix 25 | ../profiles/virtualreality.nix 26 | ../profiles/steam.nix 27 | ../profiles/arduino.nix 28 | ]; 29 | 30 | # Use the efi boot loader. 31 | boot.loader.systemd-boot.enable = true; 32 | boot.loader.efi.canTouchEfiVariables = true; 33 | 34 | # Enable the PCSC-Lite smart card reader daemon 35 | services.pcscd.enable = true; 36 | 37 | # Specify port to bind to for SSH reverse tunneling 38 | services.ssh-phone-home = { 39 | enable = false; 40 | bindPort = 2244; 41 | }; 42 | 43 | # networking.firewall.enable = false; 44 | networking.firewall.allowPing = true; 45 | 46 | # Enable fingerprint reader auth 47 | services.fprintd.enable = true; 48 | security.pam.services.auntieneo.fprintAuth = true; 49 | 50 | # Use GPG for SSH auth, etc. 51 | programs.ssh.startAgent = false; 52 | 53 | # # Share ethernet connection 54 | # networking.nat = { 55 | # enable = true; 56 | # externalInterface = "wlp4s0"; 57 | # internalIPs = [ "192.168.1.0/24" ]; 58 | # internalInterfaces = [ "enp1s0" ]; 59 | # }; 60 | # networking.interfaces.enp1s0 = { 61 | # ipAddress = "192.168.0.1"; 62 | # prefixLength = 24; 63 | # }; 64 | } 65 | -------------------------------------------------------------------------------- /machines/dhaos.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/server.nix 7 | ]; 8 | 9 | # Auxiliary SSH ports 10 | networking.firewall.allowedTCPPortRanges = [ { from = 2200; to = 2222; } ]; 11 | # Mosh shell ports 12 | networking.firewall.allowedUDPPortRanges = [ { from = 60000; to = 60999; } ]; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /machines/hakase.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/android.nix 7 | ../profiles/audio.nix 8 | ../profiles/desktop.nix 9 | ../profiles/development.nix 10 | ../profiles/graphics.nix 11 | ../profiles/laptop.nix 12 | # ../profiles/mathematics.nix 13 | ../profiles/printing.nix 14 | # ../profiles/redshift.nix 15 | # ../profiles/school.nix 16 | ../profiles/server.nix 17 | # ../profiles/telephony.nix 18 | # ../profiles/virtualization.nix 19 | # ../profiles/games.nix 20 | 21 | # Experimental: 22 | # ../profiles/mesa.nix 23 | ../profiles/wayland.nix 24 | ../profiles/virtualreality.nix 25 | ]; 26 | 27 | # Use the efi boot loader. 28 | boot.loader.systemd-boot.enable = true; 29 | boot.loader.efi.canTouchEfiVariables = true; 30 | 31 | # services.xserver = { 32 | # # Disable RenderAccel for faster rendering in terminal emulators. 33 | # deviceSection = '' 34 | # Option "RenderAccel" "false" 35 | # ''; 36 | # }; 37 | 38 | # Specify port to bind to for SSH reverse tunneling 39 | services.ssh-phone-home = { 40 | enable = true; 41 | bindPort = 2244; 42 | }; 43 | 44 | # networking.firewall.enable = false; 45 | networking.firewall.allowPing = true; 46 | 47 | # # Share ethernet connection 48 | # networking.nat = { 49 | # enable = true; 50 | # externalInterface = "wlp4s0"; 51 | # internalIPs = [ "192.168.1.0/24" ]; 52 | # internalInterfaces = [ "enp1s0" ]; 53 | # }; 54 | # networking.interfaces.enp1s0 = { 55 | # ipAddress = "192.168.0.1"; 56 | # prefixLength = 24; 57 | # }; 58 | 59 | # Define a user account for larry 60 | users.extraUsers.larry = { 61 | name = "larry"; 62 | group = "larry"; 63 | extraGroups = [ 64 | "audio" 65 | "libvirtd" 66 | "networkmanager" 67 | "users" 68 | "vboxusers" 69 | "video" 70 | "weston-launch" 71 | "wheel" 72 | ]; 73 | uid = 1002; 74 | createHome = true; 75 | home = "/home/larry"; 76 | shell = "/run/current-system/sw/bin/bash"; 77 | }; 78 | users.extraGroups.larry.gid = 1002; 79 | } 80 | -------------------------------------------------------------------------------- /machines/hazuki.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/android.nix 7 | ../profiles/audio.nix 8 | ../profiles/desktop.nix 9 | ../profiles/development.nix 10 | ../profiles/games.nix 11 | ../profiles/graphics.nix 12 | # ../profiles/mesa.nix 13 | ../profiles/networking.nix 14 | ../profiles/printing.nix 15 | # ../profiles/redshift.nix 16 | ../profiles/scanning.nix 17 | ../profiles/sdr.nix 18 | ../profiles/server.nix 19 | # ../profiles/telephony.nix 20 | # ../profiles/virtualization.nix 21 | 22 | # Experimental 23 | # ../profiles/vfio.nix 24 | ../profiles/cuda.nix 25 | ]; 26 | 27 | # networking.firewall.enable = false; 28 | networking.firewall.allowPing = true; 29 | 30 | # Set a static IP when I didn't want to set up dhcp 31 | # networking.defaultGateway = "192.168.0.1"; 32 | # networking.interfaces.enp3s0 = { 33 | # ipAddress = "192.168.0.42"; 34 | # prefixLength = 24; 35 | # }; 36 | 37 | hardware.opengl.driSupport32Bit = true; 38 | 39 | # # Use the GRUB 2 boot loader. 40 | # boot.loader.grub.enable = true; 41 | # boot.loader.grub.version = 2; 42 | # # Define on which hard drive you want to install Grub. 43 | # boot.loader.grub.device = "/dev/sda"; 44 | 45 | # Use the efi boot loader. 46 | boot.loader.systemd-boot.enable = true; 47 | boot.loader.efi.canTouchEfiVariables = true; 48 | 49 | # Speed up development at the cost of possible build race conditions 50 | nix.buildCores = 8; 51 | 52 | # Generated by nvidia-settings. 53 | services.xserver = { 54 | # Use the NVIDIA graphics drivers. 55 | videoDrivers = [ "nvidia" ]; 56 | 57 | # serverLayoutSection = '' 58 | # Option "Xinerama" "0" 59 | # ''; 60 | # 61 | # monitorSection = '' 62 | # # HorizSync source: edid, VertRefresh source: edid 63 | # VendorName "Unknown" 64 | # ModelName "Ancor Communications Inc VE228" 65 | # HorizSync 30.0 - 83.0 66 | # VertRefresh 50.0 - 76.0 67 | # Option "DPMS" 68 | # ''; 69 | # 70 | # deviceSection = '' 71 | # Driver "nvidia" 72 | # VendorName "NVIDIA Corporation" 73 | # BoardName "GeForce GTX 670" 74 | # ''; 75 | # 76 | # screenSection = '' 77 | # DefaultDepth 24 78 | # Option "Stereo" "0" 79 | # Option "metamodes" "DVI-I-1: nvidia-auto-select +0+0 {rotation=left}, DP-0: nvidia-auto-select +1080+0 {rotation=left}, DVI-D-0: nvidia-auto-select +2160+0 {rotation=left}; DVI-I-1: nvidia-auto-select +0+0 {rotation=left}; DVI-I-1: 1680x1050 +0+0 {rotation=left}; DVI-I-1: 1600x1200 +0+0 {rotation=left}; DVI-I-1: 1440x900 +0+0 {rotation=left}; DVI-I-1: 1280x1024 +0+0 {rotation=left}; DVI-I-1: 1280x1024_60 +0+0 {rotation=left}; DVI-I-1: 1280x960 +0+0 {rotation=left}; DVI-I-1: 1152x864 +0+0 {rotation=left}; DVI-I-1: 1024x768 +0+0 {rotation=left}; DVI-I-1: 1024x768_70 +0+0 {rotation=left}; DVI-I-1: 1024x768_60 +0+0 {rotation=left}; DVI-I-1: 800x600 +0+0 {rotation=left}; DVI-I-1: 800x600_72 +0+0 {rotation=left}; DVI-I-1: 800x600_60 +0+0 {rotation=left}; DVI-I-1: 800x600_56 +0+0 {rotation=left}; DVI-I-1: 640x480 +0+0 {rotation=left}; DVI-I-1: 640x480_72 +0+0 {rotation=left}; DVI-I-1: 640x480_60 +0+0 {rotation=left}" 80 | # Option "SLI" "Off" 81 | # Option "MultiGPU" "Off" 82 | # Option "BaseMosaic" "off" 83 | # SubSection "Display" 84 | # Depth 24 85 | # EndSubSection 86 | # ''; 87 | }; 88 | 89 | # Specify port to bind to for SSH reverse tunneling 90 | services.ssh-phone-home = { 91 | enable = true; 92 | bindPort = 2200; 93 | }; 94 | 95 | # Listen for Synergy connections through SSH on localhost 96 | services.synergy.server = { 97 | enable = false; 98 | address = "localhost"; 99 | configFile = pkgs.stdenv.mkDerivation rec { 100 | name = "synergy-server-config"; 101 | text = '' 102 | section: screens 103 | hazuki: 104 | applebloom: 105 | end 106 | section: aliases 107 | applebloom: 108 | applebloom.local 109 | end 110 | section: links 111 | hazuki: 112 | right = applebloom 113 | applebloom: 114 | left = hazuki 115 | end 116 | ''; 117 | buildCommand = '' 118 | echo "$text" > "$out" 119 | ''; 120 | }; 121 | }; 122 | } 123 | -------------------------------------------------------------------------------- /machines/heldarf.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/android.nix 7 | ../profiles/audio.nix 8 | ../profiles/desktop.nix 9 | ../profiles/development.nix 10 | ../profiles/graphics.nix 11 | ../profiles/laptop.nix 12 | ../profiles/printing.nix 13 | ../profiles/server.nix 14 | # ../profiles/telephony.nix 15 | ../profiles/virtualization.nix 16 | # ../profiles/games.nix 17 | 18 | # Experimental: 19 | ../profiles/mesa.nix 20 | ]; 21 | 22 | # Use the gummiboot efi boot loader. 23 | boot.loader.gummiboot.enable = true; 24 | boot.loader.efi.canTouchEfiVariables = true; 25 | 26 | # services.xserver = { 27 | # # Disable RenderAccel for faster rendering in terminal emulators. 28 | # deviceSection = '' 29 | # Option "RenderAccel" "false" 30 | # ''; 31 | # }; 32 | 33 | # Specify port to bind to for SSH reverse tunneling 34 | services.ssh-phone-home = { 35 | enable = true; 36 | bindPort = 2244; 37 | }; 38 | 39 | # networking.firewall.enable = false; 40 | networking.firewall.allowPing = true; 41 | 42 | # # Share ethernet connection 43 | # networking.nat = { 44 | # enable = true; 45 | # externalInterface = "wlp4s0"; 46 | # internalIPs = [ "192.168.1.0/24" ]; 47 | # internalInterfaces = [ "enp1s0" ]; 48 | # }; 49 | # networking.interfaces.enp1s0 = { 50 | # ipAddress = "192.168.0.1"; 51 | # prefixLength = 24; 52 | # }; 53 | } 54 | -------------------------------------------------------------------------------- /machines/kresnik.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/desktop.nix 7 | ../profiles/server.nix 8 | ../profiles/development.nix 9 | ]; 10 | 11 | # TODO: configure a local squid transparent proxy server to go through the corporate proxy 12 | 13 | # Use the corporate proxy. 14 | nix.proxy = http://ongate.onsemi.com:80; 15 | 16 | # Use the GRUB 2 boot loader. 17 | boot.loader.grub.enable = true; 18 | boot.loader.grub.version = 2; 19 | # Define on which hard drive you want to install Grub. 20 | boot.loader.grub.device = "/dev/sda"; 21 | 22 | services.xserver = { 23 | # Disable RenderAccel for faster rendering in terminal emulators. 24 | deviceSection = '' 25 | Option "RenderAccel" "false" 26 | ''; 27 | config = '' 28 | Section "Monitor" 29 | Identifier "DVI-0" 30 | Option "Primary" "true" 31 | Option "PreferredMode" "1600x1200" 32 | EndSection 33 | 34 | Section "Monitor" 35 | Identifier "DVI-1" 36 | Option "PreferredMode" "1600x1200" 37 | Option "Rotate" "left" 38 | Option "RightOf" "DVI-0" 39 | EndSection 40 | ''; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /machines/lain.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/desktop.nix 7 | ../profiles/development.nix 8 | ../profiles/server.nix 9 | ../profiles/virtualization.nix 10 | ]; 11 | 12 | # Use the GRUB 2 boot loader. 13 | boot.loader.grub.enable = true; 14 | boot.loader.grub.version = 2; 15 | # Define on which hard drive you want to install Grub. 16 | boot.loader.grub.device = "/dev/disk/by-id/wwn-0x50014ee0ad9ca4a8"; 17 | 18 | services.xserver = { 19 | config = '' 20 | Section "Monitor" 21 | Identifier "DisplayPort-0" 22 | Option "Primary" "true" 23 | Option "PreferredMode" "1920x1080" 24 | EndSection 25 | 26 | Section "Monitor" 27 | Identifier "DVI-0" 28 | Option "PreferredMode" "1680x1050" 29 | Option "Rotate" "left" 30 | Option "RightOf" "DisplayPort-0" 31 | EndSection 32 | 33 | Section "Monitor" 34 | Identifier "DVI-1" 35 | Option "PreferredMode" "1680x1050" 36 | Option "Rotate" "left" 37 | Option "RightOf" "DVI-0" 38 | EndSection 39 | ''; 40 | }; 41 | 42 | # Specify port to bind to for SSH reverse tunneling 43 | services.ssh-phone-home = { 44 | enable = true; 45 | remoteHostname = lib.mkForce "minerve.cose.isu.edu"; 46 | bindPort = 2222; 47 | remoteUser = lib.mkForce "glinjona"; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /machines/miku.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/server.nix 7 | ]; 8 | # Use the GRUB 2 boot loader. 9 | boot.loader.grub.enable = true; 10 | boot.loader.grub.version = 2; 11 | # Define on which hard drive you want to install Grub. 12 | boot.loader.grub.device = "/dev/disk/by-id/ata-ST380215A_9RW4SX14"; 13 | 14 | # Specify port to bind to for SSH reverse tunneling 15 | services.ssh-phone-home = { 16 | enable = true; 17 | bindPort = 2211; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /machines/nixos.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../profiles/desktop.nix 7 | ]; 8 | 9 | # Use the GRUB 2 boot loader. 10 | boot.loader.grub.enable = true; 11 | boot.loader.grub.version = 2; 12 | # Define on which hard drive you want to install Grub. 13 | #boot.loader.grub.device = "/dev/sda"; 14 | } 15 | -------------------------------------------------------------------------------- /nixops.nix: -------------------------------------------------------------------------------- 1 | # Most (all?) hosts defined in this import most of their configuration from 2 | # ./configuration-common.nix, which in turn imports their respective 3 | # ./machine/*.nix file. 4 | 5 | let 6 | 7 | ec2-region = "us-west-2"; 8 | ec2-zone = "us-west-2b"; 9 | ec2-accessKeyId = "auntie"; # symbolic name looked up in ~/.ec2-keys 10 | 11 | ec2-small = 12 | { resources, ... }: 13 | { 14 | deployment = { 15 | targetEnv = "ec2"; 16 | ec2 = { 17 | accessKeyId = ec2-accessKeyId; # symbolic name looked up in ~/.ec2-keys 18 | region = ec2-region; 19 | instanceType = "m2.small"; 20 | keyPair = resources.ec2KeyPairs.auntie-key-pair; 21 | # securityGroups = [ "allow-ssh" ]; 22 | }; 23 | }; 24 | }; 25 | 26 | virtualbox-small = 27 | { ... }: 28 | { 29 | deployment = { 30 | targetEnv = "virtualbox"; 31 | virtualbox.memorySize = 1024; # megabytes 32 | }; 33 | }; 34 | 35 | in 36 | { 37 | network.description = "auntieneo.net"; 38 | 39 | # Provision an EC2 key pair 40 | resources.ec2KeyPairs.auntie-key-pair = { 41 | region = ec2-region; 42 | accessKeyId = ec2-accessKeyId; }; 43 | 44 | # Provision an EC2 volume for persistent storage of /home files 45 | resources.ebsVolumes.home = { 46 | name = "/home"; 47 | region = ec2-region; 48 | zone = ec2-zone; 49 | accessKeyId = ec2-accessKeyId; # symbolic name looked up in ~/.ec2-keys 50 | volumeType = "standard"; 51 | size = 10; 52 | }; 53 | 54 | dhaos = 55 | { resources, config, pkgs, ... }: 56 | { 57 | # FIXME: move deployment out of here 58 | deployment = { 59 | targetEnv = "ec2"; 60 | ec2 = { 61 | accessKeyId = ec2-accessKeyId; # symbolic name looked up in ~/.ec2-keys 62 | region = ec2-region; 63 | zone = ec2-zone; 64 | instanceType = "t2.micro"; 65 | ami = "ami-fb9dc3cb"; 66 | keyPair = resources.ec2KeyPairs.auntie-key-pair; 67 | securityGroups = [ "allow-ssh" ]; 68 | ebsBoot = true; # only EBS-backed instances can mount EBS volumes at boot 69 | }; 70 | }; 71 | # map persistent storage for /home 72 | fileSystems."/home" = { 73 | fsType = "ext4"; 74 | autoFormat = true; 75 | device = "/dev/xvdf"; 76 | ec2.disk = resources.ebsVolumes.home; 77 | }; 78 | # import configuration modules 79 | imports = [ 80 | ./configuration-common.nix 81 | ./machines/dhaos.nix 82 | ]; 83 | }; 84 | } 85 | -------------------------------------------------------------------------------- /patches/urxvt-text-shadows.patch: -------------------------------------------------------------------------------- 1 | diff -ur rxvt-unicode-9.12/src/init.C rxvt-unicode-9.12-modified/src/init.C 2 | --- rxvt-unicode-9.12/src/init.C 2011-06-22 04:44:37.000000000 -0600 3 | +++ rxvt-unicode-9.12-modified/src/init.C 2013-09-11 13:08:25.000000000 -0600 4 | @@ -509,6 +509,7 @@ 5 | #endif /* ! NO_BOLD_UNDERLINE_REVERSE */ 6 | #if ENABLE_FRILLS 7 | NULL, // Color_underline 8 | + NULL, // Color_shadow 9 | #endif 10 | #ifdef OPTION_HC 11 | NULL, 12 | diff -ur rxvt-unicode-9.12/src/optinc.h rxvt-unicode-9.12-modified/src/optinc.h 13 | --- rxvt-unicode-9.12/src/optinc.h 2011-02-21 00:39:50.000000000 -0700 14 | +++ rxvt-unicode-9.12-modified/src/optinc.h 2013-09-12 04:21:36.000000000 -0600 15 | @@ -34,6 +34,7 @@ 16 | def(hold) // hold window open after exit 17 | def(override_redirect) 18 | def(urgentOnBell) 19 | + def(textShadow) 20 | #else 21 | nodef(insecure) 22 | nodef(borderLess) 23 | diff -ur rxvt-unicode-9.12/src/rsinc.h rxvt-unicode-9.12-modified/src/rsinc.h 24 | --- rxvt-unicode-9.12/src/rsinc.h 2011-02-21 00:39:50.000000000 -0700 25 | +++ rxvt-unicode-9.12-modified/src/rsinc.h 2013-09-12 03:33:16.000000000 -0600 26 | @@ -78,6 +78,7 @@ 27 | def (lineSpace) 28 | def (letterSpace) 29 | def (cursorUnderline) 30 | + def (textShadow) 31 | def (urgentOnBell) 32 | #endif 33 | #ifdef BUILTIN_GLYPHS 34 | diff -ur rxvt-unicode-9.12/src/rxvt.h rxvt-unicode-9.12-modified/src/rxvt.h 35 | --- rxvt-unicode-9.12/src/rxvt.h 2011-06-22 04:44:37.000000000 -0600 36 | +++ rxvt-unicode-9.12-modified/src/rxvt.h 2013-09-11 12:37:07.000000000 -0600 37 | @@ -502,6 +502,7 @@ 38 | #endif 39 | #if ENABLE_FRILLS 40 | Color_underline, 41 | + Color_shadow, 42 | #endif 43 | #ifdef OPTION_HC 44 | Color_HC, 45 | diff -ur rxvt-unicode-9.12/src/rxvtfont.C rxvt-unicode-9.12-modified/src/rxvtfont.C 46 | --- rxvt-unicode-9.12/src/rxvtfont.C 2011-06-22 10:06:14.000000000 -0600 47 | +++ rxvt-unicode-9.12-modified/src/rxvtfont.C 2013-09-12 07:02:41.000000000 -0600 48 | @@ -32,6 +32,8 @@ 49 | # include 50 | #endif 51 | 52 | +#define ISSET_PIXCOLOR(idx) (!!term->rs[Rs_color + (idx)]) 53 | + 54 | #define MAX_OVERLAP_ROMAN (8 + 2) // max. character width in 8ths of the base width 55 | #define MAX_OVERLAP_ITALIC (8 + 3) // max. overlap for italic fonts 56 | 57 | @@ -1053,6 +1055,19 @@ 58 | XGCValues v; 59 | v.foreground = term->pix_colors[fg]; 60 | v.font = f->fid; 61 | +#if ENABLE_FRILLS 62 | + XGCValues shadow_v; 63 | + XRectangle clip_rect; 64 | + if(term->option(Opt_textShadow)) 65 | + { 66 | + if (ISSET_PIXCOLOR (Color_shadow)) 67 | + shadow_v.foreground = term->pix_colors[Color_shadow]; 68 | + else 69 | + shadow_v.foreground = term->pix_colors[bg]; 70 | + shadow_v.font = v.font; 71 | + clip_rect.x = clip_rect.y = 0; 72 | + } 73 | +#endif 74 | 75 | if (enc2b) 76 | { 77 | @@ -1115,7 +1130,23 @@ 78 | while (len); 79 | } 80 | else 81 | - XDrawString (disp, d, gc, x, y + base, xc, len); 82 | + { 83 | +#ifdef ENABLE_FRILLS 84 | + // FIXME: shadows should be implemented for the other cases as well 85 | + if(term->option(Opt_textShadow)) 86 | + { 87 | + // set a clipping rectangle to clip shadows 88 | + clip_rect.width = term->fwidth * len; 89 | + clip_rect.height = term->fheight; 90 | + XSetClipRectangles(disp, gc, x, y, &clip_rect, 1, Unsorted); 91 | + XChangeGC (disp, gc, GCForeground | GCFont, &shadow_v); // FIXME: could get rid of these extra calls 92 | + XDrawString (disp, d, gc, x + 1, y + 1 + base, xc, len); 93 | + XChangeGC (disp, gc, GCForeground | GCFont, &v); 94 | + XSetClipMask(disp, gc, None); 95 | + } 96 | +#endif 97 | + XDrawString (disp, d, gc, x, y + base, xc, len); 98 | + } 99 | } 100 | } 101 | } 102 | @@ -1359,8 +1390,26 @@ 103 | int fg, int bg) 104 | { 105 | XGlyphInfo extents; 106 | +#if ENABLE_FRILLS 107 | + XftGlyphSpec *enc; 108 | + XftGlyphSpec *ep; 109 | + XftGlyphSpec *enc_shadow; 110 | + XftGlyphSpec *ep_shadow; 111 | + if(term->option(Opt_textShadow)) 112 | + { 113 | + enc = rxvt_temp_buf (len*2); 114 | + enc_shadow = enc + len; 115 | + ep_shadow = enc_shadow; 116 | + } 117 | + else 118 | + { 119 | + XftGlyphSpec *enc = rxvt_temp_buf (len); 120 | + } 121 | + ep = enc; 122 | +#else 123 | XftGlyphSpec *enc = rxvt_temp_buf (len); 124 | XftGlyphSpec *ep = enc; 125 | +#endif 126 | 127 | dTermDisplay; 128 | dTermGC; 129 | @@ -1398,6 +1447,17 @@ 130 | if (extents.xOff == 0) 131 | ep->x = x_ + cwidth; 132 | 133 | +#if ENABLE_FRILLS 134 | + if(term->option(Opt_textShadow)) 135 | + { 136 | + ep_shadow->glyph = glyph; 137 | + ep_shadow->x = ep->x + 1; 138 | + ep_shadow->y = ep->y + 1; 139 | + 140 | + ep_shadow++; 141 | + } 142 | +#endif 143 | + 144 | ep++; 145 | } 146 | 147 | @@ -1462,6 +1522,15 @@ 148 | #endif 149 | XftDrawRect (d2, &term->pix_colors[bg >= 0 ? bg : Color_bg].c, 0, 0, w, h); 150 | 151 | +#if ENABLE_FRILLS 152 | + if(term->option(Opt_textShadow)) 153 | + { 154 | + if (ISSET_PIXCOLOR (Color_shadow)) 155 | + XftDrawGlyphSpec (d2, &term->pix_colors[Color_shadow].c, f, enc_shadow, ep_shadow - enc_shadow); 156 | + else 157 | + XftDrawGlyphSpec (d2, &term->pix_colors[bg].c, f, enc_shadow, ep_shadow - enc_shadow); 158 | + } 159 | +#endif 160 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); 161 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); 162 | } 163 | diff -ur rxvt-unicode-9.12/src/xdefaults.C rxvt-unicode-9.12-modified/src/xdefaults.C 164 | --- rxvt-unicode-9.12/src/xdefaults.C 2011-06-22 04:44:37.000000000 -0600 165 | +++ rxvt-unicode-9.12-modified/src/xdefaults.C 2013-09-12 03:30:22.000000000 -0600 166 | @@ -138,6 +138,7 @@ 167 | BOOL (Rs_tripleclickwords, "tripleclickwords", "tcw", Opt_tripleclickwords, 0, "triple click word selection"), 168 | BOOL (Rs_insecure, "insecure", "insecure", Opt_insecure, 0, "enable possibly insecure escape sequences"), 169 | BOOL (Rs_cursorUnderline, "cursorUnderline", "uc", Opt_cursorUnderline, 0, "underline cursor"), 170 | + BOOL (Rs_textShadow, "textShadow", "uc", Opt_textShadow, 0, "text shadow effect"), 171 | #endif 172 | #if CURSOR_BLINK 173 | BOOL (Rs_cursorBlink, "cursorBlink", "bc", Opt_cursorBlink, 0, "blinking cursor"), 174 | @@ -171,6 +172,7 @@ 175 | #endif /* ! NO_BOLD_UNDERLINE_REVERSE */ 176 | #if ENABLE_FRILLS 177 | RSTRG (Rs_color + Color_underline, "underlineColor", "color"), 178 | + RSTRG (Rs_color + Color_shadow, "shadowColor", "color"), 179 | #endif 180 | RSTRG (Rs_color + Color_scroll, "scrollColor", "color"), 181 | #ifdef RXVT_SCROLLBAR 182 | -------------------------------------------------------------------------------- /pkgs/asterisk-testsuite/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchsvn, asterisk, lua51Packages }: 2 | 3 | let 4 | asterisk-dev = 5 | (stdenv.lib.overrideDerivation asterisk (attrs: rec { 6 | name = "asterisk-dev-${attrs.version}"; 7 | 8 | configureFlags = attrs.configureFlags + " --enable-dev-mode"; 9 | })); 10 | in 11 | stdenv.mkDerivation rec { 12 | name = "asterisk-testsuite-svn-${version}"; 13 | version = "6564"; 14 | 15 | src = fetchsvn { 16 | url = http://svn.asterisk.org/svn/testsuite/asterisk/trunk; 17 | rev = "${version}"; 18 | sha256 = "047jzj7a2i7qj0gsb2yl5zwnyak632paqrkx0mhbnc22ivzs83s0"; 19 | }; 20 | 21 | buildInputs = [ lua51Packages.lua ] ++ asterisk.buildInputs; 22 | 23 | src_asterisk = "${asterisk.src}"; 24 | 25 | preInstall = '' 26 | sed -i 's|^PREFIX?=.*|PREFIX?='"''${out}"'|' ./asttest/Makefile 27 | ''; 28 | } 29 | -------------------------------------------------------------------------------- /pkgs/asterisk/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, fetchgit, jansson, libxml2, libxslt, ncurses, openssl, sqlite, utillinux }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "asterisk-${version}"; 5 | version = "13.3.2"; 6 | 7 | src = fetchurl { 8 | url = "http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-${version}.tar.gz"; 9 | sha256 = "19dafvy6ch4v8949bjim64fff456k78156m30dy2yvhm94m5k1zz"; 10 | }; 11 | 12 | # Note that these sounds are included with the release tarball. They are 13 | # provided here verbatim for the convenience of anyone wanting to build 14 | # Asterisk from other sources. 15 | coreSounds = fetchurl { 16 | url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.4.26.tar.gz; 17 | sha256 = "2300e3ed1d2ded6808a30a6ba71191e7784710613a5431afebbd0162eb4d5d73"; 18 | }; 19 | mohSounds = fetchurl { 20 | url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-wav-2.03.tar.gz; 21 | sha256 = "449fb810d16502c3052fedf02f7e77b36206ac5a145f3dacf4177843a2fcb538"; 22 | }; 23 | # TODO: Sounds for other languages could be added here 24 | 25 | buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux ]; 26 | 27 | patches = [ 28 | # Disable downloading of sound files (we will fetch them 29 | # ourselves if needed). 30 | ./disable-download.patch 31 | 32 | # We want the Makefile to install the default /var skeleton 33 | # under ${out}/var but we also want to use /var at runtime. 34 | # This patch changes the runtime behavior to look for state 35 | # directories in /var rather than ${out}/var. 36 | ./runtime-vardirs.patch 37 | ]; 38 | 39 | # Use the following preConfigure section when building Asterisk from sources 40 | # other than the release tarball. 41 | # preConfigure = '' 42 | # ln -s ${coreSounds} sounds/asterisk-core-sounds-en-gsm-1.4.26.tar.gz 43 | # ln -s ${mohSounds} sounds/asterisk-moh-opsound-wav-2.03.tar.gz 44 | # ''; 45 | 46 | # The default libdir is $PREFIX/usr/lib, which causes problems when paths 47 | # compiled into Asterisk expect ${out}/usr/lib rather than ${out}/lib. 48 | configureFlags = "--libdir=\${out}/lib"; 49 | 50 | postInstall = '' 51 | # Install sample configuration files for this version of Asterisk 52 | make samples 53 | ''; 54 | 55 | meta = with stdenv.lib; { 56 | description = "Software implementation of a telephone private branch exchange (PBX)"; 57 | homepage = http://www.asterisk.org/; 58 | license = licenses.gpl2; 59 | maintainers = with maintainers; [ auntie ]; 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /pkgs/asterisk/disable-create-vardirs.patch: -------------------------------------------------------------------------------- 1 | diff -rupN asterisk-13.2.0/Makefile asterisk-13.2.0-patched/Makefile 2 | --- asterisk-13.2.0/Makefile 2014-10-31 10:50:53.000000000 -0600 3 | +++ asterisk-13.2.0-patched/Makefile 2015-04-01 11:46:08.644195311 -0600 4 | @@ -546,17 +546,8 @@ update: 5 | 6 | NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h)) 7 | OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) 8 | -INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \ 9 | - "$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \ 10 | - "$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \ 11 | - "$(ASTSPOOLDIR)/voicemail" "$(ASTSPOOLDIR)/recording" \ 12 | - "$(ASTHEADERDIR)" "$(ASTHEADERDIR)/doxygen" \ 13 | - "$(ASTLOGDIR)" "$(ASTLOGDIR)/cdr-csv" "$(ASTLOGDIR)/cdr-custom" \ 14 | - "$(ASTLOGDIR)/cel-custom" "$(ASTDATADIR)" "$(ASTDATADIR)/documentation" \ 15 | - "$(ASTDATADIR)/documentation/thirdparty" "$(ASTDATADIR)/firmware" \ 16 | - "$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \ 17 | - "$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/rest-api" "$(ASTDATADIR)/static-http" \ 18 | - "$(ASTDATADIR)/sounds" "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)" 19 | +INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" \ 20 | + "$(ASTHEADERDIR)" "$(ASTHEADERDIR)/doxygen" 21 | 22 | installdirs: 23 | @for i in $(INSTALLDIRS); do \ 24 | -------------------------------------------------------------------------------- /pkgs/asterisk/disable-download.patch: -------------------------------------------------------------------------------- 1 | diff -ruN asterisk-13.2.0/sounds/Makefile asterisk-13.2.0-patched/sounds/Makefile 2 | --- asterisk-13.2.0/sounds/Makefile 2014-09-09 14:01:11.000000000 -0600 3 | +++ asterisk-13.2.0-patched/sounds/Makefile 2015-03-31 16:12:00.549133670 -0600 4 | @@ -89,7 +89,7 @@ 5 | ) && touch "$(1)$(if $(3),/$(3),)/$$@"; \ 6 | fi 7 | 8 | -asterisk-$(2)$(if $(3),-$(3),)-%.tar.gz: have_download 9 | +asterisk-$(2)$(if $(3),-$(3),)-%.tar.gz: 10 | ifneq ($(SOUNDS_CACHE_DIR),) 11 | $(CMD_PREFIX) \ 12 | if test ! -f "$(1)$(if $(3),/$(3),)/.$$(subst .tar.gz,,$$@)"; then \ 13 | -------------------------------------------------------------------------------- /pkgs/asterisk/runtime-vardirs.patch: -------------------------------------------------------------------------------- 1 | diff -rupN asterisk-13.3.2/build_tools/make_defaults_h asterisk-13.3.2-patched/build_tools/make_defaults_h 2 | --- asterisk-13.3.2/build_tools/make_defaults_h 2012-01-30 14:21:16.000000000 -0700 3 | +++ asterisk-13.3.2-patched/build_tools/make_defaults_h 2015-04-15 19:07:46.760351155 -0600 4 | @@ -1,4 +1,13 @@ 5 | #!/bin/sh 6 | + 7 | +ASTLOGDIR=/var/log/asterisk 8 | +ASTVARRUNDIR=/var/run/asterisk 9 | +ASTVARLIBDIR=/var/lib/asterisk 10 | +ASTDBDIR=${ASTVARLIBDIR} 11 | +ASTDATADIR=${ASTVARLIBDIR} 12 | +AGI_DIR=${ASTDATADIR}/agi-bin 13 | +ASTSPOOLDIR=/var/spool/asterisk 14 | + 15 | cat << END 16 | /* 17 | * defaults.h 18 | @@ -9,21 +18,21 @@ cat << END 19 | 20 | #define DEFAULT_CONFIG_DIR "${INSTALL_PATH}${ASTETCDIR}" 21 | #define DEFAULT_MODULE_DIR "${INSTALL_PATH}${ASTMODDIR}" 22 | -#define DEFAULT_AGI_DIR "${INSTALL_PATH}${AGI_DIR}" 23 | -#define DEFAULT_LOG_DIR "${INSTALL_PATH}${ASTLOGDIR}" 24 | +#define DEFAULT_AGI_DIR "${AGI_DIR}" 25 | +#define DEFAULT_LOG_DIR "${ASTLOGDIR}" 26 | 27 | -#define DEFAULT_RUN_DIR "${INSTALL_PATH}${ASTVARRUNDIR}" 28 | -#define DEFAULT_SOCKET "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.ctl" 29 | -#define DEFAULT_PID "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid" 30 | +#define DEFAULT_RUN_DIR "${ASTVARRUNDIR}" 31 | +#define DEFAULT_SOCKET "${ASTVARRUNDIR}/asterisk.ctl" 32 | +#define DEFAULT_PID "${ASTVARRUNDIR}/asterisk.pid" 33 | 34 | -#define DEFAULT_VAR_DIR "${INSTALL_PATH}${ASTVARLIBDIR}" 35 | -#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/astdb" 36 | +#define DEFAULT_VAR_DIR "${ASTVARLIBDIR}" 37 | +#define DEFAULT_DB "${ASTDBDIR}/astdb" 38 | 39 | -#define DEFAULT_DATA_DIR "${INSTALL_PATH}${ASTDATADIR}" 40 | -#define DEFAULT_KEY_DIR "${INSTALL_PATH}${ASTDATADIR}/keys" 41 | +#define DEFAULT_DATA_DIR "${ASTDATADIR}" 42 | +#define DEFAULT_KEY_DIR "${ASTDATADIR}/keys" 43 | 44 | -#define DEFAULT_SPOOL_DIR "${INSTALL_PATH}${ASTSPOOLDIR}" 45 | -#define DEFAULT_TMP_DIR "${INSTALL_PATH}${ASTSPOOLDIR}/tmp" 46 | +#define DEFAULT_SPOOL_DIR "${ASTSPOOLDIR}" 47 | +#define DEFAULT_TMP_DIR "${ASTSPOOLDIR}/tmp" 48 | 49 | #define DEFAULT_SBIN_DIR "${INSTALL_PATH}${ASTSBINDIR}" 50 | END 51 | -------------------------------------------------------------------------------- /pkgs/dahdi-linux/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, linuxHeaders, linux_3_18 }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "dahdi-linux-${version}"; 5 | version = "2.10.1"; 6 | 7 | src = fetchurl { 8 | url = "http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-${version}.tar.gz"; 9 | sha256 = "1aj3i1wccal9rqwl6ffmhkqzdihgb661zxqxfgwp4qzwj3hk5icl"; 10 | }; 11 | 12 | # Firmware tarballs (generated with ./updateFirmware.pl ${version}) 13 | dahdi-fw-oct6114-032 = fetchurl { 14 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz; 15 | sha256 = "7a006073202d67e45f1d5ff1e9c6e8663e6056cef9dc4c5abae86a1018db349c"; 16 | }; 17 | dahdi-fw-oct6114-064 = fetchurl { 18 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz; 19 | sha256 = "56bac1f2024c76ecf9b6f40992eeea29a1fbee676bb2a37a058179bacfbb1c91"; 20 | }; 21 | dahdi-fw-oct6114-128 = fetchurl { 22 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz; 23 | sha256 = "e1146749d205c41603b9b76852c3f8104dac233d0025d700db24504d10c99775"; 24 | }; 25 | dahdi-fw-oct6114-256 = fetchurl { 26 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz; 27 | sha256 = "5fe5036a2766cf0e8a968b0c58b700507d86e1cde9296ca437170cc626a9c79c"; 28 | }; 29 | dahdi-fw-tc400m-MR6_12 = fetchurl { 30 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz; 31 | sha256 = "11dd8d009809e41fc9a3a36766f59ff73d29075eede5b8724331d9a6e5259774"; 32 | }; 33 | dahdi-fw-hx8 = fetchurl { 34 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz; 35 | sha256 = "449ab3fd03d55d808e999efb7677cd04de202b92c9fcb039539a7e48a39a80f5"; 36 | }; 37 | dahdi-fw-vpmoct032 = fetchurl { 38 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz; 39 | sha256 = "6b199cf836f150f9cb35f763f0f502fb52cfa2724a449b500429c746973904ad"; 40 | }; 41 | dahdi-fw-te820 = fetchurl { 42 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz; 43 | sha256 = "5b823e25828e2c1c6548886ad408b2e31dbc8cd17170c52592792d9c754a199c"; 44 | }; 45 | dahdi-fw-te133 = fetchurl { 46 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-780019.tar.gz; 47 | sha256 = "6a255642301ab46f0bcccf4671ce41096c4733b7308719474e9c6fbcff77cc0e"; 48 | }; 49 | dahdi-fw-te134 = fetchurl { 50 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz; 51 | sha256 = "99f7c410bf47d2a5ae687d717e51448ce5b52aca902830bf39bffe683150fa2d"; 52 | }; 53 | dahdi-fw-a8b-1d0019 = fetchurl { 54 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1d0019.tar.gz; 55 | sha256 = "65817314ea97ec17520296ec78691bbe6da35b1a43051caae2d8b544f9efd011"; 56 | }; 57 | dahdi-fw-a8a-1d0017 = fetchurl { 58 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz; 59 | sha256 = "5064f9877b8aec99b19fd57988216fe1a9c0b7c07853dd3b32b5a55ab7b418e6"; 60 | }; 61 | dahdi-fw-a4b-b0019 = fetchurl { 62 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-b0019.tar.gz; 63 | sha256 = "84bf8a1a9f61598b3261a6d737529837ca0f56ace77b56467d701e6aa22c04bd"; 64 | }; 65 | dahdi-fw-a4a-a0017 = fetchurl { 66 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz; 67 | sha256 = "d5b6ab6851e431afcfec2ecc39d95fa88fe3939ffdb2e3d4f28a43cabf30e95b"; 68 | }; 69 | dahdi-fw-te435-e0019 = fetchurl { 70 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-e0019.tar.gz; 71 | sha256 = "0084354638b86666b685a48201791c85639280901519f54a79d586aedb848a3b"; 72 | }; 73 | dahdi-fw-te436 = fetchurl { 74 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz; 75 | sha256 = "0980f4a8d191c6872aa27d971758046f0e7827ac161549f2cc1b0eeab0ae9333"; 76 | }; 77 | dahdi-fwload-vpmadt032 = fetchurl { 78 | url = http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz; 79 | sha256 = "3ff26cf80555fd7470b43a87c51d03c1db2a75abcd4561d79f69b6c48298e4a1"; 80 | }; 81 | 82 | preBuild = '' 83 | cd drivers/dahdi/firmware 84 | ln -s ${dahdi-fwload-vpmadt032} ./dahdi-fwload-vpmadt032-1.25.0.tar.gz 85 | echo "${linux_3_18.config}" > .config 86 | ''; 87 | 88 | buildInputs = [ linux_3_18 linuxHeaders ]; 89 | } 90 | -------------------------------------------------------------------------------- /pkgs/dahdi-linux/updateFirmware.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | # This is a simple script to automatically generate derivations for DAHDI 4 | # firmware tarballs. 5 | # 6 | # The firmware files are normally fetched with a Makefile included with 7 | # dahdi-linux. This script utilizes that same Makefile to generate a list of 8 | # firmware tarballs, download those tarballs with nix-prefetch-url, and finally 9 | # print out the derivations for those tarballs with url and sha256 sums 10 | # included. 11 | # 12 | # The purpose of this script is to make it easier to bump the version of the 13 | # dahdi-linux derivation. Simply supply this script with the dahdi-linux 14 | # version number, and it will generate derivations for all of the firmwares. 15 | # 16 | # Example usage: 17 | # $ ./updateFirmware.pl 2.10.1 18 | # $ ./updateFirmware.pl 2.10.1 > /tmp/dahdi-linux-firmware.nix 19 | # 20 | # Script requirements: perl, make, and Archive::Extract 21 | 22 | use warnings; 23 | use strict; 24 | 25 | use Archive::Extract; 26 | use Digest::SHA; 27 | use File::Basename; 28 | use File::Temp qw/ tempdir /; 29 | 30 | my $mirror = "http://downloads.asterisk.org/pub/telephony/dahdi-linux"; 31 | my $firmware_mirror = "http://downloads.digium.com/pub/telephony/firmware/releases"; 32 | 33 | my $nix_store = "/nix/store"; 34 | 35 | sub show_help { 36 | print "Usage: ./updateFirmware.pl VERSION_NUMBER"; 37 | } 38 | 39 | if(@ARGV != 1) { 40 | show_help(); 41 | exit(1); 42 | } 43 | 44 | sub guess_derivation { 45 | my $filename = shift(@_); 46 | 47 | opendir(my $dh, $nix_store) || die "could not open nix store: $!"; 48 | $filename = quotemeta($filename); 49 | my @matches = grep(/$filename$/, readdir($dh)); 50 | closedir $dh; 51 | 52 | if(scalar @matches != 1) { 53 | return; 54 | } 55 | my $result = "$nix_store/$matches[0]"; 56 | chomp($result); 57 | print STDERR "Guessed derivation: $result\n"; 58 | return $result; 59 | } 60 | 61 | sub fetch_derivation { 62 | my $url = shift(@_); 63 | 64 | # download with nix-prefetch-url 65 | my $derivation = `PRINT_PATH=1 nix-prefetch-url ${url}`; 66 | 67 | # derivation path is on the second line 68 | chomp($derivation); 69 | $derivation = (split('\n', $derivation))[1]; 70 | 71 | print STDERR "Fetched derivation: $derivation\n"; 72 | 73 | return $derivation; 74 | } 75 | 76 | sub get_derivation { 77 | my $url = shift(@_); 78 | 79 | my $filename = $url; 80 | $filename =~ s/^.*\///; 81 | 82 | my $guess = guess_derivation($filename); 83 | 84 | my $derivation; 85 | if(defined $guess) { 86 | $derivation = $guess; 87 | } else { 88 | $derivation = fetch_derivation($url); 89 | } 90 | 91 | die "could not get derivation of: $url" 92 | unless defined $derivation; 93 | 94 | return $derivation; 95 | } 96 | 97 | sub get_derivation_sha256 { 98 | my $url = shift(@_); 99 | 100 | my $derivation = get_derivation($url); 101 | 102 | # use regex to get sha256 sum out of path 103 | my $nix_store_escaped = quotemeta($nix_store); 104 | $derivation =~ s/^$nix_store\///; 105 | $derivation =~ s/^(\w{32}).*/$1/; 106 | 107 | return $derivation; 108 | }; 109 | 110 | my $version = $ARGV[0]; 111 | 112 | # get the dahdi-linux tarball derivation 113 | my $dahdi_tarball = get_derivation("${mirror}/dahdi-linux-${version}.tar.gz"); 114 | 115 | # extract dahdi tarball into temproary directory 116 | my $temp_dir = tempdir( CLEANUP => 1 ); 117 | print STDERR "Created temporary directory: $temp_dir\n"; 118 | my $ae = Archive::Extract->new( archive => $dahdi_tarball ); 119 | print STDERR "Extracting DAHDI tarball..."; 120 | $ae->extract( to => $temp_dir ) 121 | or die "failed to extract tarball: $ae->error"; 122 | print STDERR " Done.\n"; 123 | 124 | # build string for print_firmware and print_fwloaders targets 125 | my $print_targets = "\n\n"; 126 | $print_targets .= "print_firmware:\n" . 127 | "\t@ echo \$(FIRMWARE)\n\n" . 128 | "print_fwloaders:\n" . 129 | "\t@ echo \$(FWLOADERS)\n\n" . 130 | "print_all: print_firmware print_fwloaders\n"; 131 | 132 | # append print_firmware and print_fwloaders targets to firmware Makefile 133 | my $makefile_path = "$temp_dir/dahdi-linux-${version}/drivers/dahdi/firmware/Makefile"; 134 | open(my $fh, ">>", $makefile_path) 135 | or die "could not open Makefile for appending: $!"; 136 | print $fh $print_targets; 137 | close($fh); 138 | 139 | # "make" the print targets 140 | my $makefile_dir = dirname($makefile_path); 141 | my $result = `make --quiet -C $makefile_dir print_all`; 142 | $result =~ s/\n/ /g; 143 | print STDERR "Found firmware tarballs: $result\n"; 144 | 145 | # split result into an array 146 | my @firmwares = split(/\s/, $result); 147 | @firmwares = map +{ name => (do { 148 | # remove version and file extension 149 | (my $new = $_) =~ s/(-(\d+\.)*\d+)?\.tar\.gz$//; 150 | # munge name for nix 151 | $new =~ s/\./_/g; 152 | $new}), 153 | filename => $_, 154 | url => "$firmware_mirror/$_" 155 | }, @firmwares; 156 | 157 | # download each firmware and store each sha256 sum 158 | my $sha = Digest::SHA->new(256); 159 | foreach(@firmwares) { 160 | my $url = $_->{'url'}; 161 | my $path = get_derivation($url); 162 | $sha->addfile($path); 163 | $_->{'sha256'} = $sha->hexdigest(); 164 | $sha->reset(256); 165 | } 166 | 167 | # print the fetchurl derivations needed 168 | print STDERR "\n\nOutput:\n\n\n"; 169 | foreach(@firmwares) { 170 | my $name = $_->{'name'}; 171 | my $url = $_->{'url'}; 172 | my $sha256 = $_->{'sha256'}; 173 | 174 | print "$name = fetchurl {\n" . 175 | " url = $url;\n" . 176 | " sha256 = \"$sha256\";\n" . 177 | "};\n"; 178 | } 179 | -------------------------------------------------------------------------------- /pkgs/dahdi-tools/default.nix: -------------------------------------------------------------------------------- 1 | sha256 = "08bci9bzx0fkfmz20b6jwdlxf2kffayvnrx7ggy62kzsl0shbj7a"; 2 | -------------------------------------------------------------------------------- /pkgs/dmenu-wl/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, fontconfig, libswc, libwld, libxkbcommon, pixman, wayland }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "dmenu-wl-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = "https://github.com/michaelforney/dmenu.git"; 9 | rev = "6e08b77428cc3c406ed2e90d4cae6c41df76341e"; 10 | sha256 = "d12256b7788b642aa6bee0b01db2c24358ad5346b3fe51f04b6d6928508ee6fa"; 11 | }; 12 | 13 | buildInputs = [ fontconfig libswc libwld libxkbcommon pixman wayland ]; 14 | 15 | makeFlags = "SWCPROTO=${libswc}/share/swc/swc.xml PREFIX=\${out}"; 16 | 17 | preFixup = '' 18 | # Patch dmenu scripts to use binaries with -wl suffix. 19 | for i in dmenu_path dmenu_run; do 20 | sed -ri -e 's!\<(dmenu|stest)\>!'"$out/bin"'/&-wl!g' $i 21 | done 22 | # Rename all executables with the -wl suffix. 23 | for i in dmenu dmenu_path dmenu_run stest; do 24 | mv $out/bin/$i $out/bin/$i-wl 25 | done 26 | ''; 27 | 28 | meta = { 29 | description = "an efficient dynamic menu for swc/wayland"; 30 | homepage = https://github.com/michaelforney/dmenu; 31 | license = stdenv.lib.licenses.mit; 32 | maintainers = [ stdenv.lib.maintainers.auntie ]; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /pkgs/ebview/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, gnome, libeb, pangox_compat, pkgconfig, xlibs }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "ebview-${version}"; 5 | version = "0.3.6"; 6 | 7 | src = fetchurl { 8 | url = "mirror://sourceforge/ebview/ebview-${version}.tar.gz"; 9 | sha256 = "1c9k66bcvpzkk660parpcqkfi7prcjl5gc9wqbbmsysnn7cyk32c"; 10 | }; 11 | 12 | patches = [ 13 | # EBView uses the deprecated "GtkTooltips" API, among other things. This 14 | # patch simply removes the GTK_DISABLE_DEPRECATED macro definition. 15 | ./remove_gtk_disable_deprecated.patch 16 | ]; 17 | 18 | buildInputs = [ gnome.gtk libeb pangox_compat pkgconfig xlibs.libX11 ]; 19 | 20 | configureFlags = "--with-eb-conf=${libeb}/etc/eb.conf"; 21 | 22 | # The EBView ./configure script does not pick up these libraries 23 | NIX_CFLAGS_COMPILE = "-I${pangox_compat}/include/pango-1.0"; 24 | NIX_CFLAGS_LINK = "-L${pangox_compat}/lib -lpangox-1.0 -lX11"; 25 | 26 | meta = with stdenv.lib; { 27 | description = "EPWING dictionary viewer"; 28 | homepage = http://ebview.sourceforge.net/; 29 | license = licenses.gpl2; 30 | maintainers = with maintainers; [ auntie ]; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /pkgs/ebview/remove_gtk_disable_deprecated.patch: -------------------------------------------------------------------------------- 1 | diff -rupN ebview-0.3.6/src/ebview.c ebview-0.3.6-patched/src/ebview.c 2 | --- ebview-0.3.6/src/ebview.c 2004-02-21 20:46:29.000000000 -0700 3 | +++ ebview-0.3.6-patched/src/ebview.c 2015-04-14 13:43:02.516807832 -0600 4 | @@ -15,8 +15,6 @@ 5 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6 | */ 7 | 8 | -#define GTK_DISABLE_DEPRECATED 1 9 | - 10 | #define _GLOBAL 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /pkgs/festival/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, ncurses, speech_tools }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "festival-${version}"; 5 | version = "2.4"; 6 | 7 | src = fetchurl { 8 | url = "http://festvox.org/packed/festival/2.4/festival-${version}-release.tar.gz"; 9 | sha256 = "112xbqz5hlfvdrwxabd1bsrs03h4gja9gbffpkigszw5w29z4iqy"; 10 | }; 11 | 12 | buildInputs = [ ncurses speech_tools ]; 13 | 14 | preConfigure = '' 15 | # Set the path to the Edinburgh Speech Tools 16 | sed -i 's|^EST=.*|EST=${speech_tools}|' ./config/config.in 17 | ''; 18 | 19 | postBuild = '' 20 | # Fix script pointing to build directory 21 | sed -i 's|TOP=.*|TOP=$out|' ./bin/festival_server 22 | ''; 23 | 24 | installPhase = '' 25 | mkdir -p "$out" 26 | cp -r ./bin ./lib ./doc "$out" 27 | for i in festival{,_client}; do 28 | # Replace symlinks with the actual binaries 29 | rm "$out"/bin/"$i" 30 | cp ./src/main/"$i" "$out"/bin/"$i" 31 | done 32 | # Clean up some build files 33 | rm "$out"/bin/{Makefile,VCLocalRules} 34 | ''; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /pkgs/fourchan-dl/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, unzip, mesa, qt5 }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "fourchan-dl-${version}"; 5 | version = "1.7.0"; 6 | 7 | src = fetchurl { 8 | url = "mirror://sourceforge/fourchan-dl/v${version}/fourchan-dl-src-v${version}.zip"; 9 | sha256 = "17qidwmbbngia4iv6py92yli4mdqjm1l8ai8hv0nff1pvy0harlw"; 10 | }; 11 | 12 | buildInputs = [ mesa qt5 ]; 13 | 14 | unpackPhase = '' 15 | mkdir ./fourchan-dl 16 | cd ./fourchan-dl 17 | ${unzip}/bin/unzip "${src}" 18 | ''; 19 | 20 | configurePhase = '' 21 | ${qt5}/bin/qmake . 22 | ''; 23 | 24 | installPhase = '' 25 | mkdir -p ''${out}/bin 26 | cp ./fourchan-dl{,-console} ''${out}/bin 27 | ''; 28 | } 29 | -------------------------------------------------------------------------------- /pkgs/gentoo/chrootenv.nix: -------------------------------------------------------------------------------- 1 | { buildFHSUserEnv, config }: 2 | 3 | buildFHSUserEnv { 4 | name = "gentoo"; 5 | 6 | targetPkgs = pkgs: 7 | [ pkgs.gentoo-original 8 | ]; 9 | 10 | runScript = "exec bash"; 11 | } 12 | -------------------------------------------------------------------------------- /pkgs/gentoo/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl }: 2 | 3 | stdenv.mkDerivation rec{ 4 | name = "gentoo-${version}"; 5 | version = "20150319"; 6 | 7 | stageTarball = fetchurl { 8 | url = "http://mirror.usu.edu/mirrors/gentoo/releases/amd64/autobuilds/20150319/stage3-amd64-${version}.tar.bz2"; 9 | sha256 = "1nccabr34ix0f0zzwlhd7mg385k1rsaqw6ihg46dcbylab2jsvyp"; 10 | }; 11 | 12 | # unpackPhase = '' 13 | # mkdir chroot 14 | # tar xjf ${stageTarball} -C chroot 15 | # ''; 16 | 17 | installPhase = '' 18 | mv chroot/* $out 19 | ''; 20 | } 21 | -------------------------------------------------------------------------------- /pkgs/gl2ps/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, cmake, mesa, freeglut, zlib, libpng, texLive, xorg }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "libgl2ps"; 5 | version = "1.3.9"; 6 | 7 | src = fetchurl { 8 | url = "http://geuz.org/gl2ps/src/gl2ps-${version}.tgz"; 9 | sha256 = "0h1nrhmkc4qjw2ninwpj2zbgwhc0qg6pdhpsibbvry0d2bzhns4a"; 10 | }; 11 | 12 | buildInputs = [ cmake mesa freeglut zlib libpng texLive xorg.libXi xorg.libXmu ]; 13 | } 14 | -------------------------------------------------------------------------------- /pkgs/glapse/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, ffmpeg, gettext, makeWrapper, python, pythonPackages, scrot }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "glapse-${version}"; 5 | version = "0.3"; 6 | 7 | src = fetchurl { 8 | url = "https://github.com/downloads/siondream/glapse/${name}.tar.gz"; 9 | sha256 = "0rn5zlwf9scg8vpx8phcpk61s5q5rl17q75a2pk6bd4wmsbbhrj8"; 10 | }; 11 | 12 | patches = [ ./fix-paths.patch ]; 13 | 14 | postPatch = '' 15 | sed -i 's|@out@|'"$out"'|g' \ 16 | ./glapse \ 17 | ./glapseControllers/configuration.py 18 | ''; 19 | 20 | buildInputs = [ gettext makeWrapper ]; 21 | propagatedBuildInputs = with pythonPackages; [ ffmpeg scrot python pythonPackages.pyGtkGlade ]; 22 | 23 | installFlags = "PREFIX=$(out)"; 24 | 25 | preInstall = '' 26 | mkdir -p "$out"/share/locale/{es,en,de,fr,ja} 27 | sed -i 's|/usr/lib/glapse/|'"$out"'/lib/glapse/|' ./glapse 28 | ''; 29 | 30 | postInstall = '' 31 | wrapProgram "$out"/bin/glapse --prefix PYTHONPATH : "$PYTHONPATH" 32 | ''; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /pkgs/glapse/fix-paths.patch: -------------------------------------------------------------------------------- 1 | diff -rupN glapse-0.3/data/glapse.desktop glapse-0.3-patched/data/glapse.desktop 2 | --- glapse-0.3/data/glapse.desktop 2011-05-15 16:30:39.000000000 -0600 3 | +++ glapse-0.3-patched/data/glapse.desktop 2015-07-24 11:34:12.000000000 -0600 4 | @@ -7,7 +7,7 @@ GenericName=Screenshots and video 5 | GenericName[es]=Capturas de pantalla y vídeo 6 | Comment=Take screenshots and glue them together 7 | Comment[es]=Toma capturas de pantalla, pégalas en un vídeo 8 | -Icon=/usr/share/pixmaps/glapse-icon.png 9 | +Icon=@out@/share/pixmaps/glapse-icon.png 10 | Exec=glapse 11 | Terminal=false 12 | Categories=AudioVideo 13 | diff -rupN glapse-0.3/glapse glapse-0.3-patched/glapse 14 | --- glapse-0.3/glapse 2011-05-15 16:24:03.000000000 -0600 15 | +++ glapse-0.3-patched/glapse 2015-07-24 11:33:21.000000000 -0600 16 | @@ -1,5 +1,5 @@ 17 | #!/bin/bash 18 | 19 | -cd /usr/lib/glapse/ 20 | +cd @out@/lib/glapse/ 21 | 22 | python glapse.py 23 | diff -rupN glapse-0.3/glapseControllers/configuration.py glapse-0.3-patched/glapseControllers/configuration.py 24 | --- glapse-0.3/glapseControllers/configuration.py 2011-07-04 16:43:27.000000000 -0600 25 | +++ glapse-0.3-patched/glapseControllers/configuration.py 2015-07-24 11:32:48.000000000 -0600 26 | @@ -8,10 +8,10 @@ class Configuration: 27 | def __init__(self): 28 | self.version = 0.3 29 | 30 | - self.dataDir = '/usr/share/glapse/data' 31 | - self.libDir = '/usr/lib/glapse' 32 | - self.binPath = '/usr/bin/glapse' 33 | - self.langDir = '/usr/share/locale' 34 | + self.dataDir = '@out@/share/glapse/data' 35 | + self.libDir = '@out@/lib/glapse' 36 | + self.binPath = '@out@/bin/glapse' 37 | + self.langDir = '@out@/share/locale' 38 | 39 | #self.dataDir = os.path.realpath(os.path.join(os.path.dirname(__file__), '../data')) 40 | #self.libDir = os.path.realpath(os.path.join(os.path.dirname(__file__), '../glapseControllers')) 41 | -------------------------------------------------------------------------------- /pkgs/godot/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, alsaLib, freetype, mesa, openssl, pkgconfig, python27Packages, scons, xlibs }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "godot-${version}"; 5 | version = "1.1"; 6 | 7 | src = fetchgit { 8 | url = https://github.com/okamstudio/godot.git; 9 | rev = "refs/tags/${version}-stable"; 10 | sha256 = "46094d849f661ed47a796a37ece3667230eb0d4960b25ea6a5d02c247aa56b09"; 11 | }; 12 | 13 | buildInputs = [ alsaLib freetype mesa openssl pkgconfig python27Packages.python scons xlibs.libX11 xlibs.libXcursor xlibs.libXinerama ]; 14 | 15 | patchPhase = '' 16 | sed -i 's/^env_base=/env_base=Environment(tools=custom_tools,ENV=os.environ);/' ./SConstruct 17 | ''; 18 | 19 | buildPhase = '' 20 | scons prefix=$out platform=x11 21 | ''; 22 | 23 | installPhase = '' 24 | mkdir "$out" 25 | cp -r ./bin "$out" 26 | 27 | # Copy the rest (I'm not sure how much of this is useful, but some of it is) 28 | mkdir -p "$out"/share/godot 29 | find . -mindepth 1 -maxdepth 1 ! -name 'bin' ! -name 'share' -exec cp -r {} "$out"/share/godot \; 30 | ''; 31 | } 32 | -------------------------------------------------------------------------------- /pkgs/heirloom-mailx/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, /* fetchurl, */ fetchcvs, coreutils, openssl, /* nspr, nss, */ postfix }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "heirloom-mailx-${version}"; 5 | version = "12.4"; 6 | 7 | # src = fetchurl { 8 | # url = "mirror://sourceforge/heirloom/heirloom-mailx/${version}/mailx-${version}.tar.bz2"; 9 | # sha256 = "0skiwn2rwl1zp4sj4ywx7smrfg7g62ikfx68ch1vqip3kxv1w84j"; 10 | # }; 11 | src = fetchcvs { 12 | date = "2015-04-18"; 13 | cvsRoot = ":pserver:anonymous@nail.cvs.sourceforge.net:/cvsroot/nail"; 14 | module = "nail"; 15 | sha256 = "c373f98cfe3fa934b556d6466c192e79af7f19b3dc9d91ca6f31ed185b2cff5e"; 16 | }; 17 | 18 | preBuild = '' 19 | makeFlagsArray=( \ 20 | PREFIX="''${out}" \ 21 | SYSCONFDIR="''${out}/etc" \ 22 | UCBINSTALL="${coreutils}/bin/install" \ 23 | SENDMAIL="${postfix}/bin/sendmail" \ 24 | INCLUDES="-I${openssl}/include" \ 25 | LDFLAGS="-L${openssl}/lib" \ 26 | IPV6="-DHAVE_IPv6_FUNCS" \ 27 | ) 28 | ''; 29 | # INCLUDES="-I${nspr}/include/nspr -I${nss}/include/nss" \ 30 | # LDFLAGS="-L${nspr}/lib -L${nss}/lib" \ 31 | 32 | } 33 | -------------------------------------------------------------------------------- /pkgs/image-sdf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "image-sdf", 3 | "version": "1.0.4", 4 | "description": "generate a signed distance field from an image", 5 | "main": "index.js", 6 | "license": "MIT", 7 | "author": { 8 | "name": "Matt DesLauriers", 9 | "email": "dave.des@gmail.com", 10 | "url": "https://github.com/mattdesl" 11 | }, 12 | "bin": { 13 | "image-sdf": "./bin/cmd.js" 14 | }, 15 | "dependencies": { 16 | "as-number": "^1.0.0", 17 | "clamp": "^1.0.1", 18 | "color-string": "^0.2.1", 19 | "get-pixels": "^3.1.0", 20 | "ndarray": "^1.0.16", 21 | "save-pixels": "^2.2.0", 22 | "typedarray-pool": "^1.1.0", 23 | "yargs": "^1.3.3" 24 | }, 25 | "devDependencies": { 26 | "2d-context": "^1.2.0", 27 | "baboon-image-uri": "^1.0.1", 28 | "browserify": "^8.1.3", 29 | "buffer-equal": "0.0.1", 30 | "concat-stream": "^1.4.7", 31 | "garnish": "^2.1.0", 32 | "get-image-pixels": "^1.0.0", 33 | "img": "^1.0.0", 34 | "npm-execspawn": "^1.0.6", 35 | "tap-spec": "^2.2.1", 36 | "tape": "^3.0.3", 37 | "wzrd": "^1.2.1" 38 | }, 39 | "scripts": { 40 | "test": "node test/test.js | tap-spec", 41 | "test-browser": "wzrd test/test-browser.js | garnish" 42 | }, 43 | "keywords": [ 44 | "sdf", 45 | "bitmap", 46 | "bmp", 47 | "png", 48 | "img", 49 | "jpg", 50 | "image", 51 | "signed", 52 | "distance", 53 | "field", 54 | "text", 55 | "alpha", 56 | "test", 57 | "fonts", 58 | "webgl", 59 | "gl", 60 | "stackgl", 61 | "glsl", 62 | "shader" 63 | ], 64 | "repository": { 65 | "type": "git", 66 | "url": "git://github.com/mattdesl/image-sdf.git" 67 | }, 68 | "homepage": "https://github.com/mattdesl/image-sdf", 69 | "bugs": { 70 | "url": "https://github.com/mattdesl/image-sdf/issues" 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /pkgs/image-sdf/packages.json: -------------------------------------------------------------------------------- 1 | [ "image-sdf" ] 2 | -------------------------------------------------------------------------------- /pkgs/libeb/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, perl, zlib }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "libeb-${version}"; 5 | version = "4.4.3"; 6 | 7 | src = fetchurl { 8 | url = "ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2"; 9 | sha256 = "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb"; 10 | }; 11 | 12 | buildInputs = [ perl zlib ]; 13 | 14 | meta = { 15 | description = "C library for accessing CD-ROM books"; 16 | homepage = http://www.sra.co.jp/people/m-kasahr/eb/index.html; 17 | license = stdenv.lib.licenses.bsd3; 18 | maintainers = [ stdenv.lib.maintainers.auntie ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /pkgs/libswc/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, fetchgit, fontconfig, libdrm, libevdev, libinput, libwld, libxcb, libxkbcommon, pixman, pkgconfig, udev, wayland, xcbutilwm, ... }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "libswc-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = "https://github.com/michaelforney/swc.git"; 9 | rev = "4926291e357cec86e91b804124ce533fb5a9b7aa"; 10 | sha256 = "2963eb36dac12c0146705ab2d4fbcd0d7264be29c0b86f260377427e1c043981"; 11 | }; 12 | # src = fetchgit { 13 | # url = "file:///home/auntieneo/code/extern/swc/"; 14 | # rev = "16229f0b14f8406d3d59ba2ba7f64bce15f041a3"; 15 | # sha256 = "8abe3f158a31a361ac479788af8257c07a8991a007b6b78cec3bb9f199c5d039"; 16 | # }; 17 | 18 | buildInputs = [ 19 | fontconfig 20 | libdrm 21 | libevdev 22 | libinput 23 | libwld 24 | libxcb 25 | libxkbcommon 26 | pixman 27 | pkgconfig 28 | udev 29 | wayland 30 | xcbutilwm 31 | ]; 32 | 33 | makeFlags = "-e PREFIX=\${out}"; 34 | 35 | meta = { 36 | description = "A library for making a simple Wayland compositor"; 37 | homepage = https://github.com/michaelforney/swc; 38 | license = stdenv.lib.licenses.mit; 39 | maintainers = [ stdenv.lib.maintainers.auntie ]; 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /pkgs/libwld/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, fontconfig, libdrm, pixman, pkgconfig, wayland, ... }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "libwld-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = "https://github.com/michaelforney/wld.git"; 9 | rev = "efe0a1ed1856a2e4a1893ed0f2d7dde43b5627f0"; 10 | sha256 = "52e4f64d5086c7b3273403987ff42174ed69bfcf913d4b82f729d7be770728d9"; 11 | }; 12 | 13 | buildInputs = [ 14 | fontconfig 15 | libdrm 16 | pixman 17 | pkgconfig 18 | wayland 19 | ]; 20 | 21 | makeFlags = "-e PREFIX=\${out}"; 22 | 23 | # NOTE: swc-launch requires set-uid to become DRM master 24 | # See 25 | meta = { 26 | description = "A primitive drawing library targeted at Wayland"; 27 | homepage = https://github.com/michaelforney/wld; 28 | license = stdenv.lib.licenses.mit; 29 | maintainers = [ stdenv.lib.maintainers.auntie ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /pkgs/makehuman/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, unzip, makeWrapper, python, pythonPackages }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "makehuman-${version}"; 5 | version = "1.0.2"; 6 | 7 | src = fetchurl { 8 | url = "https://bitbucket.org/MakeHuman/makehuman/get/${version}.zip"; 9 | sha256 = "1nad29y3hn4wdxjmm0640pvhly3ric66yajk9qnja0zf1vd0z89j"; 10 | }; 11 | 12 | buildInputs = [ makeWrapper python unzip ]; 13 | propagatedBuildInputs = with pythonPackages; [ numpy pyopengl pyqt5 ]; 14 | 15 | buildPhase = '' 16 | ''; 17 | 18 | installPhase = '' 19 | mkdir "$out" 20 | cp -R * "$out"/ 21 | 22 | wrapProgram "$out"/makehuman/makehuman \ 23 | --prefix PYTHONPATH : "$PYTHONPATH" 24 | ''; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/ospray/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, cmake, ispc, tbb, mesa, freeglut, qt48Full }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "ospray-${version}"; 5 | version = "0.9.1"; 6 | 7 | src = fetchurl { 8 | url = "https://github.com/ospray/OSPRay/archive/v${version}.tar.gz"; 9 | sha256 = "1rxhmy6213srrqzyikzhk29gwjayrn8xjv22i6zd4wh9if6rpf3d"; 10 | }; 11 | 12 | buildInputs = [ cmake ispc tbb mesa freeglut qt48Full ]; 13 | } 14 | -------------------------------------------------------------------------------- /pkgs/osvr-core/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, cmake, boost, jsoncpp, libusb1, opencv, osvr-libfunctionality, python, SDL2 }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "osvr-core-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = https://github.com/OSVR/OSVR-Core.git; 9 | rev = "01950205a6b1f043dd1bab490df5561eed2709a1"; 10 | sha256 = "77968282a7948a116c629af4dbfb9e6015e3ff80a8aa163ebeea23a2f2047459"; 11 | }; 12 | 13 | buildInputs = [ cmake boost jsoncpp libusb1 opencv osvr-libfunctionality python SDL2 ]; 14 | } 15 | -------------------------------------------------------------------------------- /pkgs/osvr-libfunctionality/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, cmake }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "osvr-libfunctionality-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = https://github.com/OSVR/libfunctionality.git; 9 | rev = "315e78670551e10ebd1a4e86953a571561c0ee85"; 10 | sha256 = "b144b295a619b0f63674d559df36dd2c9df0ad62aa2ca29bcff003d169842daa"; 11 | }; 12 | 13 | buildInputs = [ cmake ]; 14 | } 15 | -------------------------------------------------------------------------------- /pkgs/osvr-tracker-viewer/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, boost, cmake, mesa, openscenegraph, osvr-core }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "osvr-tracker-viewer-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = https://github.com/OSVR/OSVR-Tracker-Viewer.git; 9 | rev = "17fe3f6e91834447e317a6c35bd507ac0b545a68"; 10 | sha256 = "b6dbe3d0c56a06a21b3dfe0b55e66fa2daa8321bfcefd50e44298e60d0723c89"; 11 | }; 12 | 13 | buildInputs = [ boost cmake mesa openscenegraph osvr-core ]; 14 | } 15 | -------------------------------------------------------------------------------- /pkgs/pcsx2/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, fetchurl, p7zip, alsaLib, bzip2, cmake, gettext, glew, glib, glibcLocales, gtk2, libaio, libjpeg, libpthreadstubs, libXdmcp, libxshmfence, mesa, nvidia_cg_toolkit, perl, pkgconfig, portaudio, SDL, soundtouch, sparsehash, wxGTK30, zlib }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "pcsx2-${version}"; 5 | version = "1.3.1"; 6 | 7 | src = fetchgit { 8 | url = https://github.com/PCSX2/pcsx2.git; 9 | rev = "refs/tags/v${version}"; 10 | sha256 = "2f8a5fa3d1633ab2755b1613daaf0de4666cf91e0ba5e5992745435ce6c39d68"; 11 | }; 12 | 13 | # src = fetchurl { 14 | # name = "pcsx2-1.2.1-sources.7z"; 15 | # url = http://pcsx2.net/download/releases/source-code/finish/7-source/121-pcsx2-v1-2-1-source-code/0.html; 16 | # sha256 = "1w35rjzx96ai7z4c8kbq6jxf48j1lg55qkns4mmrsh65n8hxkiy9"; 17 | # }; 18 | 19 | buildInputs = [ 20 | alsaLib bzip2 cmake gettext glew glib glibcLocales gtk2 libaio libjpeg libpthreadstubs libXdmcp libxshmfence mesa 21 | nvidia_cg_toolkit perl pkgconfig portaudio SDL soundtouch sparsehash wxGTK30 zlib 22 | ]; 23 | 24 | # unpackPhase = '' 25 | # ${p7zip}/bin/7z x "$src" 26 | # ''; 27 | 28 | cmakeFlags = '' 29 | -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include 30 | -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include 31 | -DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0/gtk 32 | -DPACKAGE_MODE=TRUE 33 | ''; 34 | 35 | # installPhase = '' 36 | # cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DCMAKE_INSTALL_PREFIX="$out" -P cmake_install.cmake 37 | # ''; 38 | 39 | enableParallelBuilding = true; 40 | } 41 | -------------------------------------------------------------------------------- /pkgs/piglit/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, cmake, glproto, libdrm, libpthreadstubs, 2 | libX11, libXau, libXdamage, libXdmcp, libXext, libxshmfence, libXxf86vm, 3 | makeWrapper, mesa, mesa_drivers, pkgconfig, python, pythonPackages, udev, 4 | waffle }: 5 | 6 | stdenv.mkDerivation rec { 7 | name = "piglit-${version}"; 8 | version = "a04c0af968922b694221899d6da5f5a752a304f8"; 9 | 10 | src = fetchgit { 11 | url = git://anongit.freedesktop.org/git/piglit; 12 | rev = "${version}"; 13 | sha256 = "6989b07fee2b3e716deaf37d948b62b05cfc74f77281a52fdc788b83666071c5"; 14 | }; 15 | 16 | patches = [ 17 | # The wrapper provided with piglit expects itself to be named 'piglit.py'. 18 | # This patch accounts for the fact that wrapProgram will rename that 19 | # wrapper script to '.piglit-wrapped'. 20 | ./hack-for-wrapper.patch 21 | ]; 22 | 23 | buildInputs = [ cmake glproto libdrm libpthreadstubs 24 | libX11 libXau libXdamage libXdmcp libXext libxshmfence libXxf86vm 25 | makeWrapper mesa pkgconfig python udev waffle ]; 26 | propagatedBuildInputs = with pythonPackages; [ Mako numpy six ]; 27 | 28 | postInstall = '' 29 | # piglit might be testing a specific version of Mesa's DRI drivers, but in 30 | # NixOS DRI drivers are typically search for at runtime in 31 | # "/run/opengl-driver{,-32}/lib/*". We make an exception to that rule here. 32 | wrapProgram "$out"/bin/piglit \ 33 | --prefix PYTHONPATH : "$PYTHONPATH" \ 34 | --set LIBGL_DRIVERS_PATH "${mesa_drivers}/lib:${mesa_drivers}/lib/dri" 35 | ''; 36 | } 37 | -------------------------------------------------------------------------------- /pkgs/piglit/hack-for-wrapper.patch: -------------------------------------------------------------------------------- 1 | diff --git a/piglit b/piglit 2 | index 5ae43e9..7360a99 100755 3 | --- a/piglit 4 | +++ b/piglit 5 | @@ -89,7 +89,7 @@ def setup_module_search_path(): 6 | # ${prefix}/${libdir}/${script_name}/framework -> Piglit framework module. 7 | # 8 | abs_bindir = abs_script_dir 9 | - script_basename_noext = os.path.splitext(os.path.basename(__file__))[0] 10 | + script_basename_noext = 'piglit' 11 | for libdir in ('lib64', 'lib32', 'lib'): 12 | abs_libdir = path.normpath(path.join(abs_bindir, '..', libdir)) 13 | abs_data_dir = path.join(abs_libdir, script_basename_noext) 14 | -------------------------------------------------------------------------------- /pkgs/polish-shell/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, bison, cmake, flex }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "polish-shell-${version}"; 5 | version = "cd8e1c9bdcb6afb78d8c35140a8545bc83d3cf4c"; 6 | 7 | src = fetchurl { 8 | url = "https://github.com/auntieNeo/polish-shell/archive/${version}.tar.gz"; 9 | sha256 = "b558fd1e6c41051cf819262cfe938ceaafd362dcad0a0e6a4854df6f27b0001d"; 10 | }; 11 | 12 | buildInputs = [ bison cmake flex ]; 13 | 14 | meta = { 15 | description = "A mixed polish notation (prefix and RPN) shell experiment"; 16 | homepage = https://github.com/auntieNeo/polish-shell; 17 | license = stdenv.lib.licenses.gpl3; 18 | maintainers = [ stdenv.lib.maintainers.auntie ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /pkgs/popcorn-time/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit }: 2 | 3 | stdenv.mkDerivation rec { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /pkgs/pwclient/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, makeWrapper, python }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "pwclient-${version}"; 5 | version = "git-${rev}"; 6 | rev = "8904a7dcaf959da8db4a9a5d92b91a61eed05201"; 7 | 8 | src = fetchgit { 9 | url = "git://ozlabs.org/home/jk/git/patchwork"; 10 | rev = "${rev}"; 11 | sha256 = "c5f4ea659795b63f35ef9c8eaa74c0a701df12042a24b51a2b8fe82465258b35"; 12 | }; 13 | 14 | buildInputs = [ makeWrapper python ]; 15 | 16 | dontBuild = true; 17 | 18 | installPhase = '' 19 | mkdir -p "$out"/bin 20 | 21 | cp ./apps/patchwork/bin/pwclient "$out"/bin/pwclient 22 | 23 | wrapProgram "$out"/bin/pwclient --prefix PYTHONPATH : "$PYTHONPATH" 24 | ''; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/qtsixa/QtSixA-1.5.1-unistd-fix.patch: -------------------------------------------------------------------------------- 1 | diff -rupN QtSixA-1.5.1/sixad/bluetooth.cpp QtSixA-1.5.1-sf-1/sixad/bluetooth.cpp 2 | --- QtSixA-1.5.1/sixad/bluetooth.cpp 2011-10-12 12:03:39.000000000 -0400 3 | +++ QtSixA-1.5.1-sf-1/sixad/bluetooth.cpp 2014-02-01 14:20:24.095050015 -0500 4 | @@ -25,7 +25,7 @@ 5 | #include 6 | #include 7 | #include 8 | - 9 | +#include 10 | #include 11 | #include 12 | #include 13 | diff -rupN QtSixA-1.5.1/sixad/sixad-3in1.cpp QtSixA-1.5.1-sf-1/sixad/sixad-3in1.cpp 14 | --- QtSixA-1.5.1/sixad/sixad-3in1.cpp 2011-10-12 11:53:04.000000000 -0400 15 | +++ QtSixA-1.5.1-sf-1/sixad/sixad-3in1.cpp 2014-02-01 14:22:33.895042754 -0500 16 | @@ -25,6 +25,7 @@ 17 | #include 18 | #include 19 | #include 20 | +#include 21 | 22 | #define KEYMOTE_KEY_SELECT 1 << 0 23 | #define KEYMOTE_KEY_START 1 << 1 24 | diff -rupN QtSixA-1.5.1/sixad/sixad-bin.cpp QtSixA-1.5.1-sf-1/sixad/sixad-bin.cpp 25 | --- QtSixA-1.5.1/sixad/sixad-bin.cpp 2011-10-11 20:21:37.000000000 -0400 26 | +++ QtSixA-1.5.1-sf-1/sixad/sixad-bin.cpp 2014-02-01 14:20:03.239051181 -0500 27 | @@ -22,7 +22,7 @@ 28 | #include 29 | #include 30 | #include 31 | - 32 | +#include 33 | #if 0 34 | #include 35 | 36 | diff -rupN QtSixA-1.5.1/sixad/sixad-raw.cpp QtSixA-1.5.1-sf-1/sixad/sixad-raw.cpp 37 | --- QtSixA-1.5.1/sixad/sixad-raw.cpp 2011-10-11 16:00:41.000000000 -0400 38 | +++ QtSixA-1.5.1-sf-1/sixad/sixad-raw.cpp 2014-02-01 14:22:08.095044197 -0500 39 | @@ -22,7 +22,7 @@ 40 | #include 41 | #include 42 | #include 43 | - 44 | +#include 45 | int main(int argc, char **argv) 46 | { 47 | int i, fd, nr; 48 | diff -rupN QtSixA-1.5.1/sixad/sixad-remote.cpp QtSixA-1.5.1-sf-1/sixad/sixad-remote.cpp 49 | --- QtSixA-1.5.1/sixad/sixad-remote.cpp 2011-10-12 09:22:19.000000000 -0400 50 | +++ QtSixA-1.5.1-sf-1/sixad/sixad-remote.cpp 2014-02-01 14:21:45.963045435 -0500 51 | @@ -27,7 +27,7 @@ 52 | #include 53 | #include 54 | #include 55 | - 56 | +#include 57 | int csk = 0; 58 | int isk = 1; 59 | int debug; 60 | diff -rupN QtSixA-1.5.1/sixad/sixad-sixaxis.cpp QtSixA-1.5.1-sf-1/sixad/sixad-sixaxis.cpp 61 | --- QtSixA-1.5.1/sixad/sixad-sixaxis.cpp 2011-10-11 20:58:37.000000000 -0400 62 | +++ QtSixA-1.5.1-sf-1/sixad/sixad-sixaxis.cpp 2014-02-01 14:20:47.611048699 -0500 63 | @@ -27,7 +27,7 @@ 64 | #include 65 | #include 66 | #include 67 | - 68 | +#include 69 | int csk = 0; 70 | int isk = 1; 71 | int debug; 72 | -------------------------------------------------------------------------------- /pkgs/qtsixa/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, bluez, libusb, libjack2, pkgconfig, pyqt4 }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "qtsixa-${version}"; 5 | version = "1.5.1"; 6 | 7 | src = fetchurl { 8 | url = "mirror://sourceforge/qtsixa/QtSixA%20${version}/QtSixA-${version}-src.tar.gz"; 9 | sha256 = "1zrn2c8b1dclc11y0795g6qghg6lflyx0jypjijj8f7snkws84a1"; 10 | }; 11 | 12 | patches = [ ./QtSixA-1.5.1-unistd-fix.patch ]; 13 | 14 | buildInputs = [ bluez libusb libjack2 pkgconfig pyqt4 ]; 15 | 16 | installPhase = '' 17 | make DESTDIR="$out" install 18 | mv "$out"/usr/{bin,sbin,share} "$out" 19 | rmdir "$out"/usr 20 | chmod -R +x "$out"/bin 21 | ''; 22 | } 23 | -------------------------------------------------------------------------------- /pkgs/qtspim/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchsvn, qt5, bison, flex }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "qtspim-${version}"; 5 | version = "9.1.16"; # version number is specified in the revision message 6 | revision = "660"; 7 | 8 | src = fetchsvn { 9 | url = svn://svn.code.sf.net/p/spimsimulator/code; 10 | rev = "${revision}"; 11 | sha256 = "1frfvhh0qwi37zxh0ly2bmwv2x83amb4ys9abyjcj5pafk9637p6"; 12 | }; 13 | 14 | patches = [ ./fix-bool-int-declarations.patch ]; 15 | 16 | buildInputs = [ qt5.base qt5.tools bison flex ]; 17 | 18 | configurePhase = '' 19 | cd QtSpim && qmake 'QMAKE_CFLAGS_RELEASE += "-x c++ -Wno-write-strings"' PREFIX=$out 20 | ''; 21 | 22 | installPhase = '' 23 | mkdir -p $out/bin 24 | cp ./QtSpim $out/bin/ 25 | ''; 26 | } 27 | -------------------------------------------------------------------------------- /pkgs/qtspim/fix-bool-int-declarations.patch: -------------------------------------------------------------------------------- 1 | diff -Naurp qtspim/CPU/parser.h qtspim-patched/CPU/parser.h 2 | --- qtspim/CPU/parser.h 2015-11-15 14:24:08.013922133 -0700 3 | +++ qtspim-patched/CPU/parser.h 2015-11-15 14:38:17.496414415 -0700 4 | @@ -43,8 +43,8 @@ int yyparse (); 5 | 6 | /* Exported Variables: */ 7 | 8 | -extern bool data_dir; /* => item in data segment */ 9 | +extern int data_dir; /* => item in data segment */ 10 | 11 | -extern bool text_dir; /* => item in text segment */ 12 | +extern int text_dir; /* => item in text segment */ 13 | 14 | -extern bool parse_error_occurred; /* => parse resulted in error */ 15 | +extern int parse_error_occurred; /* => parse resulted in error */ 16 | diff -Naurp qtspim/CPU/parser.y qtspim-patched/CPU/parser.y 17 | --- qtspim/CPU/parser.y 2015-11-15 14:22:20.456137560 -0700 18 | +++ qtspim-patched/CPU/parser.y 2015-11-15 14:22:08.161818292 -0700 19 | @@ -466,11 +466,11 @@ typedef struct ll 20 | 21 | /* Exported Variables: */ 22 | 23 | -bool data_dir; /* => item in data segment */ 24 | +int data_dir; /* => item in data segment */ 25 | 26 | -bool text_dir; /* => item in text segment */ 27 | +int text_dir; /* => item in text segment */ 28 | 29 | -bool parse_error_occurred; /* => parse resulted in error */ 30 | +int parse_error_occurred; /* => parse resulted in error */ 31 | 32 | 33 | /* Local functions: */ 34 | -------------------------------------------------------------------------------- /pkgs/sipp/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, autoconf, automake, ncurses }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "sipp-${version}"; 5 | version = "3.4.1"; 6 | 7 | src = fetchurl { 8 | url = "https://github.com/SIPp/sipp/archive/v${version}.tar.gz"; 9 | sha256 = "1i1bm1viz9ak6vncqgm8p7gv94i61vj7vkgz11gqp3dgyfhjjs5v"; 10 | }; 11 | 12 | patches = [ ./fix-configure.patch ]; 13 | 14 | buildInputs = [ autoconf automake ncurses ]; 15 | 16 | preConfigure = '' 17 | automake --add-missing 18 | autoreconf 19 | ''; 20 | 21 | meta = { 22 | description = "Test tool and traffic generator for the SIP protocol"; 23 | homepage = http://sipp.sourceforge.net/; 24 | license = stdenv.lib.licenses.gpl2; 25 | maintainers = [ stdenv.lib.maintainers.auntie ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/sipp/fix-configure.patch: -------------------------------------------------------------------------------- 1 | diff -rupN sipp-3.4.1/configure.ac sipp-3.4.1-patched/configure.ac 2 | --- sipp-3.4.1/configure.ac 2014-03-09 13:04:57.000000000 -0600 3 | +++ sipp-3.4.1-patched/configure.ac 2015-04-02 00:26:21.929072408 -0600 4 | @@ -54,7 +54,7 @@ case "$host" in 5 | esac 6 | 7 | # ==================== checks for libraries ============================= 8 | -AC_CHECK_LIB(curses,initscr,,[AC_MSG_ERROR([ncurses library missing])]) 9 | +AC_CHECK_LIB(ncurses,initscr,,[AC_MSG_ERROR([ncurses library missing])]) 10 | AC_CHECK_LIB(pthread, pthread_mutex_init, THREAD_LIBS="-lpthread", 11 | AC_MSG_ERROR(pthread library needed!)) 12 | 13 | @@ -161,11 +161,11 @@ fi 14 | # For Makefile.am 15 | AM_CONDITIONAL(HAVE_GSL, test "$gsl" = "yes") 16 | 17 | -AX_HAVE_EPOLL([AX_CONFIG_FEATURE_ENABLE(epoll)], 18 | - [AX_CONFIG_FEATURE_DISABLE(epoll)]) 19 | -AX_CONFIG_FEATURE([epoll], [This platform supports epoll(7)], 20 | - [HAVE_EPOLL], [This platform supports epoll(7).], 21 | - [epoll="yes"], [epoll="no"]) 22 | +#AX_HAVE_EPOLL([AX_CONFIG_FEATURE_ENABLE(epoll)], 23 | +# [AX_CONFIG_FEATURE_DISABLE(epoll)]) 24 | +#AX_CONFIG_FEATURE([epoll], [This platform supports epoll(7)], 25 | +# [HAVE_EPOLL], [This platform supports epoll(7).], 26 | +# [epoll="yes"], [epoll="no"]) 27 | 28 | AM_CONDITIONAL(HAVE_EPOLL, test "$epoll" = "yes") 29 | # ==================== checks for header files ========================== 30 | -------------------------------------------------------------------------------- /pkgs/spawner/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, makeWrapper, fetchurl, fpc, lazarus, gdk_pixbuf, gnome, xorg, glib, cairo, atk }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "spawner-${version}"; 5 | version = "0.2.3"; 6 | 7 | src = fetchurl { 8 | url = "mirror://sourceforge/spawner/spawner/${name}/${name}-src.tar.gz"; 9 | sha256 = "097dp5dwcy0f1fx0anlv54i8a9ahgaq5gjjk0mh595gcx9zg7fqp"; 10 | }; 11 | 12 | buildInputs = [ makeWrapper fpc lazarus gdk_pixbuf gnome.gtk xorg.libX11 glib cairo atk ]; 13 | 14 | buildPhase = '' 15 | mkdir -p ./home/.lazarus 16 | lazbuild --widgetset=gtk2 --primary-config-path=./home/.lazarus --lazarusdir=${lazarus}/share/lazarus program.lpi 17 | ''; 18 | 19 | installPhase = '' 20 | ls ${xorg.libX11}/lib 21 | mkdir -p "$out"/bin 22 | cp ./bin/spawner "$out"/bin/ 23 | wrapProgram "$out"/bin/spawner \ 24 | --prefix LD_LIBRARY_PATH ':' "${gnome.gtk}/lib" \ 25 | --prefix LD_LIBRARY_PATH ':' "${xorg.libX11}/lib" \ 26 | --prefix LD_LIBRARY_PATH ':' "${gdk_pixbuf}/lib" \ 27 | --prefix LD_LIBRARY_PATH ':' "${glib}/lib" \ 28 | --prefix LD_LIBRARY_PATH ':' "${gnome.pango}/lib" \ 29 | --prefix LD_LIBRARY_PATH ':' "${cairo}/lib" \ 30 | --prefix LD_LIBRARY_PATH ':' "${atk}/lib" 31 | ''; 32 | } 33 | -------------------------------------------------------------------------------- /pkgs/speech_tools/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, ncurses }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "speech_tools-${version}"; 5 | version = "2.4"; 6 | 7 | src = fetchurl { 8 | url = "http://festvox.org/packed/festival/2.4/speech_tools-${version}-release.tar.gz"; 9 | sha256 = "043h4fxfiiqxgwvyyyasylypjkpfzajxd6g5s9wsl69r8hn4ihpv"; 10 | }; 11 | 12 | buildInputs = [ ncurses ]; 13 | 14 | preBuild = '' 15 | # Fix some executable paths in makefiles 16 | for i in /usr/bin/printf /bin/rm; do 17 | base=$(basename "$i") 18 | grep -Rl "$i" . \ 19 | | xargs sed -i 's|'"$i"'|/usr/bin/env '"$base"'|' 20 | done 21 | ''; 22 | 23 | installPhase = '' 24 | for d in lib bin include config base_class; do 25 | mkdir -p "$out"/"$d" 26 | done 27 | find ./lib -type f -name '*.a' \ 28 | -exec cp '{}' "$out"/lib \; 29 | mkdir -p "$out"/lib/siod 30 | find ./lib/siod -type f -name '*.scm' \ 31 | -exec cp '{}' "$out"/lib/siod \; 32 | find ./bin ./main -type f -executable \ 33 | -exec cp '{}' "$out"/bin \; 34 | cp -r ./include/* "$out"/include 35 | find ./include -type f -name Makefile \ 36 | -exec rm '{}' + 37 | # Unfortunately, Festival shares some common build routines with 38 | # speech_tools, so we'll copy ./config to the derivation. It can't be 39 | # helped. 40 | cp -r ./config/* "$out"/config 41 | # The speech_tools header files reference some C++ templates outside of 42 | # the ./include directory. Again, this is unfortunate, but it can't be 43 | # helped. 44 | cp -r ./base_class/* "$out"/base_class 45 | find "$out"/base_class -type f \ 46 | -name '*.o' \ 47 | -o -name Makefile \ 48 | -o -name make.depend \ 49 | -exec rm '{}' + 50 | ''; 51 | 52 | meta = with stdenv.lib; { 53 | description = "Libraries and utilities used in speech software"; 54 | homepage = http://www.cstr.ed.ac.uk/projects/festival/; 55 | license = licenses.bsdOriginal; 56 | maintainers = with maintainers; [ auntie ]; 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /pkgs/spim/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "spim-${version}"; 5 | version = 6 | } 7 | -------------------------------------------------------------------------------- /pkgs/st-wl/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, fontconfig, libwld, libxkbcommon, ncurses, pixman, pkgconfig, wayland }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "st-wl-${version}"; 5 | version = "cb8abfd49d35df14aed49664608955c9af170ff5"; 6 | 7 | src = fetchgit { 8 | url = "https://github.com/michaelforney/st.git"; 9 | rev = "61b47b76a09599c8093214e28c48938f5b424daa"; 10 | sha256 = "b08e9907a7899ac9ad864a361d7dc33f6a0b5b125844ee6527900b771b844a27"; 11 | }; 12 | 13 | buildInputs = [ fontconfig libwld libxkbcommon ncurses pixman pkgconfig wayland ]; 14 | 15 | NIX_LDFLAGS = "-lfontconfig -lwayland-client -lwayland-cursor -lwld -lxkbcommon"; 16 | 17 | installPhase = '' 18 | TERMINFO=$out/share/terminfo make install PREFIX=$out 19 | ''; 20 | 21 | preFixup = '' 22 | mv $out/bin/st $out/bin/st-wl 23 | ''; 24 | 25 | meta = { 26 | description = "simple terminal emulator for swc/wayland which sucks less"; 27 | homepage = https://github.com/michaelforney/st; 28 | license = stdenv.lib.licenses.mit; 29 | maintainers = [ stdenv.lib.maintainers.auntie ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /pkgs/steam/chrootenv.nix: -------------------------------------------------------------------------------- 1 | { lib, buildFHSUserEnv, config }: 2 | 3 | buildFHSUserEnv { 4 | name = "steam"; 5 | 6 | targetPkgs = pkgs: 7 | [ pkgs.steam-original 8 | pkgs.corefonts 9 | pkgs.curl 10 | pkgs.dbus 11 | pkgs.dpkg 12 | pkgs.mono 13 | pkgs.python 14 | pkgs.gnome2.zenity 15 | pkgs.xdg_utils 16 | ] 17 | ++ lib.optional (config.steam.java or false) pkgs.jdk 18 | ++ lib.optional (config.steam.primus or false) pkgs.primus 19 | ; 20 | 21 | multiPkgs = pkgs: 22 | [ pkgs.cairo 23 | pkgs.glib 24 | pkgs.gtk 25 | pkgs.gdk_pixbuf 26 | pkgs.pango 27 | 28 | pkgs.freetype 29 | pkgs.xlibs.libICE 30 | pkgs.xlibs.libSM 31 | pkgs.xlibs.libX11 32 | pkgs.xlibs.libXau 33 | pkgs.xlibs.libxcb 34 | pkgs.xlibs.libXcursor 35 | pkgs.xlibs.libXdamage 36 | pkgs.xlibs.libXdmcp 37 | pkgs.xlibs.libXext 38 | pkgs.xlibs.libXfixes 39 | pkgs.xlibs.libXi 40 | pkgs.xlibs.libXinerama 41 | pkgs.xlibs.libXrandr 42 | pkgs.xlibs.libXrender 43 | pkgs.xlibs.libXScrnSaver 44 | pkgs.xlibs.libXtst 45 | pkgs.xlibs.libXxf86vm 46 | 47 | pkgs.ffmpeg 48 | pkgs.libpng12 49 | pkgs.mesa 50 | pkgs.SDL 51 | pkgs.SDL2 52 | 53 | pkgs.libgcrypt 54 | pkgs.zlib 55 | 56 | pkgs.alsaLib 57 | pkgs.libvorbis 58 | pkgs.openal 59 | pkgs.libpulseaudio 60 | 61 | # pkgs.flashplayer 62 | 63 | pkgs.gst_all_1.gst-plugins-ugly # "Audiosurf 2" needs this 64 | pkgs.wqy_microhei # For the Japanese version of Hatoful Boyfriend 65 | ]; 66 | 67 | extraBuildCommandsMulti = '' 68 | cd usr/lib 69 | ln -sf ../lib64/steam steam 70 | ''; 71 | 72 | profile = '' 73 | # Ugly workaround for https://github.com/ValveSoftware/steam-for-linux/issues/3504 74 | export LD_PRELOAD=/lib32/libpulse.so:/lib64/libpulse.so:/lib32/libasound.so:/lib64/libasound.so 75 | ''; 76 | 77 | runScript = "steam"; 78 | } 79 | -------------------------------------------------------------------------------- /pkgs/tesseract/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, mesa, SDL2, SDL2_image, SDL2_mixer }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "tesseract-game-${version}"; 5 | version = "git"; 6 | 7 | src = fetchgit { 8 | url = file:///home/auntieneo/code/tesseract; 9 | rev = "refs/heads/master"; 10 | # r!printf ' sha256 = "\%s";' `nix-prefetch-git file:///home/auntieneo/code/tesseract --rev refs/heads/master 2>&/dev/null | tail -n1` 11 | sha256 = "b1682755f93e14fc8065a46cb6e206ab947f26468bc19fce4bd3c1ef421170be"; 12 | }; 13 | 14 | buildInputs = [ mesa SDL2 SDL2_image SDL2_mixer ]; 15 | 16 | preBuild = '' 17 | cd src 18 | ''; 19 | 20 | installPhase = '' 21 | cd .. 22 | 23 | mkdir -p "$out"/share/tesseract 24 | cp -r ./media ./config ./src/tess_{client,server} "$out"/share/tesseract/ 25 | 26 | # Make a short script for the client executable 27 | mkdir -p "$out"/bin 28 | cp ${./tess_client} "$out"/bin/tess_client 29 | sed -i 's|@tess_data@|'"$out"'/share/tesseract|g' \ 30 | "$out"/bin/tess_client 31 | ''; 32 | } 33 | -------------------------------------------------------------------------------- /pkgs/tesseract/tess_client: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # TESS_DATA should refer to the directory in which Tesseract data files are placed. 3 | TESS_DATA="@tess_data@" 4 | 5 | # TESS_BIN should refer to the directory in which Tesseract executable files are placed. 6 | TESS_BIN="${TESS_DATA}" 7 | 8 | # TESS_OPTIONS contains any command line options you would like to start Tesseract with. 9 | #TESS_OPTIONS="" 10 | TESS_OPTIONS="-u${HOME}/.tesseract" 11 | 12 | if [ -x ${TESS_BIN}/tess_client ] 13 | then 14 | cd ${TESS_DATA} 15 | exec ${TESS_BIN}/tess_client ${TESS_OPTIONS} "$@" 16 | else 17 | echo "Could not find Tesseract client." 18 | exit 1 19 | fi 20 | 21 | -------------------------------------------------------------------------------- /pkgs/tots/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, 2 | boost, cmake, glew, gmock, graphviz, gtest, lua5_2, mesa, pkgconfig, SDL2 3 | }: 4 | 5 | stdenv.mkDerivation rec { 6 | name = "tots-${version}"; 7 | version = "git"; 8 | 9 | src = fetchgit { 10 | url = "file:///home/auntieneo/code/tots"; 11 | rev = "refs/heads/game_loop"; 12 | sha256 = "ece41f1607e28bc5bcf7ea2d768487159bd154a0db3c2d393566ce634f96819b"; 13 | }; 14 | 15 | buildInputs = [ boost cmake glew gmock gtest SDL2 ]; 16 | } 17 | -------------------------------------------------------------------------------- /pkgs/unison/unison-2.40.102.nix: -------------------------------------------------------------------------------- 1 | {stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper, ncurses 2 | , enableX11 ? true}: 3 | 4 | stdenv.mkDerivation (rec { 5 | 6 | name = "unison-2.40.102"; 7 | src = fetchurl { 8 | url = "http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/${name}.tar.gz"; 9 | sha256 = "0m78q5vnsric1virvkmxxx32ipaq0cnj0kbirdbg36395gq94jix"; 10 | }; 11 | 12 | buildInputs = [ ocaml makeWrapper ncurses ]; 13 | 14 | preBuild = if enableX11 then '' 15 | sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" Makefile.OCaml 16 | '' else ""; 17 | 18 | makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then " UISTYLE=gtk2" else "") 19 | + (if ! ocaml.nativeCompilers then " NATIVE=false" else ""); 20 | 21 | preInstall = "mkdir -p $out/bin"; 22 | 23 | postInstall = if enableX11 then '' 24 | for i in $(cd $out/bin && ls); do 25 | wrapProgram $out/bin/$i \ 26 | --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")" 27 | done 28 | '' else ""; 29 | 30 | dontStrip = !ocaml.nativeCompilers; 31 | 32 | meta = { 33 | homepage = http://www.cis.upenn.edu/~bcpierce/unison/; 34 | description = "Bidirectional file synchronizer"; 35 | license = "GPLv3+"; 36 | maintainers = with stdenv.lib.maintainers; [viric]; 37 | platforms = with stdenv.lib.platforms; linux; 38 | }; 39 | 40 | }) 41 | -------------------------------------------------------------------------------- /pkgs/velox/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, fontconfig, libswc, libwld, libxkbcommon, pixman, pkgconfig, wayland }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "velox-${version}"; 5 | version = "4e549c62392032ac0c67dd1a135d56f7a99e6c06"; 6 | 7 | src = fetchurl { 8 | url = "https://github.com/michaelforney/velox/archive/${version}.tar.gz"; 9 | sha256 = "c0a7c8ceccc5a536ba48c7b3266fda76392097a5be93cbea27c65a1171f53173"; 10 | }; 11 | 12 | buildInputs = [ fontconfig libswc libwld libxkbcommon pixman pkgconfig wayland ]; 13 | 14 | makeFlags = "PREFIX=\${out}"; 15 | 16 | meta = { 17 | description = "Simple window manager based on swc"; 18 | homepage = https://github.com/michaelforney/velox; 19 | license = stdenv.lib.licenses.mit; 20 | maintainers = [ stdenv.lib.maintainers.auntie ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /pkgs/virt-manager/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl, python 2 | , makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte 3 | , gtk3, gobjectIntrospection, libvirt-glib, gsettings_desktop_schemas, glib 4 | , avahi, dconf, spiceSupport ? true, spice_gtk, libosinfo 5 | }: 6 | 7 | with stdenv.lib; 8 | with pythonPackages; 9 | 10 | buildPythonPackage rec { 11 | name = "virt-manager-${version}"; 12 | version = "1.2.1"; 13 | namePrefix = ""; 14 | 15 | src = fetchurl { 16 | url = "http://virt-manager.org/download/sources/virt-manager/${name}.tar.gz"; 17 | sha256 = "1gp6ijrwl6kjs54l395002pc9sblp08p4nqx9zcb9qg5f87aifvl"; 18 | }; 19 | 20 | propagatedBuildInputs = 21 | [ eventlet greenlet gflags netaddr sqlalchemy carrot routes 22 | paste_deploy m2crypto ipy twisted sqlalchemy_migrate 23 | distutils_extra simplejson readline glance cheetah lockfile httplib2 24 | urlgrabber virtinst pyGtkGlade pythonDBus gnome_python pygobject3 25 | libvirt libxml2Python ipaddr vte libosinfo 26 | ] ++ optional spiceSupport spice_gtk; 27 | 28 | buildInputs = 29 | [ mox 30 | intltool 31 | gtkvnc 32 | gtk3 33 | libvirt-glib 34 | avahi 35 | glib 36 | gobjectIntrospection 37 | gsettings_desktop_schemas 38 | ]; 39 | 40 | configurePhase = '' 41 | sed -i 's/from distutils.core/from setuptools/g' setup.py 42 | sed -i 's/from distutils.command.install/from setuptools.command.install/g' setup.py 43 | python setup.py configure --prefix=$out 44 | ''; 45 | 46 | buildPhase = "true"; 47 | 48 | postInstall = '' 49 | # GI_TYPELIB_PATH is needed at runtime for GObject stuff to work 50 | for file in "$out"/bin/*; do 51 | wrapProgram "$file" \ 52 | --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \ 53 | --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" \ 54 | --prefix GSETTINGS_SCHEMA_DIR : $out/share/glib-2.0/schemas \ 55 | --prefix XDG_DATA_DIRS : "$out/share:${gtk3}/share:$GSETTINGS_SCHEMAS_PATH:\$XDG_DATA_DIRS" 56 | done 57 | 58 | ${glib}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas 59 | ''; 60 | 61 | # Failed tests 62 | doCheck = false; 63 | 64 | meta = with stdenv.lib; { 65 | homepage = http://virt-manager.org; 66 | description = "Desktop user interface for managing virtual machines"; 67 | longDescription = '' 68 | The virt-manager application is a desktop user interface for managing 69 | virtual machines through libvirt. It primarily targets KVM VMs, but also 70 | manages Xen and LXC (linux containers). 71 | ''; 72 | license = licenses.gpl2; 73 | maintainers = with maintainers; [qknight offline]; 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /pkgs/waffle/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchurl, cmake, libX11, mesa, pkgconfig, udev }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "waffle-${version}"; 5 | version = "1.5.1"; 6 | 7 | src = fetchurl { 8 | url = "http://www.waffle-gl.org/files/release/waffle-${version}/waffle-${version}.tar.xz"; 9 | sha256 = "1ai0zqmrpma0zdcpdl20bxz30cxy0jpsb2ghif0lw1hmcn90xayb"; 10 | }; 11 | 12 | buildInputs = [ cmake libX11 mesa pkgconfig udev ]; 13 | 14 | # TODO: More API's can be specified here, but I've only tested GLX for now 15 | cmakeFlags = "-Dwaffle_has_glx=1"; 16 | } 17 | -------------------------------------------------------------------------------- /private/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auntieNeo/nixrc/425c34dc60332945ecbedba832a99a0c8426ad09/private/.gitignore -------------------------------------------------------------------------------- /profiles/android.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # install packages for Android development 5 | environment.systemPackages = with pkgs; [ 6 | # androidndk 7 | # androidsdk 8 | # openvpn 9 | ]; 10 | 11 | # FIXME: Can't seem to get adb to work without root 12 | services.udev.extraRules = 13 | '' 14 | SUBSYSTEM=="usb", ATTR(idVendor)=="18D1", MODE="0666" OWNER="auntieneo" 15 | SUBSYSTEM=="usb", ATTR(idVendor)=="22B8", MODE="0666" OWNER="auntieneo" 16 | ''; 17 | } 18 | -------------------------------------------------------------------------------- /profiles/arduino.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # Enable udev rules for USB teensy 5 | services.udev.extraRules = 6 | '' 7 | # UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/ 8 | # 9 | # The latest version of this file may be found at: 10 | # http://www.pjrc.com/teensy/49-teensy.rules 11 | # 12 | # This file must be placed at: 13 | # 14 | # /etc/udev/rules.d/49-teensy.rules (preferred location) 15 | # or 16 | # /lib/udev/rules.d/49-teensy.rules (req'd on some broken systems) 17 | # 18 | # To install, type this command in a terminal: 19 | # sudo cp 49-teensy.rules /etc/udev/rules.d/49-teensy.rules 20 | # 21 | # After this file is installed, physically unplug and reconnect Teensy. 22 | # 23 | ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" 24 | ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" 25 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" 26 | KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" 27 | # 28 | # If you share your linux system with other users, or just don't like the 29 | # idea of write permission for everybody, you can replace MODE:="0666" with 30 | # OWNER:="yourusername" to create the device owned by you, or with 31 | # GROUP:="somegroupname" and mange access using standard unix groups. 32 | # 33 | # 34 | # If using USB Serial you get a new device each time (Ubuntu 9.10) 35 | # eg: /dev/ttyACM0, ttyACM1, ttyACM2, ttyACM3, ttyACM4, etc 36 | # apt-get remove --purge modemmanager (reboot may be necessary) 37 | # 38 | # Older modem proding (eg, Ubuntu 9.04) caused very slow serial device detection. 39 | # To fix, add this near top of /lib/udev/rules.d/77-nm-probe-modem-capabilities.rules 40 | # SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", GOTO="nm_modem_probe_end" 41 | # 42 | ''; 43 | } 44 | -------------------------------------------------------------------------------- /profiles/audio.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | # Enable PulseAudio 5 | hardware.pulseaudio.enable = true; 6 | 7 | environment.systemPackages = with pkgs; [ 8 | apulse # Allows ALSA applications to use pulse 9 | pavucontrol # PulseAudio volume control 10 | 11 | # Audio tools 12 | audacity 13 | ardour 14 | milkytracker 15 | ]; 16 | 17 | # # Enable HDMI audio for pulse 18 | # hardware.pulseaudio.configFile = pkgs.stdenv.mkDerivation rec { 19 | # name = "pulseaudio-config"; 20 | # buildCommand = '' 21 | # cat ${pkgs.pulseaudioFull}/etc/pulse/default.pa > $out 22 | # echo 'load-module module-alsa-sink device=hw:1,7' >> $out 23 | # ''; 24 | # }; 25 | } 26 | -------------------------------------------------------------------------------- /profiles/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | # List packages installed in system profile. To search by name, run: 5 | # nix-env -qaP | grep wget 6 | environment.systemPackages = with pkgs; [ 7 | ansible 8 | apg 9 | aspell 10 | aspellDicts.en 11 | bind # nslookup, dig 12 | bridge-utils 13 | ctags 14 | expect 15 | fuse 16 | git 17 | gnumake 18 | gnupg 19 | idutils 20 | inetutils 21 | irssi 22 | ledger 23 | links2 24 | # mailutils 25 | # heirloom-mailx # FIXME 26 | manpages 27 | mkpasswd 28 | mosh 29 | most 30 | ncurses 31 | # nkf # TODO: write a package for Network Kanji Filter 32 | nix-prefetch-scripts 33 | p7zip 34 | # pacman # TODO: write a package for Arch Linux's pacman (for creating Arch chroots) 35 | pciutils 36 | pmutils 37 | psmisc 38 | rtorrent 39 | ruby 40 | screen 41 | sshfsFuse 42 | stdenv 43 | sudo 44 | tcpdump 45 | tmux 46 | tmuxinator 47 | # unison 48 | unison_2_40_102 49 | unzip 50 | usbutils 51 | utillinuxCurses 52 | vim_configurable 53 | vlock 54 | wget 55 | wgetpaste 56 | zsh 57 | ]; 58 | 59 | # custom packages 60 | nixpkgs.config.packageOverrides = pkgs: rec { 61 | heirloom-mailx = pkgs.callPackage ../pkgs/heirloom-mailx/default.nix { }; 62 | unison_2_40_102 = pkgs.callPackage ../pkgs/unison/unison-2.40.102.nix { lablgtk = pkgs.ocamlPackages.lablgtk; }; 63 | }; 64 | 65 | # Enable zsh as a login shell 66 | programs.zsh.enable = true; 67 | } 68 | -------------------------------------------------------------------------------- /profiles/development.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # install development packages 5 | environment.systemPackages = with pkgs; [ 6 | binutils 7 | cgdb 8 | cmake 9 | doxygen 10 | gdb 11 | # git-review # TODO 12 | git-lfs 13 | glapse 14 | # godot 15 | mercurial 16 | netbeans 17 | nixopsUnstable 18 | patchutils 19 | python 20 | # polish-shell 21 | # pwclient 22 | R 23 | # rubyLibs.jekyll 24 | scons 25 | sloccount 26 | # subversionClient 27 | valgrind 28 | vimPlugins.latex-box 29 | # vimPlugins.UltiSnips 30 | # vimPlugins.YouCompleteMe # YCM is blocking vim process, probably due to vim plugin architecture. 31 | # afpfs-fuse 32 | ]; 33 | 34 | nixpkgs.config.allowBroken = true; # XXX: This is needed because UE4 depends on a broken build of llvm 35 | 36 | # Enable this to support Unity3D 37 | security.chromiumSuidSandbox.enable = true; 38 | 39 | nix = { 40 | distributedBuilds = false; 41 | # requireSignedBinaryCaches = false; # FIXME 42 | # buildCores = 0; # Use all available CPU cores in the system 43 | buildMachines = [ 44 | { 45 | hostName = "hazuki"; 46 | maxJobs = 8; 47 | sshKey = "/home/auntieneo/.ssh/id_rsa"; 48 | sshUser = "auntieneo"; 49 | system = "x86_64-linux"; 50 | supportedFeatures = [ "kvm" "nixos-test" ]; 51 | } 52 | ]; 53 | }; 54 | 55 | # custom packages 56 | nixpkgs.config.packageOverrides = pkgs: rec { 57 | glapse = pkgs.callPackage ../pkgs/glapse/default.nix { }; 58 | # godot = pkgs.callPackage ../pkgs/godot/default.nix { }; # FIXME 59 | polish-shell = pkgs.callPackage ../pkgs/polish-shell/default.nix { }; 60 | pwclient = pkgs.callPackage ../pkgs/pwclient/default.nix { }; 61 | }; 62 | 63 | system.activationScripts = 64 | { 65 | # install development environments 66 | dev_environments = '' 67 | if [ ! -d /home/auntieneo/.nixpkgs/environments ]; then 68 | mkdir -p /home/auntieneo/.nixpkgs/environments 69 | fi 70 | for f in ${../dotfiles/nixpkgs/environments}/*.nix; do 71 | ln -fs $f /home/auntieneo/.nixpkgs/environments/ 72 | done 73 | ''; 74 | }; 75 | 76 | security.setuidPrograms = [ "mount_afp" ]; 77 | 78 | # Enable core dump handling in systemd. 79 | systemd.coredump = { 80 | enable = false; 81 | # extraConfig = '' 82 | # Storage=journal 83 | # ''; 84 | }; 85 | security.pam.loginLimits = [ 86 | # Enable core dump files. 87 | { domain = "*"; type = "-"; item = "core"; value = "unlimited"; } 88 | ]; 89 | boot.kernel.sysctl = { 90 | # Enable core dumps even for setuid processes 91 | "fs.suid_dumpable" = 1; 92 | }; 93 | } 94 | -------------------------------------------------------------------------------- /profiles/games.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, lib, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | # bzflag 6 | # dolphinEmuMaster 7 | # mupen64plus 8 | # nexuiz 9 | # openra 10 | # pcsx2 11 | # prboom # TODO: fix this build 12 | # sauerbraten 13 | # scorched3d # TODO: fix this build 14 | # tesseract 15 | # tremulous # TODO: fix this package 16 | 17 | # Game related tools 18 | # qtsixa 19 | steam 20 | ]; 21 | 22 | nixpkgs.config.packageOverrides = pkgs: rec { 23 | pcsx2 = pkgs.callPackage_i686 ../pkgs/pcsx2/default.nix { }; 24 | qtsixa = pkgs.callPackage ../pkgs/qtsixa/default.nix { }; 25 | # steam = pkgs.callPackage ../pkgs/steam/chrootenv.nix { }; 26 | tesseract = pkgs.callPackage ../pkgs/tesseract/default.nix { }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /profiles/graphics.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # install graphics-related packages 5 | environment.systemPackages = with pkgs; [ 6 | blender 7 | gimp 8 | inkscape 9 | # image-sdf 10 | ]; 11 | 12 | nixpkgs.config.packageOverrides = pkgs: rec { 13 | image-sdf = pkgs.callPackage ../pkgs/image-sdf/default.nix { }; 14 | 15 | # FIXME: fatal: could not open /home/auntieneo/code/blender/blender-translations.git/../../../.git/modules/release/datafiles/locale/gitdir for writing: Permission denied 16 | # blender = lib.overrideDerivation pkgs.blender (attrs: rec { 17 | # name = "blender-git"; 18 | # src = pkgs.fetchgit { 19 | # url = file:///home/auntieneo/code/blender/blender; 20 | # rev = "refs/heads/master"; 21 | # sha256 = "97ab28abbf229cd4a8fa8dd7ee716834a83f82a73909fde57e5999dd8bdd4c5a"; 22 | # }; 23 | # }); 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /profiles/laptop.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | # networking.wireless.enable = true; 5 | networking.networkmanager.enable = true; 6 | 7 | services.xserver = { 8 | # Enable laptop trackpads. 9 | synaptics.enable = true; 10 | 11 | # Enable vertical and horizontal TrackPoint scrolling. 12 | config = '' 13 | Section "InputClass" 14 | Identifier "Trackpoint Wheel Emulation" 15 | MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint" 16 | MatchDevicePath "/dev/input/event*" 17 | Option "EmulateWheel" "true" 18 | Option "EmulateWheelButton" "2" 19 | Option "XAxisMapping" "6 7" 20 | Option "YAxisMapping" "4 5" 21 | EndSection 22 | ''; 23 | }; 24 | 25 | services.acpid = 26 | { 27 | enable = true; 28 | 29 | # Suspend on power button press 30 | powerEventCommands = '' 31 | pid_file=/var/run/button-suspend.pid 32 | 33 | if [ -e "$pid_file" ]; then 34 | wait_pid=$(cat "$pid_file") 35 | kill -s 0 "$wait_pid" 36 | if [ $? -eq 0 ]; then 37 | # An instance of the "button_wait" process is already running. 38 | # Don't do anything, effectively "de-bouncing" the power button. 39 | exit 0 40 | else 41 | # An instance of the "button_wait" process ran, but it did not clean up. 42 | rm "$pid_file" 43 | fi 44 | fi 45 | # Make new "button_wait" process to de-bounce the button WITHOUT blocking. 46 | # If we were to sleep and block the thread of this script, then acpid 47 | # would just wait until we were done sleeping to process the queue of 48 | # bounced power button events. 49 | (sleep 10; rm "$pid_file") & 50 | echo "$!" > "$pid_file" 51 | ${pkgs.pmutils}/bin/pm-suspend 52 | ''; 53 | }; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /profiles/mathematics.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | gnuplot 6 | octaveHG 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /profiles/mesa.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | let 4 | customPiglit = { mesa_src ? pkgs.mesa.src }: 5 | let 6 | libdrm_2_4_65 = pkgs: (pkgs.libdrm.overrideDerivation (attrs: rec { 7 | name = "libdrm-${version}"; 8 | version = "2.4.65"; 9 | 10 | src = pkgs.fetchurl { 11 | url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; 12 | sha256 = "1i4n7mz49l0j4kr0dg9n1j3hlc786ncqgj0v5fci1mz7pp40m5ki"; 13 | }; 14 | })); 15 | in 16 | (import { config.packageOverrides = pkgs: rec { 17 | waffle = pkgs.callPackage ../pkgs/waffle/default.nix { }; 18 | 19 | mesa_override_env = (import { config.packageOverrides = pkgs: rec { 20 | # Inside here, we create an environment in which we override mesa and 21 | # some of the packages that Mesa depends on. 22 | mesa_noglu = lib.makeOverridable (args: lib.overrideDerivation pkgs.mesa_noglu (attrs: rec { 23 | name = "mesa-noglu-${version}"; 24 | version = "git"; 25 | 26 | enableParallelBuilding = true; 27 | src = mesa_src; 28 | nativeBuildInputs = [ pkgs.pythonPackages.Mako ] ++ attrs.nativeBuildInputs; 29 | })) {}; 30 | libdrm = libdrm_2_4_65 pkgs; 31 | 32 | };}); 33 | mesa = mesa_override_env.mesa; 34 | mesa_drivers = mesa_override_env.mesa_drivers; 35 | };}).callPackage ../pkgs/piglit/default.nix {}; 36 | 37 | mesa_arb_shader_subroutine = pkgs.fetchgit { 38 | url = "file:///home/auntieneo/code/mesa"; 39 | rev = "refs/remotes/airlied/arb_shader_subroutine"; 40 | sha256 = "5a1a760d217e2aff1549896a65a0a84cd06fa37ec092d989b23284396882c51c"; 41 | }; 42 | 43 | mesa_git = pkgs.fetchgit { 44 | url = "file:///home/auntieneo/code/mesa"; 45 | rev = "refs/heads/master"; 46 | sha256 = "0baa3c0b0f090d71ad1410e832c3316e3ffebffd94af39f11b5dc891e77b8a17"; 47 | }; 48 | in 49 | { 50 | environment.systemPackages = with pkgs; [ 51 | # piglit 52 | # piglit-patched 53 | # piglit-test 54 | piglit-arb_shader_subroutine 55 | ]; 56 | nixpkgs.config.packageOverrides = pkgs: 57 | (let 58 | in 59 | rec { 60 | 61 | piglit-arb_shader_subroutine = customPiglit { mesa_src = mesa_arb_shader_subroutine; }; 62 | # piglit-mesa_git = customPiglit { mesa_src = mesa_git; }; 63 | 64 | # piglit = pkgs.callPackage ../pkgs/piglit/default.nix { }; 65 | 66 | # piglit-patched = (import { config.packageOverrides = pkgs: rec { 67 | # waffle = pkgs.callPackage ../pkgs/waffle/default.nix { }; 68 | # 69 | # mesa_override_env = (import { config.packageOverrides = pkgs: rec { 70 | # # Inside here, we create an environment in which we override mesa and 71 | # # some of the packages that Mesa depends on. 72 | # mesa_noglu = lib.makeOverridable (args: lib.overrideDerivation pkgs.mesa_noglu (attrs: rec { 73 | # name = "mesa-noglu-${version}"; 74 | # version = "git"; 75 | # 76 | # enableParallelBuilding = true; 77 | # src = pkgs.fetchgit { 78 | # url = "file:///home/auntieneo/code/mesa"; 79 | # rev = "refs/heads/master"; 80 | # sha256 = "0baa3c0b0f090d71ad1410e832c3316e3ffebffd94af39f11b5dc891e77b8a17"; 81 | # }; 82 | # nativeBuildInputs = [ pkgs.pythonPackages.Mako ] ++ attrs.nativeBuildInputs; 83 | # })) {}; 84 | # 85 | # libdrm = libdrm_2_4_65 pkgs; 86 | # 87 | # }; }); 88 | # mesa = mesa_override_env.mesa; 89 | # mesa_drivers = mesa_override_env.mesa_drivers; 90 | # }; }).callPackage ../pkgs/piglit/default.nix {}; 91 | 92 | 93 | # piglit-test = pkgs.callPackage mesa/piglits/master.nix { piglit = piglit-patched; }; 94 | }); 95 | } 96 | -------------------------------------------------------------------------------- /profiles/mesa/piglit-builder/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | 3 | { 4 | mesa_noglu, 5 | libdrm, 6 | waffle, 7 | piglit 8 | }: 9 | 10 | stdenv.mkDerivation rec { 11 | name = "piglit-test-result"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /profiles/mesa/piglits/master.nix: -------------------------------------------------------------------------------- 1 | { stdenv, piglit }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "piglit-test-${version}"; 5 | version = "git-${rev}"; 6 | rev = ""; 7 | 8 | buildCommand = '' 9 | mkdir -p "$out"/result 10 | # TODO: check LIBGL_DRIVERS_PATH 11 | # TODO: make X11 display available (avoid XOpenDisplay failed error) 12 | ${piglit}/bin/piglit run ${piglit}/lib/piglit/tests/quick "$out"/result 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /profiles/networking.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # install networking packages 5 | environment.systemPackages = with pkgs; [ 6 | etherape 7 | ettercap 8 | tcpdump 9 | wireshark 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /profiles/printing.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | services.printing = { 5 | enable = true; 6 | drivers = with pkgs; [ gutenprint gutenprintBin hplipWithPlugin ]; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /profiles/redshift.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.redshift = { 5 | enable = false; 6 | latitude = "42.871303"; 7 | longitude = "-112.445534"; 8 | temperature.night = 4000; 9 | brightness.night = "0.8"; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /profiles/scanning.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | hardware.sane = { 5 | enable = true; 6 | }; 7 | 8 | environment.systemPackages = with pkgs; [ 9 | saneFrontends 10 | xsane 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /profiles/school.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | # mysqlWorkbench 6 | # qtspim # FIXME 7 | # octaveFull 8 | ]; 9 | 10 | # services.postgresql = { 11 | # enable = false; 12 | # }; 13 | # services.mysql = { 14 | # enable = true; 15 | # package = pkgs.mysql55; 16 | # }; 17 | # services.httpd = { 18 | # enable = true; 19 | # adminAddr = "glinjona@isu.edu"; 20 | # enableUserDir = true; 21 | # #LoadModule perl_module ${pkgs.perlPackages.mod_perl2}/lib/perl5/site_perl/5.20.3/x86_64-linux-thread-multi/mod_perl2.pm 22 | # extraConfig = '' 23 | # 24 | # AddHandler cgi-script .pl 25 | # Options +ExecCGI 26 | # 27 | ## SetHandler perl-script 28 | ## PerlResponseHandler ModPerl::Registry 29 | ## PerlOptions +ParseHeaders 30 | # 31 | # Order allow,deny 32 | # Allow from all 33 | # 34 | # ''; 35 | ## servedDirs = [{ 36 | ### dir = "/home/auntieneo/school/spring2016/databases/project/deliverable2"; 37 | ## dir = "/tmp/test"; 38 | ## urlPath = "/test"; 39 | ## }]; 40 | # }; 41 | 42 | # nixpkgs.config.packageOverrides = pkgs: rec { 43 | # qtspim = pkgs.callPackage ../pkgs/qtspim/default.nix {}; 44 | # }; 45 | } 46 | -------------------------------------------------------------------------------- /profiles/sdr.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | gqrx 6 | rtl-sdr 7 | ]; 8 | 9 | services.udev.extraRules = "${builtins.readFile "${pkgs.rtl-sdr}/etc/udev/rules.d/99-rtl-sdr.rules"}"; 10 | 11 | boot.blacklistedKernelModules = [ 12 | "dvb_usb_rtl28xxu" # Conflicts with gqrx and other sdr software 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /profiles/server.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../services/ssh-phone-home.nix 7 | ]; 8 | 9 | # Enable the OpenSSH daemon. 10 | services.openssh.enable = true; 11 | # Allow remote hosts to connect to reverse proxy tunnels 12 | services.openssh.gatewayPorts = "clientspecified"; 13 | 14 | # The "SSH phone home" service for SSH reverse tunneling 15 | # Machines that use this will still need to enable it with: 16 | # services.ssh-phone-home.enable = true; 17 | # 18 | # Machines that use settings other than this (e.g. a different 19 | # remoteHostname) should use lib.mkForce: 20 | # services.ssh-phone-home.remoteHostname = lib.mkForce "example.net"; 21 | services.ssh-phone-home = { 22 | # NOTE: bindPort should be specified on a per-machine basis 23 | localUser = "auntieneo"; 24 | remoteHostname = "auntieneo.net"; 25 | remotePort = 22; 26 | remoteUser = "auntieneo"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /profiles/telephony/BLA.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | confFiles = 6 | { 7 | "modules.conf" = '' 8 | [modules] 9 | autoload = yes 10 | 11 | load => bridge_builtin_features.so 12 | load => res_timing_timerfd.so 13 | load => app_confbridge.so 14 | load => chan_sip.so 15 | ''; 16 | "bla.conf" = '' 17 | [line1] 18 | type=trunk 19 | device=Local/faux@line1_outbound 20 | ; default user profile and bridge profile 21 | 22 | [line2] 23 | type=trunk 24 | device=Local/faux@line2_outbound 25 | trunk_user_profile=incoming_user ; default user profile for calls INTO the trunk (i.e. channels that invoke BLATrunk()) 26 | station_user_profile=outgoing_user ; default user profile for stations 27 | bridge_profile=trunk_bridge ; bridge type to mix channels (obviously for all channels on this trunk) 28 | 29 | [station](!) 30 | type=station 31 | trunk=line1 32 | trunk=line2 33 | 34 | [station1](station) 35 | device=SIP/hakase 36 | user_profile=admin_user 37 | 38 | [station2](station) 39 | device=SIP/fluttershy 40 | 41 | [station3](station) 42 | device=SIP/sipp 43 | ''; 44 | "confbridge.conf" = '' 45 | [general] 46 | 47 | [default_user] 48 | type=user 49 | 50 | [default_bridge] 51 | type=bridge 52 | 53 | [incoming_user] 54 | type=user 55 | 56 | [outgoing_user] 57 | type=user 58 | 59 | [admin_user] 60 | type=user 61 | 62 | [trunk_bridge] 63 | type=bridge 64 | ''; 65 | "extensions.conf" = '' 66 | [line1] 67 | ; FIXME: For some reason, s is needed here. I'm not sure why. 68 | exten => s,1,BLATrunk(line1) 69 | exten => _X.,1,Goto(s,1) 70 | exten => 100,1,Goto(s,1) 71 | 72 | [line2] 73 | exten => s,2,BLATrunk(line2) 74 | exten => _X.,1,Goto(s,1) 75 | 76 | [line1_outbound] 77 | exten => faux,1,NoOp() 78 | same => n,Wait(1) 79 | same => n,Answer() 80 | same => n(hello),Playback(hello-world) 81 | same => n(hello),Playback(hello-world) 82 | same => n(hello),Playback(hello-world) 83 | same => n(hello),Playback(hello-world) 84 | same => n(hello),Playback(hello-world) 85 | same => n(hello),Playback(hello-world) 86 | same => n(hello),Playback(hello-world) 87 | same => n(hello),Playback(hello-world) 88 | same => n(hello),Playback(hello-world) 89 | same => n(hello),Playback(hello-world) 90 | same => n,Hangup() 91 | 92 | [line2_outbound] 93 | exten => faux,1,NoOp() 94 | same => n,Wait(1) 95 | same => n,Answer() 96 | same => n,Echo() 97 | same => n,Hangup() 98 | 99 | [bla_stations] 100 | exten => station1,1,NoOp() 101 | same => n,Wait(1) 102 | ; same => n(hello),Playback(hello-world) 103 | same => n,BLAStation(station1) 104 | exten => station1_line1,hint,BLA:station1_line1 105 | exten => station1_line1,1,BLAStation(station1_line1) 106 | exten => station1_line2,hint,BLA:station1_line2 107 | exten => station1_line2,1,BLAStation(station1_line2) 108 | exten => station2,1,NoOp() 109 | same => n,Wait(1) 110 | ; same => n(hello),Playback(hello-world) 111 | same => n,BLAStation(station2) 112 | exten => station2_line1,hint,BLA:station2_line1 113 | exten => station2_line1,1,BLAStation(station2_line1) 114 | exten => station2_line2,hint,BLA:station2_line2 115 | exten => station2_line2,1,BLAStation(station2_line2) 116 | exten => station3,1,BLAStation(station3) 117 | exten => station3_line1,hint,BLA:station3_line1 118 | exten => station3_line1,1,BLAStation(station3_line1) 119 | exten => station3_line2,hint,BLA:station3_line2 120 | exten => station3_line2,1,BLAStation(station3_line2) 121 | 122 | [inbound] 123 | exten => 100,1,Goto(line1,100,1) 124 | exten => 200,1,Goto(line2,200,1) 125 | 126 | [softphones] 127 | include => bla_stations 128 | ''; 129 | }; 130 | }; 131 | } 132 | -------------------------------------------------------------------------------- /profiles/telephony/BLA_autocontext.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | confFiles = 6 | { 7 | "modules.conf" = '' 8 | [modules] 9 | autoload = yes 10 | 11 | load => bridge_builtin_features.so 12 | load => res_timing_timerfd.so 13 | load => app_confbridge.so 14 | load => chan_sip.so 15 | ''; 16 | "bla.conf" = '' 17 | [line1] 18 | type=trunk 19 | device=Local/faux@line1_outbound 20 | ; autocontext=line1 21 | ; default user profile and bridge profile 22 | 23 | [line2] 24 | type=trunk 25 | device=Local/faux@line2_outbound 26 | ; autocontext=line2 27 | 28 | ; [line3] 29 | ; type=trunk 30 | ; device=Local/faux@line3_outbound 31 | ; autocontext=line3 32 | ; 33 | ; [line4] 34 | ; type=trunk 35 | ; device=Local/faux@line4_outbound 36 | ; autocontext=line4 37 | ; 38 | ; [station](!) 39 | ; type=station 40 | ; trunk=line1 41 | ; trunk=line2 42 | ; trunk=line3 43 | ; trunk=line4 44 | ; autocontext=bla_stations 45 | 46 | [station1line1] 47 | type=station 48 | trunk=line1 49 | trunk=line2 50 | device=SIP/polycom1_line1 51 | ; autocontext=bla_stations 52 | 53 | ; [station1line2] 54 | ; type=station 55 | ; trunk=line2 56 | ; device=SIP/polycom1_line2 57 | ; autocontext=bla_stations 58 | ; 59 | ; [station1line3] 60 | ; type=station 61 | ; trunk=line3 62 | ; device=SIP/polycom1_line3 63 | ; autocontext=bla_stations 64 | ; 65 | ; [station2line1] 66 | ; type=station 67 | ; trunk=line1 68 | ; device=SIP/polycom2_line1 69 | ; autocontext=bla_stations 70 | ; 71 | ; [station2line2] 72 | ; type=station 73 | ; trunk=line2 74 | ; device=SIP/polycom2_line2 75 | ; autocontext=bla_stations 76 | ; 77 | ; [station2line3] 78 | ; type=station 79 | ; trunk=line3 80 | ; device=SIP/polycom2_line3 81 | ; autocontext=bla_stations 82 | ; 83 | ; [station3](station) 84 | ; device=SIP/hakase 85 | ; 86 | ; [station4](station) 87 | ; device=SIP/fluttershy 88 | ; 89 | ;; [station5](station) 90 | ;; device=SIP/larry 91 | ; 92 | ; [station6](station) 93 | ; device=SIP/sipp 94 | ; 95 | ;; [station7](station) 96 | ;; device=Local/answer_everything@station_inbound 97 | ''; 98 | "confbridge.conf" = '' 99 | [general] 100 | 101 | ; [default_bla_station_user] 102 | ; type=user 103 | ; marked=yes 104 | ; quiet=yes 105 | ; dtmf_passthrough=yes 106 | 107 | ; [default_bla_trunk_user] 108 | ; type=user 109 | ; quiet=yes 110 | ; dtmf_passthrough=yes 111 | ; end_marked=yes 112 | 113 | ; [default_bla_bridge] 114 | ; type=bridge 115 | ; sound_join=hello-world 116 | ''; 117 | "extensions.conf" = '' 118 | [line1] 119 | exten => 123,1,BLATrunk(line1) 120 | 121 | [line2] 122 | exten => 456,1,BLATrunk(line2) 123 | 124 | [line3] 125 | exten => 789,1,BLATrunk(line3) 126 | 127 | [line1_outbound] 128 | exten => faux,1,NoOp() 129 | same => n,Wait(1) 130 | same => n,Answer() 131 | same => n,Playback(hello-world) 132 | same => n,Playback(hello-world) 133 | same => n,Playback(hello-world) 134 | same => n,Playback(hello-world) 135 | same => n,Playback(hello-world) 136 | same => n,Playback(hello-world) 137 | same => n,Playback(hello-world) 138 | same => n,Playback(hello-world) 139 | same => n,Playback(hello-world) 140 | same => n,Playback(hello-world) 141 | same => n,Wait(90000) 142 | same => n,Hangup() 143 | 144 | [line2_outbound] 145 | exten => faux,1,NoOp() 146 | same => n,Wait(1) 147 | same => n,Answer() 148 | same => n,Echo() 149 | same => n,Hangup() 150 | 151 | [line3_outbound] 152 | exten => faux,1,NoOp() 153 | same => n,Wait(1) 154 | same => n,Answer() 155 | same => n,Read(DIGITS,,3) 156 | same => n,SayDigits(''${DIGITS}) 157 | same => n,Hangup() 158 | 159 | [line4_outbound] 160 | exten => faux,1,NoOp() 161 | same => n,Wait(1) 162 | same => n,Answer() 163 | same => n,Read(DIGITS,,4) 164 | same => n,GotoIf($[''${DIGITS} = 1234]?line1_outbound,faux,1) 165 | same => n,Hangup() 166 | 167 | [station_inbound] 168 | exten => answer_everything,1,NoOp() 169 | same => n,Wait(3) 170 | same => n,Answer() 171 | same => n,Wait(1) 172 | same => n,Playback(hello-world) 173 | same => n,Playback(hello-world) 174 | same => n,Playback(hello-world) 175 | same => n,Playback(hello-world) 176 | same => n,Playback(hello-world) 177 | same => n,Playback(hello-world) 178 | same => n,Playback(hello-world) 179 | same => n,Playback(hello-world) 180 | same => n,Playback(hello-world) 181 | same => n,Playback(hello-world) 182 | same => n,Hangup() 183 | 184 | [inbound] 185 | exten => 100,1,Goto(line1,100,1) 186 | exten => 200,1,Goto(line2,200,1) 187 | 188 | [deskphones] 189 | include => bla_stations 190 | 191 | [softphones] 192 | include => bla_stations 193 | include => line1 194 | include => line2 195 | include => line3 196 | ''; 197 | }; 198 | }; 199 | } 200 | 201 | -------------------------------------------------------------------------------- /profiles/telephony/app_bla.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | confFiles = 6 | { 7 | "bla.conf" = '' 8 | [line1] 9 | type=trunk 10 | device=Local/faux@line1_outbound 11 | internal_sample_rate=8000 12 | mixing_interval=80 13 | 14 | [line2] 15 | type=trunk 16 | device=Local/faux@line2_outbound 17 | 18 | [line3] 19 | type=trunk 20 | device=Local/faux@line3_outbound 21 | 22 | [station](!) 23 | type=station 24 | trunk=line1 25 | trunk=line2 26 | trunk=line3 27 | 28 | [station1line1] 29 | type=station 30 | trunk=line1 31 | device=SIP/polycom1_line1 32 | ; autocontext=bla_stations 33 | 34 | [station1line2] 35 | type=station 36 | trunk=line2 37 | device=SIP/polycom1_line2 38 | ; autocontext=bla_stations 39 | 40 | [station1line3] 41 | type=station 42 | trunk=line3 43 | device=SIP/polycom1_line3 44 | ; autocontext=bla_stations 45 | 46 | [station2line1] 47 | type=station 48 | trunk=line1 49 | device=SIP/polycom2_line1 50 | ; autocontext=bla_stations 51 | 52 | [station2line2] 53 | type=station 54 | trunk=line2 55 | device=SIP/polycom2_line2 56 | ; autocontext=bla_stations 57 | 58 | [station2line3] 59 | type=station 60 | trunk=line3 61 | device=SIP/polycom2_line3 62 | ; autocontext=bla_stations 63 | 64 | [station3](station) 65 | type=station 66 | trunk=line1 67 | trunk=line1 68 | trunk=line1 69 | trunk=line1 70 | trunk=line1 71 | trunk=line1 72 | trunk=line1 73 | device=SIP/fluttershy 74 | ; autocontext=bla_stations 75 | ''; 76 | "extensions.conf" = '' 77 | [line1] 78 | exten => 123,1,BLATrunk(line1) 79 | 80 | [line2] 81 | exten => 456,1,BLATrunk(line2) 82 | 83 | [line3] 84 | exten => 789,1,BLATrunk(line3) 85 | 86 | [line1_outbound] 87 | exten => faux,1,NoOp() 88 | same => n,Wait(1) 89 | same => n,Answer() 90 | same => n(hello),Playback(hello-world) 91 | same => n(hello),Playback(hello-world) 92 | same => n(hello),Playback(hello-world) 93 | same => n(hello),Playback(hello-world) 94 | same => n(hello),Playback(hello-world) 95 | same => n(hello),Playback(hello-world) 96 | same => n(hello),Playback(hello-world) 97 | same => n(hello),Playback(hello-world) 98 | same => n(hello),Playback(hello-world) 99 | same => n(hello),Playback(hello-world) 100 | same => n,Wait(90000) 101 | same => n,Hangup() 102 | 103 | [line2_outbound] 104 | exten => faux,1,NoOp() 105 | same => n,Wait(1) 106 | same => n,Answer() 107 | same => n,Echo() 108 | same => n,Hangup() 109 | 110 | [line3_outbound] 111 | exten => faux,1,NoOp() 112 | same => n,Wait(1) 113 | same => n,Answer() 114 | same => n,Read(DIGITS,,3) 115 | same => n,SayDigits(''${DIGITS}) 116 | same => n,Hangup() 117 | 118 | [bla_stations] 119 | exten => station1,1,NoOp() 120 | same => n,BLAStation(station1) 121 | exten => station1_line1,hint,BLA:station1_line1 122 | exten => station1_line1,1,BLAStation(station1,line1) 123 | exten => station1_line2,hint,BLA:station1_line2 124 | exten => station1_line2,1,BLAStation(station1,line2) 125 | exten => station2,1,NoOp() 126 | same => n,BLAStation(station2) 127 | exten => station2_line1,hint,BLA:station2_line1 128 | exten => station2_line1,1,BLAStation(station2,line1) 129 | exten => station2_line2,hint,BLA:station2_line2 130 | exten => station2_line2,1,BLAStation(station2,line2) 131 | exten => station3,1,BLAStation(station3) 132 | exten => station3_line1,hint,BLA:station3_line1 133 | exten => station3_line1,1,BLAStation(station3,line1) 134 | exten => station3_line2,hint,BLA:station3_line2 135 | exten => station3_line2,1,BLAStation(station3,line2) 136 | 137 | [softphones] 138 | include => bla_stations 139 | include => line1 140 | include => line2 141 | include => line3 142 | 143 | [deskphones] 144 | include => bla_stations 145 | ''; 146 | }; 147 | }; 148 | } 149 | -------------------------------------------------------------------------------- /profiles/telephony/asteriskTests.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | confFiles = 6 | { 7 | "extensions.conf" = '' 8 | [tests] 9 | exten => 101,1,Answer() 10 | same => n,Echo() 11 | same => n,Hangup() 12 | 13 | exten => 100,1,Answer() 14 | same => n,Wait(1) 15 | same => n,Playback(hello-world) 16 | same => n,Hangup() 17 | 18 | exten => 003,1,Answer() 19 | same => n,Wait(5) 20 | same => n,Festival('You are a butt a butt a butt a butt. You are a butt. Goodbye.') 21 | 22 | exten => 123,1,NoOp() 23 | same => n,Answer() 24 | same => n,Dial(SIP/polycom1_line1) 25 | same => n,Hangup() 26 | 27 | [deskphones] 28 | include => tests 29 | 30 | [softphones] 31 | include => tests 32 | 33 | [unauthenticated] 34 | ''; 35 | "festival.conf" = '' 36 | [general] 37 | host=localhost 38 | port=1314 39 | festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n 40 | ''; 41 | }; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /profiles/telephony/confBridge.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | otherConfig = 6 | { 7 | "extensions.conf" = '' 8 | [ConferenceRooms] 9 | exten => 602,1,NoOp() 10 | same => n,ConfBridge(''${EXTEN}) 11 | 12 | [softphones] 13 | include => ConferenceRooms 14 | 15 | [unauthenticated] 16 | ''; 17 | "confbridge.conf" = '' 18 | [general] 19 | 20 | [default_user] 21 | type=user 22 | 23 | [default_bridge] 24 | type=bridge 25 | ''; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /profiles/telephony/confBridgeSLA.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | services.asterisk = { 5 | otherConfig = 6 | { 7 | "sla.conf" = '' 8 | [line1] 9 | type=trunk 10 | device=DAHDI/1 11 | autocontext=line1 12 | 13 | [line2] 14 | type=trunk 15 | device=DAHDI/2 16 | autocontext=line2 17 | 18 | [station] 19 | type=station 20 | trunk=line1 21 | trunk=line2 22 | autocontext=sla_stations 23 | 24 | [station1](station) 25 | device=SIP/station1 26 | 27 | [station2](station) 28 | device=SIP/station2 29 | 30 | [station3](station) 31 | device=SIP/station3 32 | ''; 33 | "extensions.conf" = '' 34 | [line1] 35 | exten => s,1,SLATrunk(line1) 36 | 37 | [line2] 38 | exten => s,2,SLATrunk(line2) 39 | 40 | [sla_stations] 41 | exten => station1,1,SLAStation(station1) 42 | exten => station1_line1,hint,SLA:station1_line1 43 | exten => station1_line1,1,SLAStation(station1_line1) 44 | exten => station1_line2,hint,SLA:station1_line2 45 | exten => station1_line2,1,SLAStation(station1_line2) 46 | exten => station2,1,SLAStation(station2) 47 | exten => station2_line1,hint,SLA:station2_line1 48 | exten => station2_line1,1,SLAStation(station2_line1) 49 | exten => station2_line2,hint,SLA:station2_line2 50 | exten => station2_line2,1,SLAStation(station2_line2) 51 | exten => station3,1,SLAStation(station3) 52 | exten => station3_line1,hint,SLA:station3_line1 53 | exten => station3_line1,1,SLAStation(station3_line1) 54 | exten => station3_line2,hint,SLA:station3_line2 55 | exten => station3_line2,1,SLAStation(station3_line2) 56 | ''; 57 | }; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /profiles/vfio.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | # KVM support for VGA passthrough 5 | # See: https://bbs.archlinux.org/viewtopic.php?id=162768 6 | 7 | environment.systemPackages = with pkgs; [ 8 | virtmanager 9 | qemu 10 | # (lib.overrideDerivation pkgs.qemu (attrs: { 11 | # name = "qemu-git"; 12 | # src = pkgs.fetchgit { 13 | # url = "git://git.qemu.org/qemu.git"; 14 | # rev = "d2966f804d70a244f5dde395fc5d22a50ed3e74e"; 15 | # sha256 = "0e214132e5b11f24dc417de6c76fa3f9005802f13ea3e5c8444c19c9364eda81"; 16 | # }; 17 | # })) 18 | ]; 19 | 20 | virtualisation.libvirtd = { 21 | enable = true; 22 | onShutdown = "shutdown"; 23 | extraConfig = '' 24 | cgroup_device_acl = [ 25 | "/dev/vfio/1", 26 | "/dev/vfio/12" 27 | ] 28 | ''; 29 | }; 30 | 31 | boot.kernelModules = [ 32 | "vfio" 33 | "vfio_pci" 34 | "vfio_iommu_type1" 35 | ]; 36 | 37 | boot.kernelParams = [ 38 | "intel_iommu=on" 39 | "vfio_iommu_type1.allow_unsafe_interrupts=1" 40 | "kvm.allow_unsafe_assigned_interrupts=1" 41 | "kvm.ignore_msrs=1" # This prevents certain (BSOD) crashes in Windows guests. 42 | # "i915.enable_hd_vgaarb=1" 43 | "hugepages=4096" 44 | ]; 45 | 46 | boot.blacklistedKernelModules = [ 47 | "fglrx" "noveau" "nvidia" "radeon" 48 | "snd_hda_intel" 49 | "xhci_hcd" # USB 3.0 50 | ]; 51 | 52 | security.pam.loginLimits = [ 53 | # Allow us to lock a lot of memory 54 | { domain = "*"; type = "-"; item = "memlock"; value = "unlimited"; } 55 | ]; 56 | 57 | nixpkgs.config.packageOverrides = pkgs: rec { 58 | # Need latest virt-manager for UEFI boot 59 | # virtmanager = pkgs.callPackage ../pkgs/virt-manager/default.nix { 60 | # inherit (pkgs.gnome) gnome_python; 61 | # vte = pkgs.gnome3.vte; 62 | # dconf = pkgs.gnome3.dconf; 63 | # gtkvnc = pkgs.gtkvnc.override { enableGTK3 = true; }; 64 | # spice_gtk = pkgs.spice_gtk.override { enableGTK3 = true; }; 65 | # }; 66 | }; 67 | } 68 | -------------------------------------------------------------------------------- /profiles/virtualization.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | nixpkgs.config = { 5 | # Enable VirtualBox extensions (requires manual download) 6 | # virtualbox.enableExtensionPack = true; 7 | }; 8 | 9 | # Load VirtualBox kernel modules. 10 | # FIXME: This interferes with AziLink Android tethering because they both use 192.168.56.0/24 11 | # virtualisation.virtualbox.host.enable = true; 12 | 13 | environment.systemPackages = with pkgs; [ 14 | kvm 15 | linuxPackages.virtualbox 16 | qemu 17 | vagrant 18 | virtmanager 19 | # gentoo 20 | ]; 21 | 22 | virtualisation.libvirtd = { 23 | enable = true; 24 | onShutdown = "shutdown"; 25 | }; 26 | 27 | # custom packages 28 | nixpkgs.config.packageOverrides = pkgs: rec { 29 | gentoo = pkgs.callPackage ../pkgs/gentoo/default.nix { }; 30 | gentoo-original = pkgs.callPackage ../pkgs/gentoo/default.nix { }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /profiles/virtualreality.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | # osvr-core 6 | # osvr-tracker-viewer 7 | ]; 8 | 9 | nixpkgs.config.packageOverrides = pkgs: rec { 10 | osvr-core = pkgs.callPackage ../pkgs/osvr-core/default.nix {}; 11 | osvr-libfunctionality = pkgs.callPackage ../pkgs/osvr-libfunctionality/default.nix {}; 12 | osvr-tracker-viewer = pkgs.callPackage ../pkgs/osvr-tracker-viewer/default.nix {}; 13 | jsoncpp = lib.overrideDerivation pkgs.jsoncpp (attrs: rec { 14 | cmakeFlags = [ 15 | "-DJSONCPP_WITH_CMAKE_PACKAGE=1" 16 | "-DCMAKE_CXX_FLAGS=-fPIC" 17 | ]; 18 | }); 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /profiles/wayland.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | 5 | imports = [ 6 | # libswc launch service (Wayland compositor) 7 | ../services/wayland/swc-launch.nix 8 | # # Experimental X11 + Wayland display configuration 9 | # ../services/display/default.nix 10 | ]; 11 | 12 | environment.systemPackages = with pkgs; [ 13 | dmenu 14 | dmenu-wl 15 | libswc 16 | libwld 17 | st-wl 18 | velox 19 | ]; 20 | 21 | # Enable swc+velox (Wayland compositor) as alternative to X11 22 | services.swc-launch = { 23 | enable = true; 24 | user = "auntieneo"; 25 | layout = "dvorak"; 26 | xkbOptions = "caps:super"; 27 | server.velox.enable = true; 28 | }; 29 | 30 | nixpkgs.config.packageOverrides = pkgs: rec { 31 | dmenu-wl = pkgs.callPackage ../pkgs/dmenu-wl/default.nix { }; 32 | libswc = pkgs.misc.debugVersion (pkgs.callPackage ../pkgs/libswc/default.nix { }); 33 | libwld = pkgs.callPackage ../pkgs/libwld/default.nix { }; 34 | st-wl = pkgs.callPackage ../pkgs/st-wl/default.nix { }; 35 | velox = pkgs.callPackage ../pkgs/velox/default.nix { }; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /rebuild-local.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Find latest version in 4 | #commit=$(curl -sI http://nixos.org/channels/nixos-unstable/ | grep Location | perl -n -e'/([0-9a-f]{7})\/\s*$/ && print $1') 5 | 6 | ## Git method: 7 | #if [ ! -d /etc/nixos/nixpkgs ]; then 8 | # sudo git clone --origin 'local' --branch $release $HOME/code/nixpkgs /etc/nixos/nixpkgs 9 | #fi 10 | #wd=$(pwd) 11 | #cd /etc/nixos/nixpkgs 12 | ## TODO: make sure repo has ~/code/nixpkgs as "local" in remotes and a $release branch (for freshly installed systems) 13 | #sudo git checkout $release 14 | #sudo git pull 'local' $release 15 | 16 | SRC=$HOME/code/nixrc 17 | sudo rsync --filter="protect /hardware-configuration.nix" \ 18 | --filter="protect /hostname" \ 19 | --filter="protect /nixpkgs" \ 20 | --filter="protect /private" \ 21 | --filter="protect /release" \ 22 | --filter="exclude,s *.gitignore" \ 23 | --filter="exclude,s *.gitmodules" \ 24 | --filter="exclude,s *.git" \ 25 | --filter="exclude .*.swp" \ 26 | --filter="exclude Session.vim" \ 27 | --delete --recursive --perms \ 28 | $SRC/ /etc/nixos/ 29 | 30 | if [ $# -eq 0 ]; then 31 | operation='switch' 32 | else 33 | operation=$1 34 | fi 35 | cd $wd 36 | sudo nixos-rebuild --keep-failed --show-trace -I nixos=/home/auntieneo/code/nixpkgs/nixos -I nixpkgs=/home/auntieneo/code/nixpkgs $operation 37 | -------------------------------------------------------------------------------- /rebuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$HOME/code/nixrc 4 | sudo rsync --filter="protect /hardware-configuration.nix" \ 5 | --filter="protect /hostname" \ 6 | --filter="protect /nixpkgs" \ 7 | --filter="protect /private" \ 8 | --filter="protect /release" \ 9 | --filter="exclude,s *.gitignore" \ 10 | --filter="exclude,s *.gitmodules" \ 11 | --filter="exclude,s *.git" \ 12 | --filter="exclude .*.swp" \ 13 | --filter="exclude Session.vim" \ 14 | --delete --recursive --perms \ 15 | $SRC/ /etc/nixos/ 16 | 17 | if [ $# -eq 0 ]; then 18 | operation='switch' 19 | else 20 | operation=$1 21 | fi 22 | cd $wd 23 | sudo NIX_CURL_FLAGS='--retry=1000' nixos-rebuild --show-trace --keep-failed --fallback $operation 24 | -------------------------------------------------------------------------------- /services/display/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.display; 7 | dm = config.services.display.displayManager.active; 8 | in 9 | { 10 | imports = [ 11 | ./display-managers/default.nix 12 | ./sessions/default.nix 13 | ]; 14 | 15 | options = { 16 | services.display = { 17 | enable = mkOption { 18 | type = types.bool; 19 | default = false; 20 | description = '' 21 | Whether to enable X11/Wayland sessions managed with logind. 22 | ''; 23 | }; 24 | 25 | layout = mkOption { 26 | type = types.str; 27 | default = "us"; 28 | description = '' 29 | Keyboard layout. 30 | ''; 31 | }; 32 | 33 | xkbOptions = mkOption { 34 | type = types.str; 35 | default = ""; 36 | example = "grp:caps_toggle, grp_led:scroll"; 37 | description = '' 38 | xkb keyboard options. 39 | ''; 40 | }; 41 | 42 | tty = mkOption { 43 | type = types.int; 44 | default = 9; 45 | description = "Virtual console to use for display."; 46 | }; 47 | }; 48 | }; 49 | 50 | # In here: '' 51 | # - Determine what display manager *tech* is being used. 52 | # - Incorperate that display-managers/default.nix set with the // operator 53 | # - Determine what sessions are being used? Not needed. The display manager needs to figure that out. 54 | config = mkIf cfg.enable { 55 | # TODO: assertions for display manager *tech* 56 | 57 | # FIXME: enable the following line 58 | # systemd.defaultUnit = mkIf cfg.autorun "graphical.target"; 59 | 60 | # systemd service for the display manager 61 | systemd.services.display = { 62 | enable = true; 63 | description = "Display Manager"; 64 | after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" ]; 65 | restartIfChanged = false; 66 | 67 | environment = { 68 | XKB_DEFAULT_LAYOUT = "${cfg.layout}"; 69 | XKB_DEFAULT_OPTIONS = "${cfg.xkbOptions}"; 70 | }; # // ${cfg.displayManager.${dm.tech}.attr.systemd}; 71 | 72 | preStart = 73 | '' 74 | ${cfg.displayManager.${dm.tech}.${dm.name}.preStart} 75 | ''; 76 | 77 | script = "${cfg.displayManager.${dm.tech}.${dm.name}.start}"; 78 | }; 79 | }; 80 | } 81 | -------------------------------------------------------------------------------- /services/display/display-managers/auto.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.display.displayManager; 7 | in 8 | { 9 | options = { 10 | services.display.displayManager.auto = { 11 | enable = mkOption { 12 | type = types.bool; 13 | default = false; 14 | description = '' 15 | Whether to enable the automatic login display manager. 16 | ''; 17 | }; 18 | 19 | user = mkOption { 20 | type = types.str; 21 | default = null; 22 | description = "User automatically log in as."; 23 | }; 24 | }; 25 | }; 26 | config = mkIf cfg.enable { 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /services/display/display-managers/default.nix: -------------------------------------------------------------------------------- 1 | # This module declares the options common to both Wayland and X11 display 2 | # managers. The feature that defines a display manager in this context is that 3 | # it provisions and starts user sessions on a tty with logind (see 4 | # systemd-logind.service(8), as well as the more practical overview on the wiki 5 | # ). 6 | # 7 | # Display managers can conceivably use any display technology (X11, Wayland, 8 | # framebuffer, Mir) to launch a user session that uses any other display 9 | # technology. The multiplicity here may (for some display manager/session 10 | # combinations) present a problem in which a display manager isn't equiped to 11 | # launch a particular user session (e.g. a newer Wayland-only display manager 12 | # attempting to launch an older X11-only session or vice versa). This 13 | # multiplicity is dealt with by abstracting the interfaces that X11 and Wayland 14 | # sessions need to expose. 15 | # 16 | # 17 | # The structures in this module as well as the session module are designed with 18 | # a number of goals in mind: 19 | # 20 | # 1) To present display managers with separate but consistent interfaces for 21 | # both X11 and Wayland (and any others we might support) user sessions. 22 | # 2) To prevent users from configuring a display manager with a sesson type 23 | # that it cannot support. 24 | # 3) To facilitate hacks so that a given display manager can support session 25 | # types that it does not support natively. 26 | # 4) To keep X11 and Wayland specific code separate (especially hacks). 27 | # 28 | # 29 | # The abstraction used to achieve these goals introduces a few changes to the 30 | # configuration interface that will need to be documented for users as they 31 | # transition to the new system: 32 | # 33 | # These options are (obviously) not in services.xserver, but rather in 34 | # services.display (It might even be more appropriate to put these options in 35 | # services.logind or services.login; I haven't decided yet). 36 | # 37 | # The displayManager module no longer distinguishes between a window manager 38 | # and a desktop manager. These two things are integrated into a single process 39 | # in Wayland, and thus have no place at the "session" level of abstraction. See 40 | # the options in the services.display.sessions.x11 module if you want to specify 41 | # multiple X11 window manager + desktop manager combinations. 42 | # 43 | # 44 | # See the comments at the top of services/dispay/sessions/default.nix for a 45 | # description of the session module's role. 46 | 47 | { config, lib, pkgs, ... }: 48 | 49 | with lib; 50 | 51 | let 52 | cfg = config.services.display.displayManager; 53 | in 54 | { 55 | imports = [ 56 | ./wayland/default.nix 57 | ./x11/default.nix 58 | ]; 59 | options = { 60 | services.display.displayManager = { 61 | enabled_sessions = mkOption { 62 | type = types.listOf types.str; 63 | internal = true; 64 | default = []; 65 | description = '' 66 | The list of sessions that have been enabled. 67 | ''; 68 | }; 69 | 70 | sessions = mkOption { 71 | default = []; 72 | example = literalExample 73 | '' 74 | [ { name = "velox"; 75 | type = "wayland.velox"; 76 | } 77 | ] 78 | ''; 79 | description = '' 80 | The list of sessions to be available on the display manager's menu. 81 | ''; 82 | }; 83 | 84 | active = mkOption { 85 | internal = true; 86 | default = null; 87 | description = '' 88 | The display manager to be used (i.e. the one that was enabled). Only 89 | one display manager can be active at a time. 90 | ''; 91 | }; 92 | }; 93 | }; 94 | config = { 95 | # TODO: move the following routine into services/display/default.nix and get rid of active option? maybe 96 | # Determine the display manager to be used; only one display manager can 97 | # be enabled at a time. 98 | services.display.displayManager.active = 99 | let 100 | enabled_dm = 101 | map (dm: { name = "${dm.name}"; tech = "${dm.tech}"; }) ( 102 | filter (dm: dm.config.enable == true) ( 103 | map (dm: { name = "${dm.name}"; tech = "${dm.tech}"; config = cfg.${dm.tech}.${dm.name}; }) 104 | (map (dm: { tech = "wayland"; name = "${dm}"; }) (builtins.attrNames cfg.wayland)) # ++ 105 | # (map (dm: { tech = "x11"; name = "${dm}"; }) (builtins.attrNames cfg.x11)) 106 | )); 107 | in 108 | if length enabled_dm == 1 then 109 | head enabled_dm 110 | else if length enabled_dm > 1 then 111 | throw "Only one display manager can be enabled at a time." 112 | else null; 113 | }; 114 | } 115 | -------------------------------------------------------------------------------- /services/display/display-managers/wayland/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.display; 7 | in 8 | { 9 | imports = [ 10 | ./swc-launch.nix 11 | ./weston-launch.nix 12 | ]; 13 | 14 | options = { 15 | services.display.displayManager.wayland = {}; 16 | }; 17 | config = {}; 18 | } 19 | -------------------------------------------------------------------------------- /services/display/display-managers/wayland/swc-launch.nix: -------------------------------------------------------------------------------- 1 | # The swc-launch "display manager" only supports launching libswc-based Wayland 2 | # compositors, akin to the weston-launch utility which can only watch the Weston 3 | # compositor. 4 | # 5 | # As swc-launch does not provide an interface to input a username or password, 6 | # this module behaves as the "auto" display manager; a defaultUser option must 7 | # be provided. 8 | # 9 | # This module is only a dummy for as long as the "auto" display manager does not 10 | # support libswc-based compositors. This module can be safely removed from the 11 | # user-exposed configuration interface once the "auto" display manager is made 12 | # support libswc-based compositors. 13 | { config, lib, pkgs, ... }: 14 | 15 | with lib; 16 | 17 | let 18 | cfg = config.services.display.displayManager.wayland.swc-launch; 19 | in 20 | 21 | { 22 | ###### interface 23 | 24 | options = { 25 | services.display.displayManager.wayland.swc-launch = { 26 | enable = mkOption { 27 | type = types.bool; 28 | default = false; 29 | description = '' 30 | Whether to enable a Wayland compositor launched with swc-launch. 31 | ''; 32 | }; 33 | 34 | user = mkOption { 35 | type = types.str; 36 | default = null; 37 | description = "User to run swc-launch as."; 38 | }; 39 | 40 | preStart = mkOption { 41 | type = types.lines; 42 | internal = true; 43 | default = ""; 44 | description = "Display manager pre-start script."; 45 | }; 46 | 47 | start = mkOption { 48 | type = types.lines; 49 | internal = true; 50 | default = null; 51 | description = "Display manager start script."; 52 | }; 53 | }; 54 | }; 55 | 56 | 57 | ###### implementation 58 | 59 | config = mkIf cfg.enable 60 | ( 61 | let 62 | # Find the libswc-based session in the list of sessions 63 | swcSessionPath = 64 | let 65 | sessions = config.services.display.displayManager.sessions; 66 | in 67 | if length sessions == 1 then 68 | let 69 | sessionPath = (splitString "." "services.display.sessions") ++ 70 | (splitString "." ((head sessions).type)); 71 | in 72 | if (attrByPath (sessionPath ++ ["attr" "libswc"]) false config) then 73 | sessionPath 74 | else 75 | throw "The swc-launch display manager can only handle libswc-based sessions." 76 | else if length sessions > 1 then 77 | throw "The swc-launch display manager cannot manage multiple sessions." 78 | else null; 79 | in 80 | { 81 | # needs setuid in order to manage tty's 82 | security.setuidPrograms = [ "swc-launch" ]; 83 | 84 | services.display.displayManager.wayland.swc-launch.preStart = ""; 85 | 86 | services.display.displayManager.wayland.swc-launch.start = 87 | '' 88 | ${config.security.wrapperDir}/swc-launch \ 89 | -t /dev/tty${toString config.services.display.tty} \ 90 | -- ${(attrByPath swcSessionPath null config).command} 91 | ''; 92 | 93 | systemd.services.display = { 94 | serviceConfig = { 95 | # run display manager as an ordinary user 96 | User = "${cfg.user}"; 97 | }; 98 | environment = { 99 | # FIXME: This doesn't work when the user hasn't explicitly set her uid. 100 | XDG_RUNTIME_DIR = "/run/user/${toString config.users.extraUsers.${cfg.user}.uid}"; 101 | }; 102 | }; 103 | }); 104 | } 105 | -------------------------------------------------------------------------------- /services/display/display-managers/wayland/weston-launch.nix: -------------------------------------------------------------------------------- 1 | # The weston-launch "display manager" only supports launching Weston, the 2 | # reference compositor for Wayland. 3 | # 4 | # As swc-launch does not provide an interface to input a username or password, 5 | # this module behaves as the "auto" display manager; a defaultUser option must 6 | # be provided. 7 | # 8 | # This module is only a dummy for as long as the "auto" display manager does not 9 | # support launching Weston. 10 | { config, lib, pkgs, ... }: 11 | 12 | with lib; 13 | 14 | let 15 | cfg = config.services.display.displayManager.wayland.weston-launch; 16 | in 17 | 18 | { 19 | options = { 20 | services.display.displayManager.wayland.weston-launch = { 21 | enable = mkOption { 22 | type = types.bool; 23 | default = false; 24 | description = '' 25 | Whether to enable starting Weston with weston-launch. 26 | ''; 27 | }; 28 | 29 | user = mkOption { 30 | type = types.str; 31 | default = null; 32 | description = "User to run weston-launch as."; 33 | }; 34 | 35 | preStart = mkOption { 36 | type = types.lines; 37 | internal = true; 38 | default = ""; 39 | description = "Display manager pre-start script."; 40 | }; 41 | 42 | start = mkOption { 43 | type = types.lines; 44 | internal = true; 45 | default = null; 46 | description = "Display manager start script."; 47 | }; 48 | }; 49 | }; 50 | 51 | config = mkIf cfg.enable { 52 | # needs setuid in order to manage tty's 53 | security.setuidPrograms = [ "weston-launch" ]; 54 | 55 | services.display.displayManager.wayland.weston-launch = { 56 | preStart = ""; 57 | 58 | start = 59 | '' 60 | ${config.security.wrapperDir}/weston-launch \ 61 | -t /dev/tty${toString config.services.display.tty} 62 | ''; 63 | }; 64 | 65 | systemd.services.display = { 66 | serviceConfig = { 67 | # run display manager as an ordinary user 68 | User = "${cfg.user}"; 69 | }; 70 | environment = { 71 | # FIXME: This doesn't work when the user hasn't explicitly set her uid. 72 | # XDG_RUNTIME_DIR = "/run/user/${toString config.users.extraUsers.${cfg.user}.uid}"; 73 | }; 74 | }; 75 | }; 76 | } 77 | -------------------------------------------------------------------------------- /services/display/display-managers/x11/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.display; 7 | in 8 | { 9 | imports = [ 10 | ]; 11 | 12 | options = { 13 | services.display.displayManager.x11 = { 14 | enable = mkOption { 15 | type = types.bool; 16 | default = false; 17 | internal = true; 18 | description = '' 19 | Whether to enable the X server (internal option; depends on the 20 | display manager selected). 21 | ''; 22 | }; 23 | }; 24 | }; 25 | config = mkIf cfg.enable { 26 | # augment the display service with X11 options 27 | # (since we happen to be using an X11-based display manager) 28 | # TODO: use the "attr" option to define appropriate overrides 29 | # system.services.display = { 30 | # environment = 31 | # { 32 | # XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension. 33 | # XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. 34 | # LD_LIBRARY_PATH = concatStringsSep ":" ( 35 | # [ "${xorg.libX11}/lib" "${xorg.libXext}/lib" ] 36 | # ++ concatLists (catAttrs "libPath" cfg.drivers)); 37 | # } // cfg.displayManager.job.environment; 38 | # preStart = 39 | # '' 40 | # ${cfg.displayManager.job.preStart} 41 | # 42 | # rm -f /tmp/.X0-lock 43 | # ''; 44 | # }; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /services/display/sessions/default.nix: -------------------------------------------------------------------------------- 1 | # This module declares the options common to both X11 and Wayland sessions. 2 | 3 | { config, lib, pkgs, ... }: 4 | 5 | with lib; 6 | 7 | #let 8 | # /* 9 | # * The following routines check the interfaces of self-declared "session" 10 | # * modules, effectively enforcing a "polymorphism" pattern for the module 11 | # * interfaces. 12 | # * 13 | # * Strictly speaking, this is not necessary. The duck-typing of the Nix 14 | # * language will resolve well-formed session modules, and *should* catch 15 | # * most bad ones. These are more like unit tests on the module interfaces, 16 | # * which document, test, and codify the "session" interface. 17 | # */ 18 | # let 19 | # sessions = with config.services.display.sessions; 20 | # ((builtins.attrNames wayland) ++ 21 | # (builtins.attrNames x11)); 22 | # in 23 | # let 24 | # bar = null; 25 | # in 26 | # foo = null; 27 | # in 28 | # silly = null; 29 | # 30 | #in 31 | { 32 | imports = [ 33 | ./wayland/default.nix 34 | ]; 35 | 36 | options = { 37 | services.display.sessions = { 38 | }; 39 | }; 40 | 41 | config = { 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /services/display/sessions/wayland/default.nix: -------------------------------------------------------------------------------- 1 | # This module declares the options common to Wayland sessions. 2 | 3 | { config, lib, pkgs, ... }: 4 | 5 | { 6 | imports = [ 7 | ./velox/default.nix 8 | ]; 9 | 10 | options = { 11 | services.display.sessions.wayland = {}; 12 | }; 13 | 14 | config = {}; 15 | } 16 | -------------------------------------------------------------------------------- /services/display/sessions/wayland/velox/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | { 6 | options = { 7 | services.display.sessions.wayland.velox = { 8 | command = mkOption { 9 | type = types.str; 10 | internal = true; 11 | }; 12 | attr = mkOption { 13 | internal = true; 14 | description = "Internal attributes that describe the session type."; 15 | }; 16 | }; 17 | }; 18 | 19 | config = { 20 | services.display.sessions.wayland.velox = { 21 | command = "${pkgs.velox}/bin/velox"; 22 | attr = { 23 | libswc = true; 24 | }; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /services/ssh-phone-home.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | inherit (pkgs) openssh; 7 | cfg = config.services.ssh-phone-home; 8 | in 9 | 10 | { 11 | 12 | ###### interface 13 | 14 | options = { 15 | services.ssh-phone-home = { 16 | enable = mkOption { 17 | type = types.bool; 18 | default = false; 19 | description = '' 20 | Whether to enable a "phone home" reverse SSH proxy. 21 | ''; 22 | }; 23 | 24 | persist = mkOption { 25 | type = types.bool; 26 | default = true; 27 | description = '' 28 | When this is set to true, the service will persistently attempt to 29 | reconnect at intervals whenever the port forwarding operation fails. 30 | This is the recommended behavior for reliable operation. If one finds 31 | oneself in an environment where this kind of behavior might draw the 32 | suspicion of a network administrator, it might be a good idea to 33 | set this option to false (or not use ssh-phone-home 34 | at all). 35 | ''; 36 | }; 37 | 38 | localUser = mkOption { 39 | description = '' 40 | Local user to connect as (i.e. the user with password-less SSH keys). 41 | ''; 42 | }; 43 | 44 | remoteHostname = mkOption { 45 | description = '' 46 | The remote host to connect to. This should be the host outside of the 47 | firewall or NAT. 48 | ''; 49 | }; 50 | 51 | remotePort = mkOption { 52 | default = 22; 53 | description = '' 54 | The port on which to connect to the remote host via SSH protocol. 55 | ''; 56 | }; 57 | 58 | remoteUser = mkOption { 59 | description = '' 60 | The username to connect to the remote host as. 61 | ''; 62 | }; 63 | 64 | bindPort = mkOption { 65 | default = 2222; 66 | description = '' 67 | The port to bind and listen to on the remote host. 68 | ''; 69 | }; 70 | }; 71 | }; 72 | 73 | 74 | ###### implementation 75 | 76 | config = mkIf cfg.enable { 77 | systemd.services.ssh-phone-home = 78 | { 79 | description = '' 80 | Reverse SSH tunnel as a service 81 | ''; 82 | 83 | # FIXME: This isn't triggered until a reboot, and probably won't work between suspends. 84 | wantedBy = [ "multi-user.target" ]; 85 | 86 | serviceConfig = with cfg; { 87 | User = cfg.localUser; 88 | } // (if cfg.persist then 89 | { 90 | # Restart every 10 seconds on failure 91 | RestartSec = 10; 92 | Restart = "on-failure"; 93 | } 94 | else {} 95 | ); 96 | 97 | script = with cfg; '' 98 | ${openssh}/bin/ssh -NTC -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -R ${toString bindPort}:localhost:22 -l ${remoteUser} -p ${toString remotePort} ${remoteHostname} 99 | ''; 100 | }; 101 | }; 102 | } 103 | -------------------------------------------------------------------------------- /services/wayland/swc-launch.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.swc-launch; 7 | 8 | libswc = (import ../../pkgs/libswc/default.nix); 9 | in 10 | 11 | { 12 | imports = [ 13 | ./swc-servers/default.nix 14 | ]; 15 | 16 | ###### interface 17 | 18 | options = { 19 | # TODO: Since there is no login screen (yet), add option to specify login user. 20 | services.swc-launch = { 21 | enable = mkOption { 22 | type = types.bool; 23 | default = false; 24 | description = '' 25 | Whether to enable a Wayland compositor launched with swc-launch. 26 | ''; 27 | }; 28 | 29 | layout = mkOption { 30 | type = types.str; 31 | default = "us"; 32 | description = '' 33 | Keyboard layout. 34 | ''; 35 | }; 36 | 37 | xkbOptions = mkOption { 38 | type = types.str; 39 | default = ""; 40 | example = "grp:caps_toggle, grp_led:scroll"; 41 | description = '' 42 | xkb keyboard options. 43 | ''; 44 | }; 45 | 46 | tty = mkOption { 47 | type = types.int; 48 | default = 9; 49 | description = "Virtual console for swc-launch to use."; 50 | }; 51 | 52 | user = mkOption { 53 | type = types.str; 54 | default = null; 55 | description = "User to run swc-launch as."; 56 | }; 57 | }; 58 | }; 59 | 60 | 61 | ###### implementation 62 | 63 | config = mkIf cfg.enable { 64 | # needs setuid in order to manage tty's 65 | security.setuidPrograms = [ "swc-launch" ]; 66 | 67 | systemd.services.swc-launch = { 68 | enable = true; 69 | description = "Launcher for libswc-based Wayland compositors"; 70 | after = [ "systemd-udev-settle.service" "local-fs.target" ]; 71 | 72 | restartIfChanged = false; 73 | 74 | serviceConfig = { 75 | User = "${cfg.user}"; 76 | }; 77 | 78 | environment = { 79 | XKB_DEFAULT_LAYOUT = "${cfg.layout}"; 80 | XKB_DEFAULT_OPTIONS = "${cfg.xkbOptions}"; 81 | 82 | # FIXME: This doesn't work when the user hasn't explicitly set her uid. 83 | XDG_RUNTIME_DIR = "/run/user/${toString config.users.extraUsers.${cfg.user}.uid}"; 84 | 85 | # systemPackages = [ 86 | # libswc 87 | # ]; 88 | }; 89 | 90 | script = with cfg; '' 91 | ${config.security.wrapperDir}/swc-launch -t /dev/tty${toString tty} \ 92 | -- ${server.${server.active_server}.command} 93 | ''; 94 | }; 95 | }; 96 | } 97 | -------------------------------------------------------------------------------- /services/wayland/swc-servers/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let 6 | cfg = config.services.swc-launch.server; 7 | in 8 | 9 | { 10 | imports = [ 11 | ./velox.nix 12 | ]; 13 | 14 | 15 | ###### interface 16 | 17 | options = { 18 | services.swc-launch.server = { 19 | # name = mkOption { 20 | # type = types.str; 21 | # default = null; 22 | # example = "velox"; 23 | # description = "libswc server to be launched"; 24 | # }; 25 | active_server = mkOption { 26 | type = types.str; 27 | internal = true; 28 | default = null; 29 | description = '' 30 | The libswc server to be used (i.e. the server that was enabled). Only 31 | one libswc server can be active at a time. 32 | ''; 33 | }; 34 | available_servers = mkOption { 35 | type = types.listOf types.str; 36 | internal = true; 37 | default = []; 38 | description = '' 39 | The list of libswc servers that have been enabled. 40 | ''; 41 | }; 42 | }; 43 | }; 44 | 45 | 46 | ###### implementation 47 | 48 | config = { 49 | # Determine the server to be used. Must only be one server active. 50 | services.swc-launch.server.active_server = 51 | let 52 | enabled_servers = 53 | map (s: "${s.name}") ( 54 | filter (s: s.server.enable == true) ( 55 | map (s: { name = "${s}"; server = cfg.${s}; }) cfg.available_servers 56 | )); 57 | in 58 | if length enabled_servers == 1 then 59 | head enabled_servers 60 | else if length enabled_servers > 1 then 61 | throw "Only one libswc server can be enabled at a time." 62 | else null; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /services/wayland/swc-servers/velox.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | with lib; 4 | 5 | let cfg = config.services.swc-launch.server.velox; 6 | in 7 | 8 | { 9 | ###### interface 10 | options = { 11 | services.swc-launch.server.velox = { 12 | enable = mkOption { 13 | default = false; 14 | description = "Enable the Velox compositor."; 15 | }; 16 | command = mkOption { 17 | internal = true; 18 | type = types.str; 19 | description = "Velox compositor command."; 20 | }; 21 | }; 22 | }; 23 | 24 | ###### implementation 25 | config = mkIf cfg.enable { 26 | services.swc-launch.server = { available_servers = [ "velox" ]; }; 27 | services.swc-launch.server.velox = { command = "${pkgs.velox}/bin/velox"; }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$( dirname "${BASH_SOURCE[0]}" )" 4 | 5 | sudo nix-channel --update 6 | ./rebuild.sh 7 | --------------------------------------------------------------------------------