From 9c09cf30c3eba8137ecf2b4aa3b5fa65a283499e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Nov 2018 02:47:03 +0100 Subject: tv gitrepos: add hc --- tv/2configs/gitrepos.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv/2configs') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 62c90d4e9..a89d1302c 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -76,6 +76,7 @@ let { }; } // mapAttrs (_: recursiveUpdate { cgit.section = "3. Haskell libraries"; }) { blessings = {}; + hc = {}; mime = {}; quipper = {}; scanner = {}; -- cgit v1.2.3 From 6f512840395fa404385aadacf560f52ef152479a Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 15 Nov 2018 10:43:28 +0100 Subject: tv vim: add fzf --- tv/2configs/vim.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 2ac7f7518..544fe94ae 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -14,6 +14,16 @@ let { }; extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [ + # cannot use pkgs.vimPlugins.fzf-vim as it's missing :Rg + (pkgs.vimUtils.buildVimPlugin { + name = "junegunn"; + src = pkgs.fetchgit { + url = git://github.com/junegunn/fzf.vim; + rev = "ad1833ecbc9153b6e34a4292dc089a58c4bcb8dc"; + sha256 = "1z2q71q6l9hq9fqfqpj1svhyk4yk1bzw1ljhksx4bnpz8gkfbx2m"; + }; + }) + pkgs.vimPlugins.fzfWrapper pkgs.vimPlugins.undotree pkgs.vimPlugins.vim-elixir (pkgs.vimUtils.buildVimPlugin { @@ -309,6 +319,11 @@ let { paths = [ (pkgs.writeDashBin "vim" '' set -efu + export FZF_DEFAULT_COMMAND='${pkgs.ripgrep}/bin/rg --files' + export PATH=$PATH:${makeBinPath [ + pkgs.fzf + pkgs.ripgrep + ]} (umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString need-dirs}) exec ${pkgs.vim}/bin/vim "$@" '') @@ -385,5 +400,9 @@ let { noremap [c | noremap! [c noremap [d | noremap! [d vnoremap u + + " fzf + nnoremap q :Files + nnoremap w :Rg ''; } -- cgit v1.2.3 From 66204349496ede2f451ba14471efb2c23f74f76e Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 15 Nov 2018 10:45:22 +0100 Subject: tv vim: M-a edits alternate buffer --- tv/2configs/vim.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 544fe94ae..469ae3e2a 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -404,5 +404,9 @@ let { " fzf nnoremap q :Files nnoremap w :Rg + + " edit alternate buffer + " For some reason neither putting 6 nor ^ works here... + nnoremap a  ''; } -- cgit v1.2.3 From 1fc9124e81dd1d25bd5c05f30db68e0bd43f1ff8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 16 Nov 2018 17:06:20 +0100 Subject: tv vim: set timeoutlen=0 --- tv/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 469ae3e2a..a63d80228 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -348,6 +348,7 @@ let { set shortmess+=I set showcmd set showmatch + set timeoutlen=0 set ttimeoutlen=0 set undodir=${dirs.undodir} set undofile -- cgit v1.2.3 From cc053bd01d79ac2b41a56ca7c0f04179547a2514 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 16 Nov 2018 17:18:07 +0100 Subject: tv vim: neaten fzf plugin --- tv/2configs/vim.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index a63d80228..e51f07774 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -16,9 +16,9 @@ let { extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [ # cannot use pkgs.vimPlugins.fzf-vim as it's missing :Rg (pkgs.vimUtils.buildVimPlugin { - name = "junegunn"; + name = "fzf-2018-11-14"; src = pkgs.fetchgit { - url = git://github.com/junegunn/fzf.vim; + url = https://github.com/junegunn/fzf.vim; rev = "ad1833ecbc9153b6e34a4292dc089a58c4bcb8dc"; sha256 = "1z2q71q6l9hq9fqfqpj1svhyk4yk1bzw1ljhksx4bnpz8gkfbx2m"; }; -- cgit v1.2.3 From 083a8ca2aed285e94383b216347ee4e6ef44c6a6 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 16 Nov 2018 17:19:13 +0100 Subject: tv vim elixir: b916c00 -> 0a847f0 --- tv/2configs/vim.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index e51f07774..a5641f094 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -25,7 +25,14 @@ let { }) pkgs.vimPlugins.fzfWrapper pkgs.vimPlugins.undotree - pkgs.vimPlugins.vim-elixir + (pkgs.vimUtils.buildVimPlugin { + name = "vim-elixir-2018-08-17"; + src = pkgs.fetchgit { + url = https://github.com/elixir-editors/vim-elixir; + rev = "0a847f0faed5ba2d94bb3d51f355c50f37ba025b"; + sha256 = "1jl85wpgywhcvhgw02y8zpvqf0glr4i8522kxpvhsiacb1v1xh04"; + }; + }) (pkgs.vimUtils.buildVimPlugin { name = "vim-syntax-jq"; src = pkgs.fetchgit { -- cgit v1.2.3 From 88ac2f40812b52220c1e2db290440c5abf42964e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Nov 2018 12:09:19 +0100 Subject: tv xp332: add utsushi-customized --- tv/2configs/xp-332.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index 627401dc6..4a0b0ae16 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -11,7 +11,7 @@ with import ; hardware.sane = { enable = true; extraBackends = [ - pkgs.utsushi + pkgs.utsushi-customized ]; }; @@ -19,7 +19,7 @@ with import ; elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ]; nixpkgs.overlays = singleton (self: super: { - utsushi = super.utsushi.override { + utsushi-customized = self.utsushi.override { guiSupport = false; jpegSupport = false; networkSupport = true; -- cgit v1.2.3 From 57ce731ffb28adfc854de3caa1987509e1939559 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Nov 2018 09:55:38 +0100 Subject: tv xmonad: use fzmenu --- tv/2configs/xserver/Xresources.nix | 5 +++++ tv/2configs/xserver/default.nix | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/Xresources.nix b/tv/2configs/xserver/Xresources.nix index 1d4044480..b8a4e822b 100644 --- a/tv/2configs/xserver/Xresources.nix +++ b/tv/2configs/xserver/Xresources.nix @@ -50,4 +50,9 @@ pkgs.writeText "Xresources" /* xdefaults */ '' root-urxvt*foreground: #e0c0c0 root-urxvt*BorderColor: #400000 root-urxvt*color0: #800000 + + fzmenu-urxvt*background: rgb:42/23/42 + fzmenu-urxvt*externalBorder: 1 + fzmenu-urxvt*externalBorder: 1 + fzmenu-urxvt*geometry: 70x9 '' diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index dbfa804d2..d1345723d 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -63,6 +63,11 @@ in { environment = { DISPLAY = ":${toString config.services.xserver.display}"; + FZMENU_FZF_DEFAULT_OPTS = toString [ + "--color=dark,border:126,bg+:090" + "--inline-info" + ]; + XMONAD_CACHE_DIR = cfg.cacheDir; XMONAD_CONFIG_DIR = cfg.configDir; XMONAD_DATA_DIR = cfg.dataDir; -- cgit v1.2.3 From d5551ed214479317925239a9801384c9c3aa9add Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Nov 2018 14:29:07 +0100 Subject: tv fzmenu-urxvt: add internalBorder --- tv/2configs/xserver/Xresources.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/Xresources.nix b/tv/2configs/xserver/Xresources.nix index b8a4e822b..d032efc7d 100644 --- a/tv/2configs/xserver/Xresources.nix +++ b/tv/2configs/xserver/Xresources.nix @@ -53,6 +53,6 @@ pkgs.writeText "Xresources" /* xdefaults */ '' fzmenu-urxvt*background: rgb:42/23/42 fzmenu-urxvt*externalBorder: 1 - fzmenu-urxvt*externalBorder: 1 fzmenu-urxvt*geometry: 70x9 + fzmenu-urxvt*internalBorder: 1 '' -- cgit v1.2.3 From 1d7fddc064fef5e77c48602e3524949893a92997 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Nov 2018 14:41:56 +0100 Subject: tv xmonad: add currentSystem to executable name This prevents journal messges like: XMonad is recompiling and replacing itself another XMonad process because the current process is called "xmonad" but the compiled configuration should be called "xmonad-x86_64-linux" --- tv/2configs/xserver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index d1345723d..a44ece8b1 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -100,8 +100,8 @@ in { "\${XMONAD_CONFIG_DIR}" "\${XMONAD_DATA_DIR}" ]}"; - ExecStart = "${pkgs.xmonad-tv}/bin/xmonad"; - ExecStop = "${pkgs.xmonad-tv}/bin/xmonad --shutdown"; + ExecStart = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem}"; + ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown"; User = cfg.user.name; WorkingDirectory = cfg.user.home; }; -- cgit v1.2.3 From 2b9d361f7f8ef6334c4832d6eb87f2b6008e352f Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Nov 2018 17:03:15 +0100 Subject: tv xmonad: wait for shutdown to complete --- tv/2configs/xserver/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index a44ece8b1..199ffcaf8 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -101,7 +101,7 @@ in { "\${XMONAD_DATA_DIR}" ]}"; ExecStart = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem}"; - ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown"; + ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown $MAINPID"; User = cfg.user.name; WorkingDirectory = cfg.user.home; }; -- cgit v1.2.3 From d1f81ace7241cf751f8a02c102b02bc1c8ad6c07 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Nov 2018 18:30:19 +0100 Subject: tv urlwatch: remove nixos --- tv/2configs/urlwatch.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 77947dafa..7467e8e67 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -27,11 +27,6 @@ in { # 2014-09-24 ref https://github.com/4z3/xintmap http://www.mathstat.dal.ca/~selinger/quipper/ - ## other - - https://nixos.org/channels/nixos-18.03/git-revision - https://nixos.org/channels/nixos-unstable/git-revision - ## 2014-10-17 ## TODO update ~/src/login/default.nix #http://hackage.haskell.org/package/bcrypt -- cgit v1.2.3 From 53359a60f5f0114b013c6241b52aa7387d1b922a Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 29 Nov 2018 21:24:31 +0100 Subject: xmonad-stockholm: 1.2.0 -> 1.3.0 --- tv/2configs/xserver/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 199ffcaf8..a44ece8b1 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -101,7 +101,7 @@ in { "\${XMONAD_DATA_DIR}" ]}"; ExecStart = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem}"; - ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown $MAINPID"; + ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown"; User = cfg.user.name; WorkingDirectory = cfg.user.home; }; -- cgit v1.2.3 From 94a09258ad3202cfba1bcba8cdbf99b51f5aae86 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 09:03:52 +0100 Subject: tv xmonad: move to haskell packages --- tv/2configs/xserver/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index a44ece8b1..9cb487254 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -57,7 +57,9 @@ in { systemd.services.display-manager.enable = false; - systemd.services.xmonad = { + systemd.services.xmonad = let + xmonad = "${pkgs.haskellPackages.xmonad-tv}/bin/xmonad"; + in { wantedBy = [ "graphical.target" ]; requires = [ "xserver.service" ]; environment = { @@ -93,6 +95,11 @@ in { "za" "zh" "zj" "zs" ]); }; + path = [ + pkgs.alsaUtils + pkgs.fzmenu + pkgs.rxvt_unicode + ]; serviceConfig = { SyslogIdentifier = "xmonad"; ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${toString [ @@ -100,8 +107,8 @@ in { "\${XMONAD_CONFIG_DIR}" "\${XMONAD_DATA_DIR}" ]}"; - ExecStart = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem}"; - ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown"; + ExecStart = "@${xmonad} xmonad-${currentSystem} "; + ExecStop = "@${xmonad} xmonad-${currentSystem} --shutdown"; User = cfg.user.name; WorkingDirectory = cfg.user.home; }; -- cgit v1.2.3 From 220969d4d3d435b59c6f121cdc7eb86719dcfd80 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 13:15:49 +0100 Subject: tv: remove systemd aliases --- tv/2configs/default.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d9ddc90d0..484a337b7 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -87,11 +87,6 @@ with import ; export SYSTEM="$1" exec nix-shell -I stockholm="$PWD" --run 'deploy --system="$SYSTEM"' ''; - reload = "systemctl reload"; - restart = "systemctl restart"; - start = "systemctl start"; - status = "systemctl status"; - stop = "systemctl stop"; }; environment.variables = { -- cgit v1.2.3 From ed44b2dacdb33156921a859733991295dc4c2502 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 14:04:42 +0100 Subject: tv bash: use XMONAD_SPAWN_WORKSPACE only for tv change directory only for interactivetv user --- tv/2configs/bash/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index b75ad8bfc..3b4a4aadb 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -13,6 +13,18 @@ with import ; shopt -s histappend histreedit histverify shopt -s no_empty_cmd_completion complete -d cd + + case $UID in + ${shell.escape (toString config.krebs.users.tv.uid)}) + if test ''${SHLVL-1} = 1; then + case ''${XMONAD_SPAWN_WORKSPACE-} in + stockholm) + cd ~/stockholm + ;; + esac + fi + ;; + esac ''; promptInit = /* sh */ '' case $UID in @@ -32,14 +44,6 @@ with import ; if test -n "$SSH_AGENT_PID"; then PS1="ssh-agent[$SSH_AGENT_PID] $PS1" fi - - if test ''${SHLVL-1} = 1; then - case ''${XMONAD_SPAWN_WORKSPACE-} in - stockholm) - cd ~/stockholm - ;; - esac - fi ''; }; } -- cgit v1.2.3 From 8a17b6fb1750b3f11b3f1b12fe12317b916026fe Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 14:07:58 +0100 Subject: tv bash: redefine for tv --- tv/2configs/bash/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 3b4a4aadb..d7673931c 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -23,6 +23,8 @@ with import ; ;; esac fi + + export NIX_PATH="stockholm=$HOME/stockholm:$NIX_PATH" ;; esac ''; -- cgit v1.2.3 From 08849bbb4e731a4b655fa2456bad6925e7a70e8d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 16:17:32 +0100 Subject: tv xmonad: amixer -> pactl --- tv/2configs/xserver/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 9cb487254..22c94f7b1 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -96,8 +96,8 @@ in { ]); }; path = [ - pkgs.alsaUtils pkgs.fzmenu + pkgs.pulseaudioLight.out pkgs.rxvt_unicode ]; serviceConfig = { -- cgit v1.2.3 From b9bd7a08b8aab6c0a7b4df5bad2ac7d40474633a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 14:52:25 +0100 Subject: tv xmonad: find all paths --- tv/2configs/xserver/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 22c94f7b1..480295565 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -99,6 +99,7 @@ in { pkgs.fzmenu pkgs.pulseaudioLight.out pkgs.rxvt_unicode + "/run/wrappers" # for slock, and su ]; serviceConfig = { SyslogIdentifier = "xmonad"; -- cgit v1.2.3 From 46dc547bbe9edbb2a314145482e220287ab4c70a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 15:36:55 +0100 Subject: tv xmonad: use slock service --- tv/2configs/xserver/default.nix | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 480295565..b513dabbe 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -24,17 +24,6 @@ in { pkgs.xlibs.fontschumachermisc ]; - # TODO dedicated group, i.e. with a single user [per-user-setuid] - # TODO krebs.setuid.slock.path vs /run/wrappers/bin - krebs.setuid.slock = { - filename = "${pkgs.slock}/bin/slock"; - group = "wheel"; - envp = { - DISPLAY = ":${toString config.services.xserver.display}"; - USER = cfg.user.name; - }; - }; - services.xserver = { # Don't install feh into systemPackages @@ -96,10 +85,11 @@ in { ]); }; path = [ + config.tv.slock.package pkgs.fzmenu pkgs.pulseaudioLight.out pkgs.rxvt_unicode - "/run/wrappers" # for slock, and su + "/run/wrappers" # for su ]; serviceConfig = { SyslogIdentifier = "xmonad"; @@ -155,4 +145,9 @@ in { User = cfg.user.name; }; }; + + tv.slock = { + enable = true; + user = cfg.user; + }; } -- cgit v1.2.3 From a58628d1c3c8fb4d730ee77ce3fae6130271962f Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 15:43:49 +0100 Subject: tv xmonad: add xcalib --- tv/2configs/xserver/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index b513dabbe..8d4b13fad 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -89,6 +89,7 @@ in { pkgs.fzmenu pkgs.pulseaudioLight.out pkgs.rxvt_unicode + pkgs.xcalib "/run/wrappers" # for su ]; serviceConfig = { -- cgit v1.2.3 From a3e47e6788b568cf04d5103ad8a918ed902df9ce Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 16:03:36 +0100 Subject: tv: rename vim-tv to vim-syntax-nix-nested --- tv/2configs/vim.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index a5641f094..c6364c223 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -129,7 +129,7 @@ let { command! -n=0 -bar ShowSyntax :call ShowSyntax() ''; }))) - ((rtp: rtp // { inherit rtp; }) (pkgs.write "vim-tv" { + ((rtp: rtp // { inherit rtp; }) (pkgs.write "vim-syntax-nix-nested" { "/syntax/haskell.vim".text = /* vim */ '' syn region String start=+\[[[:alnum:]]*|+ end=+|]+ -- cgit v1.2.3 From e847d935ade4b36aecf8588faffb3dd61e3ebdfe Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 15:48:01 +0100 Subject: tv vim-syntax-nix-nested: simplify regexes --- tv/2configs/vim.nix | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index c6364c223..009280815 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -239,26 +239,56 @@ let { " This is required because containedin isn't transitive. syn cluster nix_has_dollar_curly \ add=@nix_${lang}_syntax - '') { + '') (let + + capitalize = s: let + xs = stringToCharacters s; + in + toUpper (head xs) + concatStrings (tail xs); + + alts = xs: ''\(${concatStringsSep ''\|'' xs}\)''; + def = k: ''${k}[ \t\r\n]*=''; + writer = k: ''write${k}[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)''; + + in { c = {}; cabal = {}; diff = {}; haskell = {}; - jq.extraStart = concatStringsSep ''\|'' [ - ''writeJq.*'' + jq.extraStart = alts [ + (writer "Jq") ''write[^ \t\r\n]*[ \t\r\n]*"[^"]*\.jq"'' ]; lua = {}; - sed.extraStart = ''writeSed[^ \t\r\n]*[ \t\r\n]*"[^"]*"''; - sh.extraStart = concatStringsSep ''\|'' [ - ''write\(A\|Ba\|Da\)sh[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)'' - ''[a-z]*Phase[ \t\r\n]*='' + sed.extraStart = writer "Sed"; + sh.extraStart = let + phases = [ + "unpack" + "patch" + "configure" + "build" + "check" + "install" + "fixup" + "installCheck" + "dist" + ]; + shells = [ + "ash" + "bash" + "dash" + ]; + in alts [ + (def "shellHook") + (def "${alts phases}Phase") + (def "${alts ["pre" "post"]}${alts (map capitalize phases)}") + (writer (alts (map capitalize shells))) ]; yaml = {}; vim.extraStart = ''write[^ \t\r\n]*[ \t\r\n]*"\(\([^"]*\.\)\?vimrc\|[^"]*\.vim\)"''; xdefaults = {}; - })} + }))} " Clear syntax that interferes with nixINSIDE_DOLLAR_CURLY. syn clear shVarAssign -- cgit v1.2.3 From c544596952c7ed42479616cea6904b061085e2f0 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 16:07:53 +0100 Subject: tv vim-syntax-nix-nested: add js, and py --- tv/2configs/vim.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 009280815..3794628c1 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -259,7 +259,9 @@ let { (writer "Jq") ''write[^ \t\r\n]*[ \t\r\n]*"[^"]*\.jq"'' ]; + javascript.extraStart = ''/\* js \*/''; lua = {}; + python.extraStart = ''/\* py \*/''; sed.extraStart = writer "Sed"; sh.extraStart = let phases = [ -- cgit v1.2.3 From 145723a8e4d8cb51386cec51b871e3056fb62372 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Dec 2018 19:25:56 +0100 Subject: tv pulse: use genid_uint31 Refs https://github.com/systemd/systemd/issues/11026 --- tv/2configs/pulse.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index c051b4261..2e679bd14 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -95,7 +95,7 @@ in users = { groups.pulse.gid = config.users.users.pulse.uid; users.pulse = { - uid = genid "pulse"; + uid = genid_uint31 "pulse"; group = "pulse"; extraGroups = [ "audio" ]; home = "${runDir}/home"; -- cgit v1.2.3