Merge branch 'pr/bump' into 'master'
bump master See merge request steveeJ/infra!17
This commit is contained in:
commit
de76d35f18
12 changed files with 105 additions and 36 deletions
|
@ -7,4 +7,4 @@ build:
|
||||||
- nix
|
- nix
|
||||||
script:
|
script:
|
||||||
# Test the nix-shell
|
# Test the nix-shell
|
||||||
- nix-shell --run "echo OK"
|
- just run-with-channels 'nix-shell --run "echo OK"'
|
||||||
|
|
16
Justfile
16
Justfile
|
@ -147,6 +147,7 @@ hm-iterate-qtile:
|
||||||
XEPHYR_PID=$!
|
XEPHYR_PID=$!
|
||||||
echo ${XEPHYR_PID}
|
echo ${XEPHYR_PID}
|
||||||
DISPLAY=:1 $(grep qtile ~/.xsession) &
|
DISPLAY=:1 $(grep qtile ~/.xsession) &
|
||||||
|
echo "Xephyr started. un-/grab the mouse with Ctrl + Shift-L"
|
||||||
wait $!
|
wait $!
|
||||||
kill ${XEPHYR_PID}
|
kill ${XEPHYR_PID}
|
||||||
|
|
||||||
|
@ -240,3 +241,18 @@ run-with-channels +cmds:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix)
|
source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix)
|
||||||
{{cmds}}
|
{{cmds}}
|
||||||
|
|
||||||
|
# Switch between yubikeys which have a copy of the same key
|
||||||
|
switch-yubikey:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# See https://github.com/drduh/YubiKey-Guide/issues/19
|
||||||
|
set -xe
|
||||||
|
KEY_ID=$(gpg --card-status | rg sec | rg -o '[0-9A-Z]{16}')
|
||||||
|
gpg --delete-secret-and-public-keys $KEY_ID
|
||||||
|
# TODO: fix this as it still blocks on the gpg prompt
|
||||||
|
gpg2 --edit-card <<-EOF
|
||||||
|
fetch
|
||||||
|
quit
|
||||||
|
EOF
|
||||||
|
gpg-connect-agent "scd serialno" "learn --force" /bye
|
||||||
|
gpg --card-status
|
||||||
|
|
|
@ -146,7 +146,7 @@ in {
|
||||||
gnome3.cheese
|
gnome3.cheese
|
||||||
|
|
||||||
# Virtualization
|
# Virtualization
|
||||||
masterpkgs.virtmanager
|
virtmanager
|
||||||
(pkgs.lib.hiPrio qemu)
|
(pkgs.lib.hiPrio qemu)
|
||||||
# virtualbox
|
# virtualbox
|
||||||
vagrant
|
vagrant
|
||||||
|
@ -360,6 +360,8 @@ in {
|
||||||
gnome3.dconf
|
gnome3.dconf
|
||||||
picocom
|
picocom
|
||||||
glib.dev # contains gdbus tool
|
glib.dev # contains gdbus tool
|
||||||
|
alacritty
|
||||||
|
roxterm
|
||||||
|
|
||||||
# Screen recording
|
# Screen recording
|
||||||
# gtk-recordmydesktop # can't select the window
|
# gtk-recordmydesktop # can't select the window
|
||||||
|
|
|
@ -32,8 +32,10 @@ let
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
|
# FIXME: alacritty's reflow on grow is currently broken (on my system)
|
||||||
|
terminalCommand = "${pkgs.alacritty}/bin/alacritty";
|
||||||
|
# terminalCommand = "${pkgs.roxterm}/bin/roxterm";
|
||||||
|
|
||||||
terminal = "${pkgs.gnome3.gnome_terminal}/bin/gnome-terminal";
|
|
||||||
|
|
||||||
qtileConfig = pkgs.writeScript "qtile_config.py" ''
|
qtileConfig = pkgs.writeScript "qtile_config.py" ''
|
||||||
from libqtile.config import Key, Screen, Group, Drag, Click
|
from libqtile.config import Key, Screen, Group, Drag, Click
|
||||||
|
@ -98,9 +100,9 @@ key_control = "control"
|
||||||
|
|
||||||
keys = [
|
keys = [
|
||||||
# https://github.com/qtile/qtile/blob/develop/libqtile/xkeysyms.py
|
# https://github.com/qtile/qtile/blob/develop/libqtile/xkeysyms.py
|
||||||
Key([key_super], "Return", lazy.spawn("${terminal}")),
|
Key([key_super], "Return", lazy.spawn("${terminalCommand}")),
|
||||||
Key([key_super], "backslash", lazy.spawn("${terminal}")),
|
Key([key_super], "backslash", lazy.spawn("${terminalCommand}")),
|
||||||
Key([key_super], "apostrophe", lazy.spawn("${terminal}")),
|
Key([key_super], "apostrophe", lazy.spawn("${terminalCommand}")),
|
||||||
Key([key_super], "r", lazy.spawncmd()),
|
Key([key_super], "r", lazy.spawncmd()),
|
||||||
Key([key_super], "w", lazy.window.kill()),
|
Key([key_super], "w", lazy.window.kill()),
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,40 @@ let
|
||||||
channelSources = (import ../../default.nix {
|
channelSources = (import ../../default.nix {
|
||||||
versionsPath = ../../variables/versions.nix;
|
versionsPath = ../../variables/versions.nix;
|
||||||
}).channelSources;
|
}).channelSources;
|
||||||
|
|
||||||
|
just-plugin =
|
||||||
|
let
|
||||||
|
plugin_file = pkgs.writeText "_just" ''
|
||||||
|
#compdef just
|
||||||
|
#autload
|
||||||
|
|
||||||
|
alias justl="\just --list"
|
||||||
|
alias juste="\just --evaluate"
|
||||||
|
|
||||||
|
local subcmds=()
|
||||||
|
|
||||||
|
while read -r line ; do
|
||||||
|
if [[ ! $line == Available* ]] ;
|
||||||
|
then
|
||||||
|
subcmds+=(''${line/[[:space:]]*\#/:})
|
||||||
|
fi
|
||||||
|
done < <(just --list)
|
||||||
|
|
||||||
|
_describe 'command' subcmds
|
||||||
|
'';
|
||||||
|
|
||||||
|
in pkgs.stdenv.mkDerivation {
|
||||||
|
name = "just-completions";
|
||||||
|
version = "0.1.0";
|
||||||
|
phases = "installPhase";
|
||||||
|
installPhase = ''
|
||||||
|
PLUGIN_PATH=$out/share/oh-my-zsh/plugins/just
|
||||||
|
mkdir -p $PLUGIN_PATH
|
||||||
|
cp ${plugin_file} $PLUGIN_PATH/_just
|
||||||
|
chmod --recursive a-w $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -15,8 +49,7 @@ in {
|
||||||
enableCompletion = false;
|
enableCompletion = false;
|
||||||
enableAutosuggestions = true;
|
enableAutosuggestions = true;
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f
|
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||||
%_%F{%(!.red.green)}$(prompt_char)%f '
|
|
||||||
RPROMPT=""
|
RPROMPT=""
|
||||||
|
|
||||||
# Automatic rehash
|
# Automatic rehash
|
||||||
|
@ -39,6 +72,11 @@ in {
|
||||||
unsetopt AUTO_CD
|
unsetopt AUTO_CD
|
||||||
|
|
||||||
source ${channelSources}
|
source ${channelSources}
|
||||||
|
|
||||||
|
# print lines without termination
|
||||||
|
setopt PROMPT_CR
|
||||||
|
setopt PROMPT_SP
|
||||||
|
export PROMPT_EOL_MARK=""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
|
@ -52,8 +90,8 @@ in {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "zsh-users";
|
owner = "zsh-users";
|
||||||
repo = "zsh-autosuggestions";
|
repo = "zsh-autosuggestions";
|
||||||
rev = "v0.4.0";
|
rev = "v0.6.3";
|
||||||
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
sha256 = "1smskx9vkx78yhwspjq2c5r5swh9fc5xxa40ib4753f00wk4dwpp";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -62,8 +100,8 @@ in {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "b4b4r07";
|
owner = "b4b4r07";
|
||||||
repo = "enhancd";
|
repo = "enhancd";
|
||||||
rev = "v2.2.1";
|
rev = "v2.2.4";
|
||||||
sha256 = "0iqa9j09fwm6nj5rpip87x3hnvbbz9w9ajgm6wkrd5fls8fn8i5g";
|
sha256 = "1smskx9vkx78yhwspjq2c5r5swh9fc5xxa40ib4753f00wk4dwpp";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -74,6 +112,10 @@ in {
|
||||||
name = "minikube";
|
name = "minikube";
|
||||||
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/minikube";
|
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/minikube";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "just";
|
||||||
|
src = "${just-plugin}/share/oh-my-zsh/plugins/just";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{
|
{
|
||||||
channelsNixosStable = {
|
channelsNixosStable = {
|
||||||
ref = "nixos-19.03";
|
ref = "nixos-19.03";
|
||||||
rev = "1601f559e89ba71091faa26888711d4dd24c2d4d";
|
rev = "aef662d2eb532eeb9976068fd1705e3cf3663054";
|
||||||
};
|
};
|
||||||
channelsNixosUnstable = {
|
channelsNixosUnstable = {
|
||||||
ref = "nixos-unstable";
|
ref = "nixos-unstable";
|
||||||
rev = "7815c86c104a99417db844791dcda34fe7a7965f";
|
rev = "73392e79aa62e406683d6a732eb4f4101f4732be";
|
||||||
};
|
};
|
||||||
nixpkgsMaster = {
|
nixpkgsMaster = {
|
||||||
url = "https://github.com/NixOS/nixpkgs/";
|
url = "https://github.com/NixOS/nixpkgs/";
|
||||||
ref = "master";
|
ref = "master";
|
||||||
rev = "aa2f3eb8b102ffed4258a7e7fbc0a7d17b7ba319";
|
rev = "51aa3cc4855c5964a6e71adcf7b79c1a0c23f322";
|
||||||
};
|
};
|
||||||
homeManagerModule = {
|
homeManagerModule = {
|
||||||
url = "https://github.com/rycee/home-manager";
|
url = "https://github.com/rycee/home-manager";
|
||||||
ref = "master";
|
ref = "master";
|
||||||
rev = "cf0aad391c10473fa7613dcc41b1f6a366d03148";
|
rev = "95382060ebaa19ec49a861921216b1db8460b314";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
self: super:
|
self: super:
|
||||||
|
|
||||||
let
|
let
|
||||||
nixpkgs-master = import (builtins.fetchTarball {
|
nixpkgs-master = import <nixpkgs-master> {};
|
||||||
url = "https://github.com/NixOS/nixpkgs-channels/archive/de5fd9e6110489722e8667664dce9fdc17331866.tar.gz";
|
|
||||||
sha256 = "0z1j2pmvn15m2ir2i9l2prr81cq7f1x8xs4cv2s7q4fslz586ghn";
|
|
||||||
}) {};
|
|
||||||
# one application requires php5
|
# one application requires php5
|
||||||
nixpkgsWithPhp5 = super.fetchFromGitHub {
|
nixpkgsWithPhp5 = super.fetchFromGitHub {
|
||||||
owner = "nixos";
|
owner = "nixos";
|
||||||
|
@ -14,6 +12,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
alacritty = nixpkgs-master.alacritty;
|
||||||
podman = nixpkgs-master.podman;
|
podman = nixpkgs-master.podman;
|
||||||
conmon = nixpkgs-master.conmon;
|
conmon = nixpkgs-master.conmon;
|
||||||
|
|
||||||
|
@ -23,6 +22,16 @@ in {
|
||||||
slirp4netns = super.callPackage ./pkgs/slirp4netns.nix {};
|
slirp4netns = super.callPackage ./pkgs/slirp4netns.nix {};
|
||||||
staruml = super.callPackage ./pkgs/staruml.nix { inherit (super.gnome2) GConf; libgcrypt = super.libgcrypt_1_5; };
|
staruml = super.callPackage ./pkgs/staruml.nix { inherit (super.gnome2) GConf; libgcrypt = super.libgcrypt_1_5; };
|
||||||
|
|
||||||
|
roxterm = super.stdenv.mkDerivation {
|
||||||
|
name = "roxterm-custom";
|
||||||
|
buildInputs = [ super.makeWrapper ];
|
||||||
|
phases = "installPhase";
|
||||||
|
installPhase = ''
|
||||||
|
makeWrapper ${super.roxterm}/bin/roxterm $out/bin/roxterm \
|
||||||
|
--add-flags "--separate"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
busyboxStatic = super.busybox.override {
|
busyboxStatic = super.busybox.override {
|
||||||
enableStatic = true;
|
enableStatic = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
post-setup:
|
|
||||||
ansible-playbook -i hosts openwrt-post-setup.yaml --verbose
|
|
|
@ -1 +0,0 @@
|
||||||
router-wan.lan ansible_ssh_user=root
|
|
|
@ -1,13 +0,0 @@
|
||||||
# * https://openwrt.org/docs/guide-user/services/nas/usb-storage-samba-webinterface
|
|
||||||
|
|
||||||
- hosts: router-wan.lan
|
|
||||||
gather_facts: no
|
|
||||||
tasks:
|
|
||||||
- name: udpate pkg database
|
|
||||||
raw: opkg update
|
|
||||||
- name: install packages
|
|
||||||
raw: opkg install {{ item }}
|
|
||||||
loop:
|
|
||||||
- luci-ssl
|
|
||||||
- luci-app-samba samba36-server
|
|
||||||
- block-mount blockd kmod-fs-vmod kmod-fs-vfat kmod-usb-storage usbutils
|
|
8
services/home-ch/router-wan.lan/Justfile
Normal file
8
services/home-ch/router-wan.lan/Justfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
_run_ssh_cmd cmd:
|
||||||
|
ssh root@router-wan.lan "{{cmd}}"
|
||||||
|
|
||||||
|
post-setup:
|
||||||
|
just -v _run_ssh_cmd "opkg update"
|
||||||
|
just -v _run_ssh_cmd "opkg install luci-ssl"
|
||||||
|
just -v _run_ssh_cmd "opkg install luci-app-samba samba36-server"
|
||||||
|
just -v _run_ssh_cmd "opkg install block-mount blockd kmod-fs-vfat kmod-usb-storage usbutils"
|
|
@ -20,6 +20,12 @@ stdenv.mkDerivation {
|
||||||
imagemagick
|
imagemagick
|
||||||
|
|
||||||
esh
|
esh
|
||||||
|
|
||||||
|
xorg.xwininfo
|
||||||
|
|
||||||
|
|
||||||
|
# testing
|
||||||
|
alacritty
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set Environment Variables
|
# Set Environment Variables
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue