From 99fcc13535f309204ad4a1ec92790027452c0e62 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 16 Aug 2018 16:32:15 +0200 Subject: ma extra-gui: rm arduino-env --- makefu/2configs/tools/extra-gui.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/tools/extra-gui.nix b/makefu/2configs/tools/extra-gui.nix index ae97edd54..3d26cc574 100644 --- a/makefu/2configs/tools/extra-gui.nix +++ b/makefu/2configs/tools/extra-gui.nix @@ -12,7 +12,6 @@ virtmanager # Dev saleae-logic - arduino-user-env gitAndTools.gitFull signal-desktop ]; -- cgit v1.2.3 From 2e31d4bc491aa98775194592bea2dabf5d440130 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 17 Aug 2018 13:15:33 +0200 Subject: ma hw/smartcard: init --- makefu/2configs/hw/smartcard.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 makefu/2configs/hw/smartcard.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/hw/smartcard.nix b/makefu/2configs/hw/smartcard.nix new file mode 100644 index 000000000..1e9bca53b --- /dev/null +++ b/makefu/2configs/hw/smartcard.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + services.pcscd = { + enable = true; + plugins = with pkgs; [ ifdnfc ccid ]; + + }; + environment.systemPackages = with pkgs; [ + # need to run ifdnfc-activate before usage + ifdnfc + # pcsc_scan + pcsctools + ]; + boot.blacklistedKernelModules = [ + "pn533" "pn533_usb" + "nfc" + ]; +} -- cgit v1.2.3 From c07f56b772f3ea58d2a4c0f504fe3df381f6a043 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 24 Aug 2018 22:10:31 +0200 Subject: ma events-publisher: bump --- makefu/2configs/deployment/events-publisher/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/deployment/events-publisher/default.nix b/makefu/2configs/deployment/events-publisher/default.nix index c671b1a0b..a09554e6a 100644 --- a/makefu/2configs/deployment/events-publisher/default.nix +++ b/makefu/2configs/deployment/events-publisher/default.nix @@ -2,8 +2,8 @@ with import ; let shack-announce = pkgs.callPackage (builtins.fetchTarball { - url = "https://github.com/makefu/events-publisher/archive/5e7b083c63f25182a02c1fddb3d32cb9534fbc50.tar.gz"; - sha256 = "1zzlhyj8fr6y3a3b6qlyrm474xxxs1ydqjpkd2jva3g1lnzlmvkp"; + url = "https://github.com/makefu/events-publisher/archive/4cef900ba10348050208367af6b2035f5a0ef8b6.tar.gz"; + sha256 = "137vsibr289p3xxlw37xhizi309sygki95919hmj02dxgwmy1k74"; }) {} ; home = "/var/lib/shackannounce"; user = "shackannounce"; -- cgit v1.2.3 From f697fa64c92fdaac5751b64773ade4ad095c8b2c Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 30 Aug 2018 16:38:43 +0200 Subject: ma pkgs.bento4: init at 1.5.1-624 --- makefu/2configs/editor/vim.nix | 136 +++++++++++++++++++++++++++++++++++++++++ makefu/2configs/vim.nix | 136 ----------------------------------------- 2 files changed, 136 insertions(+), 136 deletions(-) create mode 100644 makefu/2configs/editor/vim.nix delete mode 100644 makefu/2configs/vim.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/editor/vim.nix b/makefu/2configs/editor/vim.nix new file mode 100644 index 000000000..43d362ed9 --- /dev/null +++ b/makefu/2configs/editor/vim.nix @@ -0,0 +1,136 @@ +{ config, pkgs, ... }: + +let + customPlugins.vim-better-whitespace = pkgs.vimUtils.buildVimPlugin { + name = "vim-better-whitespace"; + src = pkgs.fetchFromGitHub { + owner = "ntpeters"; + repo = "vim-better-whitespace"; + rev = "984c8da518799a6bfb8214e1acdcfd10f5f1eed7"; + sha256 = "10l01a8xaivz6n01x6hzfx7gd0igd0wcf9ril0sllqzbq7yx2bbk"; + }; + }; + +in { + + environment.systemPackages = [ + pkgs.python27Full # required for youcompleteme + (pkgs.vim_configurable.customize { + name = "vim"; + + vimrcConfig.customRC = '' + set nocompatible + syntax on + set list + set listchars=tab:▸\ + "set list listchars=tab:>-,trail:.,extends:> + + filetype off + filetype plugin indent on + + colorscheme darkblue + set background=dark + + set number + set relativenumber + set mouse=a + set ignorecase + set incsearch + set wildignore=*.o,*.obj,*.bak,*.exe,*.os + set textwidth=79 + set shiftwidth=2 + set expandtab + set softtabstop=2 + set shiftround + set smarttab + set tabstop=2 + set et + set autoindent + set backspace=indent,eol,start + + + inoremap + nnoremap + vnoremap + + nnoremap :UndotreeToggle + set undodir =~/.vim/undo + set undofile + "maximum number of changes that can be undone + set undolevels=1000000 + "maximum number lines to save for undo on a buffer reload + set undoreload=10000000 + + nnoremap :set invpaste paste? + set pastetoggle= + set showmode + + set showmatch + set matchtime=3 + set hlsearch + + autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red + + + " save on focus lost + au FocusLost * :wa + + autocmd BufRead *.json set filetype=json + au BufNewFile,BufRead *.mustache set syntax=mustache + + cnoremap SudoWrite w !sudo tee > /dev/null % + + " create Backup/tmp/undo dirs + set backupdir=~/.vim/backup + set directory=~/.vim/tmp + + function! InitBackupDir() + let l:parent = $HOME . '/.vim/' + let l:backup = l:parent . 'backup/' + let l:tmpdir = l:parent . 'tmp/' + let l:undodir= l:parent . 'undo/' + + + if !isdirectory(l:parent) + call mkdir(l:parent) + endif + if !isdirectory(l:backup) + call mkdir(l:backup) + endif + if !isdirectory(l:tmpdir) + call mkdir(l:tmpdir) + endif + if !isdirectory(l:undodir) + call mkdir(l:undodir) + endif + endfunction + call InitBackupDir() + + augroup Binary + " edit binaries in xxd-output, xxd is part of vim + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif + augroup END + + + + ''; + + vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; + vimrcConfig.vam.pluginDictionaries = [ + { names = [ "undotree" + # "YouCompleteMe" + "vim-better-whitespace" ]; } + # vim-nix handles indentation better but does not perform sanity + { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } + ]; + + }) + ]; +} diff --git a/makefu/2configs/vim.nix b/makefu/2configs/vim.nix deleted file mode 100644 index 43d362ed9..000000000 --- a/makefu/2configs/vim.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ config, pkgs, ... }: - -let - customPlugins.vim-better-whitespace = pkgs.vimUtils.buildVimPlugin { - name = "vim-better-whitespace"; - src = pkgs.fetchFromGitHub { - owner = "ntpeters"; - repo = "vim-better-whitespace"; - rev = "984c8da518799a6bfb8214e1acdcfd10f5f1eed7"; - sha256 = "10l01a8xaivz6n01x6hzfx7gd0igd0wcf9ril0sllqzbq7yx2bbk"; - }; - }; - -in { - - environment.systemPackages = [ - pkgs.python27Full # required for youcompleteme - (pkgs.vim_configurable.customize { - name = "vim"; - - vimrcConfig.customRC = '' - set nocompatible - syntax on - set list - set listchars=tab:▸\ - "set list listchars=tab:>-,trail:.,extends:> - - filetype off - filetype plugin indent on - - colorscheme darkblue - set background=dark - - set number - set relativenumber - set mouse=a - set ignorecase - set incsearch - set wildignore=*.o,*.obj,*.bak,*.exe,*.os - set textwidth=79 - set shiftwidth=2 - set expandtab - set softtabstop=2 - set shiftround - set smarttab - set tabstop=2 - set et - set autoindent - set backspace=indent,eol,start - - - inoremap - nnoremap - vnoremap - - nnoremap :UndotreeToggle - set undodir =~/.vim/undo - set undofile - "maximum number of changes that can be undone - set undolevels=1000000 - "maximum number lines to save for undo on a buffer reload - set undoreload=10000000 - - nnoremap :set invpaste paste? - set pastetoggle= - set showmode - - set showmatch - set matchtime=3 - set hlsearch - - autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red - - - " save on focus lost - au FocusLost * :wa - - autocmd BufRead *.json set filetype=json - au BufNewFile,BufRead *.mustache set syntax=mustache - - cnoremap SudoWrite w !sudo tee > /dev/null % - - " create Backup/tmp/undo dirs - set backupdir=~/.vim/backup - set directory=~/.vim/tmp - - function! InitBackupDir() - let l:parent = $HOME . '/.vim/' - let l:backup = l:parent . 'backup/' - let l:tmpdir = l:parent . 'tmp/' - let l:undodir= l:parent . 'undo/' - - - if !isdirectory(l:parent) - call mkdir(l:parent) - endif - if !isdirectory(l:backup) - call mkdir(l:backup) - endif - if !isdirectory(l:tmpdir) - call mkdir(l:tmpdir) - endif - if !isdirectory(l:undodir) - call mkdir(l:undodir) - endif - endfunction - call InitBackupDir() - - augroup Binary - " edit binaries in xxd-output, xxd is part of vim - au! - au BufReadPre *.bin let &bin=1 - au BufReadPost *.bin if &bin | %!xxd - au BufReadPost *.bin set ft=xxd | endif - au BufWritePre *.bin if &bin | %!xxd -r - au BufWritePre *.bin endif - au BufWritePost *.bin if &bin | %!xxd - au BufWritePost *.bin set nomod | endif - augroup END - - - - ''; - - vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; - vimrcConfig.vam.pluginDictionaries = [ - { names = [ "undotree" - # "YouCompleteMe" - "vim-better-whitespace" ]; } - # vim-nix handles indentation better but does not perform sanity - { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } - ]; - - }) - ]; -} -- cgit v1.2.3 From 9b3c1509c37389b20d84ab536882c8a65abafa31 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 30 Aug 2018 16:39:23 +0200 Subject: ma vim: move to editor --- makefu/2configs/editor/vim.nix | 105 +---------------------------------------- makefu/2configs/editor/vimrc | 98 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 104 deletions(-) create mode 100644 makefu/2configs/editor/vimrc (limited to 'makefu/2configs') diff --git a/makefu/2configs/editor/vim.nix b/makefu/2configs/editor/vim.nix index 43d362ed9..d14a611b4 100644 --- a/makefu/2configs/editor/vim.nix +++ b/makefu/2configs/editor/vim.nix @@ -18,110 +18,7 @@ in { (pkgs.vim_configurable.customize { name = "vim"; - vimrcConfig.customRC = '' - set nocompatible - syntax on - set list - set listchars=tab:▸\ - "set list listchars=tab:>-,trail:.,extends:> - - filetype off - filetype plugin indent on - - colorscheme darkblue - set background=dark - - set number - set relativenumber - set mouse=a - set ignorecase - set incsearch - set wildignore=*.o,*.obj,*.bak,*.exe,*.os - set textwidth=79 - set shiftwidth=2 - set expandtab - set softtabstop=2 - set shiftround - set smarttab - set tabstop=2 - set et - set autoindent - set backspace=indent,eol,start - - - inoremap - nnoremap - vnoremap - - nnoremap :UndotreeToggle - set undodir =~/.vim/undo - set undofile - "maximum number of changes that can be undone - set undolevels=1000000 - "maximum number lines to save for undo on a buffer reload - set undoreload=10000000 - - nnoremap :set invpaste paste? - set pastetoggle= - set showmode - - set showmatch - set matchtime=3 - set hlsearch - - autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red - - - " save on focus lost - au FocusLost * :wa - - autocmd BufRead *.json set filetype=json - au BufNewFile,BufRead *.mustache set syntax=mustache - - cnoremap SudoWrite w !sudo tee > /dev/null % - - " create Backup/tmp/undo dirs - set backupdir=~/.vim/backup - set directory=~/.vim/tmp - - function! InitBackupDir() - let l:parent = $HOME . '/.vim/' - let l:backup = l:parent . 'backup/' - let l:tmpdir = l:parent . 'tmp/' - let l:undodir= l:parent . 'undo/' - - - if !isdirectory(l:parent) - call mkdir(l:parent) - endif - if !isdirectory(l:backup) - call mkdir(l:backup) - endif - if !isdirectory(l:tmpdir) - call mkdir(l:tmpdir) - endif - if !isdirectory(l:undodir) - call mkdir(l:undodir) - endif - endfunction - call InitBackupDir() - - augroup Binary - " edit binaries in xxd-output, xxd is part of vim - au! - au BufReadPre *.bin let &bin=1 - au BufReadPost *.bin if &bin | %!xxd - au BufReadPost *.bin set ft=xxd | endif - au BufWritePre *.bin if &bin | %!xxd -r - au BufWritePre *.bin endif - au BufWritePost *.bin if &bin | %!xxd - au BufWritePost *.bin set nomod | endif - augroup END - - - - ''; - + vimrcConfig.customRC = builtins.readFile ./vimrc; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; vimrcConfig.vam.pluginDictionaries = [ { names = [ "undotree" diff --git a/makefu/2configs/editor/vimrc b/makefu/2configs/editor/vimrc new file mode 100644 index 000000000..8cdab55db --- /dev/null +++ b/makefu/2configs/editor/vimrc @@ -0,0 +1,98 @@ +set nocompatible +syntax on +set list +set listchars=tab:▸\ +"set list listchars=tab:>-,trail:.,extends:> + +filetype off +filetype plugin indent on + +colorscheme darkblue +set background=dark + +set number +set relativenumber +set mouse=a +set ignorecase +set incsearch +set wildignore=*.o,*.obj,*.bak,*.exe,*.os +set textwidth=79 +set shiftwidth=2 +set expandtab +set softtabstop=2 +set shiftround +set smarttab +set tabstop=2 +set et +set autoindent +set backspace=indent,eol,start + + +inoremap +nnoremap +vnoremap + +nnoremap :UndotreeToggle +set undodir =~/.vim/undo +set undofile +"maximum number of changes that can be undone +set undolevels=1000000 +"maximum number lines to save for undo on a buffer reload +set undoreload=10000000 + +nnoremap :set invpaste paste? +set pastetoggle= +set showmode + +set showmatch +set matchtime=3 +set hlsearch + +autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red + + +" save on focus lost +au FocusLost * :wa + +autocmd BufRead *.json set filetype=json +au BufNewFile,BufRead *.mustache set syntax=mustache + +cnoremap SudoWrite w !sudo tee > /dev/null % + +" create Backup/tmp/undo dirs +set backupdir=~/.vim/backup +set directory=~/.vim/tmp + +function! InitBackupDir() + let l:parent = $HOME . '/.vim/' + let l:backup = l:parent . 'backup/' + let l:tmpdir = l:parent . 'tmp/' + let l:undodir= l:parent . 'undo/' + + + if !isdirectory(l:parent) + call mkdir(l:parent) + endif + if !isdirectory(l:backup) + call mkdir(l:backup) + endif + if !isdirectory(l:tmpdir) + call mkdir(l:tmpdir) + endif + if !isdirectory(l:undodir) + call mkdir(l:undodir) + endif +endfunction +call InitBackupDir() + +augroup Binary + " edit binaries in xxd-output, xxd is part of vim + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif +augroup END -- cgit v1.2.3 From bf1747adb41e7c255f0c863b38cf446a70dcccab Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 2 Sep 2018 22:12:33 +0200 Subject: ma rompr: init (but will never use it) --- makefu/2configs/nginx/rompr.nix | 76 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 makefu/2configs/nginx/rompr.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/nginx/rompr.nix b/makefu/2configs/nginx/rompr.nix new file mode 100644 index 000000000..8c1fbc53b --- /dev/null +++ b/makefu/2configs/nginx/rompr.nix @@ -0,0 +1,76 @@ +{ config, lib, pkgs, ... }: + +with import ; +let + user = config.services.nginx.user; + group = config.services.nginx.group; + src = pkgs.fetchFromGitHub { + owner = "fatg3erman"; + repo = "RompR"; + rev = "1.21"; + sha256 = "00gk2c610qgpsb6y296h9pz2aaa6gfq4cqhn15l7fdrk3lkvh01q"; + }; + fpm-socket = "/var/run/php5-rompr-fpm.sock"; + mpd-src = "/var/lib/rompr"; + +in { + services.phpfpm = { + # phpfpm does not have an enable option + poolConfigs = { + mpd = '' + user = ${user} + group = ${group} + listen = ${fpm-socket} + listen.owner = ${user} + listen.group = ${group} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + chdir = / + php_admin_value[error_log] = 'stderr' + php_admin_flag[log_errors] = on + catch_workers_output = yes + ''; + }; + }; + # TODO: Pre-job + # TODO: prefs.var could be templated (serialized php ...) then we would not + # need to have a state dir at all + system.activationScripts.rompr = '' + mkdir -p ${mpd-src} + cp -r ${src}/. ${mpd-src} + chown -R ${user}:${group} ${mpd-src} + chmod 770 ${mpd-src} + ''; + services.nginx = { + enable = mkDefault true; + virtualHosts = { + "localhost" = { + root = mpd-src; + locations."/".index = "index.php"; + locations."~ \.php$" = { + root = mpd-src; + extraConfig = '' + client_max_body_size 200M; + fastcgi_pass unix:${fpm-socket}; + include ${pkgs.nginx}/conf/fastcgi_params; + include ${pkgs.nginx}/conf/fastcgi.conf; + fastcgi_index index.php; + try_files $uri =404; + ''; + }; + }; + }; + }; + services.mysql = { + enable = true; + package = pkgs.mariadb; + ensureDatabases = [ "romprdb" ]; + ensureUsers = [ + { ensurePermissions = { "romprdb.*" = "ALL PRIVILEGES"; }; + name = user; } + ]; + }; +} -- cgit v1.2.3