From a75a2cc1bcd5ea14ed9c7d5fb83792db011a0eb2 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Thu, 6 Jun 2024 11:31:30 +0200 Subject: [PATCH] feat: add gammastep systemd service and bind cliphist and the later to swaysession --- ansible/arch_packages.json | 1 - ansible/run_ansible_playbook.sh | 2 +- .../templates/systemd/user/cliphist.service | 7 +++---- .../templates/systemd/user/gammastep.service | 10 ++++++++++ .../systemd/user/sshfs_srv06_warmd.service | 2 +- ansible/workstation.yaml | 19 ++++++++++++++++++- 6 files changed, 33 insertions(+), 8 deletions(-) delete mode 100644 ansible/arch_packages.json create mode 100644 ansible/templates/systemd/user/gammastep.service diff --git a/ansible/arch_packages.json b/ansible/arch_packages.json deleted file mode 100644 index 687e75b..0000000 --- a/ansible/arch_packages.json +++ /dev/null @@ -1 +0,0 @@ -{"native": ["util-linux", "man-pages", "less", "git", "tmux", "screen", "openssh", "base-devel", "mosh", "python-pipx", "protobuf", "libosmium", "expat", "cups", "acpi", "smartmontools", "lshw", "dmidecode", "usbutils", "brightnessctl", "lm_sensors", "sshfs", "unbound", "bluez", "bluez-utils", "bat", "plantuml", "fzf", "ripgrep", "fd", "moreutils", "rlwrap", "pv", "at", "ansible", "ansible-lint", "strace", "jo", "jq", "fx", "yq", "xsv", "tesseract", "tesseract-data-fra", "tesseract-data-eng", "hunspell", "hunspell-en_us", "hunspell-fr", "s-nail", "figlet", "cowsay", "fortune-mod", "unzip", "unoconv", "pandoc", "libqalculate", "tig", "jwt-cli", "curl", "wget", "miniserve", "mitmproxy", "trurl", "bind", "nmap", "wireguard-tools", "tcpdump", "socat", "rsync", "rclone", "whois", "traceroute", "nload", "lsof", "w3m", "lf", "siege", "htop", "scrcpy", "kdeconnect", "python-faker", "ffmpeg", "imagemagick", "mpv", "yt-dlp", "zbar", "zint", "qrencode", "gopass", "qemu-base", "docker", "sqlite", "vim", "helix", "gcc", "make", "cmake", "libxkbcommon", "raylib", "gopls", "rust-analyzer", "redis", "python-pip", "python-poetry", "ruff", "lua", "hugo", "fish", "zoxide", "dash", "pavucontrol", "pulsemixer", "wev", "wtype", "wl-clipboard", "wofi", "sway", "swaylock", "swayidle", "swayimg", "i3status-rust", "dunst", "grim", "slurp", "cliphist", "nautilus", "cheese", "firefox-developer-edition", "torbrowser-launcher", "alacritty", "thunderbird", "signal-desktop", "zathura", "zathura-pdf-poppler", "zathura-djvu", "xournalpp", "nsxiv", "gthumb", "krita", "inkscape", "tenacity", "songrec", "cheese", "celluloid", "vlc", "obs-studio", "openscad", "blender", "libreoffice-still", "qgis", "dbeaver", "remmina", "ttf-roboto", "ttf-opensans", "ttf-liberation", "ttf-font-awesome", "ttf-fira-code", "ttf-firacode-nerd"], "aur": ["xkb-qwerty-fr", "bluetuith", "boxes", "gitwatch-git", "litecli", "fish-fzf", "shellcheck-bin", "hyprpicker", "brave-bin", "mepo", "screen-message", "ttf-sourcesanspro", "ttf-bona-nova"]} diff --git a/ansible/run_ansible_playbook.sh b/ansible/run_ansible_playbook.sh index 8572941..a53e90a 100755 --- a/ansible/run_ansible_playbook.sh +++ b/ansible/run_ansible_playbook.sh @@ -18,7 +18,7 @@ ln -s $workdir $base/vm_files ansible-playbook $base/workstation.yaml \ -v \ -u "mbess" \ - -i "inventory.yml" \ + -i "inventory.yaml" \ --ssh-extra-args "-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 -i ./master_sshkey" \ --extra-vars "@$workdir/vars.yaml" \ --extra-vars "ansible_sudo_pass=pidell43" diff --git a/ansible/templates/systemd/user/cliphist.service b/ansible/templates/systemd/user/cliphist.service index ebf7d8d..3203411 100644 --- a/ansible/templates/systemd/user/cliphist.service +++ b/ansible/templates/systemd/user/cliphist.service @@ -1,12 +1,11 @@ [Unit] -Description=Cliphist to keep history of clipboard (wayland only) -BindsTo=sway-session.target +Description=Cliphist, a history keeper of wayland clipboard daemon +PartOf=graphical-session.target [Service] Type=simple -ExecStart={{ dots }}/.dots/scripts/wayland/cliphist_daemon.sh +ExecStart=wl-paste --watch cliphist store [Install] WantedBy=sway-session.target - diff --git a/ansible/templates/systemd/user/gammastep.service b/ansible/templates/systemd/user/gammastep.service new file mode 100644 index 0000000..6f6b0aa --- /dev/null +++ b/ansible/templates/systemd/user/gammastep.service @@ -0,0 +1,10 @@ +[Unit] +Description=Gammastep, a color temperature auto shifter daemon +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=gammastep -l 49.1:1.33 -t 5000K:2500K + +[Install] +WantedBy=sway-session.target diff --git a/ansible/templates/systemd/user/sshfs_srv06_warmd.service b/ansible/templates/systemd/user/sshfs_srv06_warmd.service index 54d2e30..8d8a7c3 100644 --- a/ansible/templates/systemd/user/sshfs_srv06_warmd.service +++ b/ansible/templates/systemd/user/sshfs_srv06_warmd.service @@ -5,7 +5,7 @@ StartLimitBurst=8 [Service] Type=simple -ExecStart=/usr/bin/sshfs -f {{ user }}@srv06.rem:/warmd/mbess {{ home }}/.mnt/warmd -o reconnect,ServerAliveInterval=30,ServerAliveCountMax=5 +ExecStart=/usr/bin/sshfs -f {{ user }}@srv06.rem:/warmd/mbess {{ home }}/.mnt/srv06/warmd/mbess -o reconnect,ServerAliveInterval=30,ServerAliveCountMax=5 Restart=always StandardOutput=journal RestartSec=20 diff --git a/ansible/workstation.yaml b/ansible/workstation.yaml index e191fd2..1fdcda1 100644 --- a/ansible/workstation.yaml +++ b/ansible/workstation.yaml @@ -13,6 +13,8 @@ timer: true - name: "cliphist" enabled: true + - name: "gammastep" + enabled: true config_files: - dir: fish name: config.fish @@ -231,6 +233,11 @@ path: "{{ home }}/.mnt" state: directory recurse: true + - name: Setup mount point folder for srv06 + file: + path: "{{ home }}/.mnt/srv06/warmd/mbess" + state: directory + recurse: true - name: Setup mount point folder file: path: "{{ home }}/.mnt/etb" @@ -243,7 +250,17 @@ recurse: true - name: Setup quick notes folder file: - path: "{{ home }}/.hidden/quick_notes/" + path: "{{ home }}/quick/notes" + state: directory + recurse: true + - name: Setup quick docs folder + file: + path: "{{ home }}/quick/docs" + state: directory + recurse: true + - name: Setup quick screenshot folder + file: + path: "{{ home }}/quick/screenshots" state: directory recurse: true - name: Setup temporary secrets folder (cookies jar)