Compare commits
3 Commits
59b1672804
...
6b49ef4e19
Author | SHA1 | Date |
---|---|---|
Frieder Schlesier | 6b49ef4e19 | |
Frieder Schlesier | 5f7113ec21 | |
Frieder Schlesier | e01c87419e |
1
.aliases
1
.aliases
|
@ -7,6 +7,7 @@ alias up='sudo apt update && sudo apt upgrade'
|
|||
alias upnodock='sudo apt-mark hold docker-ce docker-ce-cli && sudo apt update && sudo apt upgrade && sudo apt-mark unhold docker-ce docker-ce-cli'
|
||||
|
||||
alias o='xdg-open'
|
||||
alias s='kitty +kitten ssh'
|
||||
alias cat='bat'
|
||||
# alias rg='ripgrep'
|
||||
alias ll='ls -ahlF'
|
||||
|
|
29
.bashrc
29
.bashrc
|
@ -13,9 +13,9 @@ esac
|
|||
HISTCONTROL=ignoreboth
|
||||
|
||||
# allow docker to use X
|
||||
if [ -f /usr/bin/xhost ]; then
|
||||
xhost +local:root
|
||||
fi
|
||||
# if [ -f /usr/bin/xhost ]; then
|
||||
# xhost +local:root
|
||||
# fi
|
||||
|
||||
# Load the shell dotfiles, and then some:
|
||||
# * ~/.path can be used to extend `$PATH`.
|
||||
|
@ -119,9 +119,17 @@ if ! shopt -oq posix; then
|
|||
fi
|
||||
. "$HOME/.cargo/env"
|
||||
|
||||
if [ -z "$SSH_AUTH_SOCK" ] ; then
|
||||
eval `ssh-agent -s`
|
||||
# ssh-add
|
||||
ssh-add -l &>/dev/null
|
||||
if [ "$?" == 2 ]; then
|
||||
test -r ~/.ssh-agent && \
|
||||
eval "$(<~/.ssh-agent)" >/dev/null
|
||||
|
||||
ssh-add -l &>/dev/null
|
||||
if [ "$?" == 2 ]; then
|
||||
(umask 066; ssh-agent > ~/.ssh-agent)
|
||||
eval "$(<~/.ssh-agent)" >/dev/null
|
||||
ssh-add
|
||||
fi
|
||||
fi
|
||||
|
||||
eval "$(starship init bash)"
|
||||
|
@ -130,3 +138,12 @@ eval "$(starship init bash)"
|
|||
if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi
|
||||
# END_KITTY_SHELL_INTEGRATION
|
||||
|
||||
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# pnpm
|
||||
export PNPM_HOME="/home/fschl/.local/share/pnpm"
|
||||
export PATH="$PNPM_HOME:$PATH"
|
||||
# pnpm end
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
# NOTE: This file is generated from ~/.dotfiles/System.org. Please see commentary there.
|
||||
|
||||
GREEN='\033[1;32m'
|
||||
RED='\033[1;30m'
|
||||
NC='\033[0m'
|
||||
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
||||
|
||||
profiles=$*
|
||||
if [[ $# -eq 0 ]]; then
|
||||
profiles="$HOME/.config/guix/manifests/*.scm";
|
||||
fi
|
||||
|
||||
for profile in $profiles; do
|
||||
# Remove the path and file extension, if any
|
||||
profileName=$(basename $profile)
|
||||
profileName="${profileName%.*}"
|
||||
profilePath="$GUIX_EXTRA_PROFILES/$profileName"
|
||||
manifestPath=$HOME/.config/guix/manifests/$profileName.scm
|
||||
|
||||
if [ -f $manifestPath ]; then
|
||||
echo
|
||||
echo -e "${GREEN}Activating profile:" $manifestPath "${NC}"
|
||||
echo
|
||||
|
||||
mkdir -p $profilePath
|
||||
guix package --manifest=$manifestPath --profile="$profilePath/$profileName"
|
||||
|
||||
# Source the new profile
|
||||
GUIX_PROFILE="$profilePath/$profileName"
|
||||
if [ -f $GUIX_PROFILE/etc/profile ]; then
|
||||
. "$GUIX_PROFILE"/etc/profile
|
||||
else
|
||||
echo -e "${RED}Couldn't find profile:" $GUIX_PROFILE/etc/profile "${NC}"
|
||||
fi
|
||||
else
|
||||
echo "No profile found at path" $profilePath
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
# Sync dotfiles repo and ensure that dotfiles are tangled correctly afterward
|
||||
|
||||
GREEN='\033[1;32m'
|
||||
BLUE='\033[1;34m'
|
||||
RED='\033[1;30m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Navigate to the directory of this script (generally ~/.dotfiles/.bin)
|
||||
cd $(dirname $(readlink -f $0))
|
||||
cd ..
|
||||
|
||||
echo
|
||||
echo -e "${BLUE}Saving Org buffers if Emacs is running...${NC}"
|
||||
emacsclient -u -e "(org-save-all-org-buffers)" -a "echo 'Emacs is not currently running'"
|
||||
|
||||
echo -e "${BLUE}Stashing existing changes...${NC}"
|
||||
stash_result=$(git stash push -m "sync-dotfiles: Before syncing dotfiles")
|
||||
needs_pop=1
|
||||
if [ "$stash_result" = "No local changes to save" ]; then
|
||||
needs_pop=0
|
||||
fi
|
||||
|
||||
echo -e "${BLUE}Pulling updates from dotfiles repo...${NC}"
|
||||
echo
|
||||
git pull origin master
|
||||
echo
|
||||
|
||||
if [[ $needs_pop -eq 1 ]]; then
|
||||
echo -e "${BLUE}Popping stashed changes...${NC}"
|
||||
echo
|
||||
git stash pop
|
||||
fi
|
||||
|
||||
unmerged_files=$(git diff --name-only --diff-filter=U)
|
||||
if [[ ! -z $unmerged_files ]]; then
|
||||
echo -e "${RED}The following files have merge conflicts after popping the stash:${NC}"
|
||||
echo
|
||||
printf %"s\n" $unmerged_files # Ensure newlines are printed
|
||||
else
|
||||
update-dotfiles
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
guix pull --channels=$HOME/.config/guix/base-channels.scm
|
||||
guix describe --format=channels > ~/.config/guix/channels.scm
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Navigate to the directory of this script (generally ~/.dotfiles/.bin)
|
||||
cd $(dirname $(readlink -f $0))
|
||||
cd ..
|
||||
|
||||
# The heavy lifting is done by an Emacs script
|
||||
emacs -Q --script ./.emacs.d/tangle-dotfiles.el
|
||||
|
||||
# Make sure any running Emacs instance gets updated settings
|
||||
emacsclient -e '(load-file "~/.emacs.d/per-system-settings.el")' -a "echo 'Emacs is not currently running'"
|
||||
|
||||
# Update configuration symlinks
|
||||
stow .
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
# NOTE: This file is generated from ~/.dotfiles/System.org. Please see commentary there.
|
||||
|
||||
GREEN='\033[1;32m'
|
||||
NC='\033[0m'
|
||||
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
||||
|
||||
profiles=$*
|
||||
if [[ $# -eq 0 ]]; then
|
||||
profiles="$GUIX_EXTRA_PROFILES/*";
|
||||
fi
|
||||
|
||||
for profile in $profiles; do
|
||||
profileName=$(basename $profile)
|
||||
profilePath=$GUIX_EXTRA_PROFILES/$profileName
|
||||
|
||||
echo
|
||||
echo -e "${GREEN}Updating profile:" $profilePath "${NC}"
|
||||
echo
|
||||
|
||||
guix package --profile="$profilePath/$profileName" --manifest="$HOME/.config/guix/manifests/$profileName.scm"
|
||||
done
|
24
.i3/config
24
.i3/config
|
@ -108,21 +108,20 @@ set $WS9 "9 "
|
|||
|
||||
assign [class="^Firefox$"] $WS1
|
||||
assign [class="^DebugScreen"] $WS3
|
||||
assign [class="^Eclipse$"] $WS5
|
||||
assign [class="^Thunderbird$"] $WS4
|
||||
assign [class=".*ee.*ass.*"] $WS8
|
||||
|
||||
# https://faq.i3wm.org/question/3726/workspace-output-multiple-values/index.html%3Fanswer=3731.html#post-id-3731
|
||||
# set $LAPTOP LVDS-1
|
||||
set $CENTER DP-0
|
||||
set $RIGHT DP-3
|
||||
set $LEFT DVI-D-0
|
||||
set $LAPTOP LVDS-1
|
||||
set $CENTER DP-1
|
||||
set $RIGHT VGA-1
|
||||
set $LEFT HDMI-1
|
||||
|
||||
# monitor settings
|
||||
bindsym $mod+m mode "monitor"
|
||||
mode "monitor" {
|
||||
# only laptop
|
||||
bindsym 1 exec xrandr --output $LAPTOP --auto --primary --output $CENTER --off $RIGHT --off
|
||||
bindsym 1 exec xrandr --output $LAPTOP --auto --primary --output $CENTER --off --output $LEFT --off
|
||||
# CENTER main, RIGHT secondary
|
||||
bindsym 2 exec xrandr --output $CENTER --primary --auto --output $LAPTOP --auto --left-of $CENTER --output $RIGHT --off
|
||||
# HDMI main, laptop left, VGA right, *not* supported on X230
|
||||
|
@ -211,9 +210,10 @@ mode "resize" {
|
|||
bindsym $mod+r mode "resize"
|
||||
|
||||
bar {
|
||||
font pango:DejaVu Sans, FontAwesome 9
|
||||
font pango:DejaVu Sans, FontAwesome 7
|
||||
# position top
|
||||
output $CENTER
|
||||
output $LAPTOP
|
||||
# output $CENTER
|
||||
status_command /usr/bin/i3status-rs /home/fschl/dotfiles/.i3/status-rust.toml
|
||||
colors {
|
||||
separator #166616
|
||||
|
@ -227,7 +227,7 @@ bar {
|
|||
}
|
||||
|
||||
bar {
|
||||
output $RIGHT
|
||||
# output $RIGHT
|
||||
output $LEFT
|
||||
status_command i3status --config ~/.i3/status_small.conf
|
||||
tray_output $CENTER
|
||||
|
@ -235,10 +235,10 @@ bar {
|
|||
|
||||
# startup programs
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id xrandr --output $CENTER --primary --auto --output $RIGHT --auto --right-of $CENTER --rotate left --output $LAPTOP --off --output $LEFT --auto --left-of $CENTER --rotate right
|
||||
exec --no-startup-id xrandr --output $LAPTOP --primary --auto --output $RIGHT --auto --right-of $CENTER --rotate left --output $CENTER --off --output $LEFT --auto --left-of $CENTER --rotate right
|
||||
exec --no-startup-id i3-msg 'workspace $WS1; exec firefox;'
|
||||
exec --no-startup-id i3-msg 'workspace $WS2; exec emacs'
|
||||
exec --no-startup-id i3-msg 'exec thunderbird'
|
||||
# exec --no-startup-id i3-msg 'exec thunderbird'
|
||||
exec --no-startup-id i3-msg 'exec keepassxc'
|
||||
exec --no-startup-id i3-msg 'workspace $WS5; exec kitty;'
|
||||
exec --no-startup-id i3-msg 'workspace $WS3; exec kitty;'
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[theme]
|
||||
name = "semi-native"
|
||||
# theme = "solarized-dark"
|
||||
# name = "semi-native"
|
||||
name = "solarized-dark"
|
||||
[theme.overrides]
|
||||
separator = "<span font='5'>|</span>"
|
||||
[icons]
|
||||
name = "awesome"
|
||||
|
||||
|
||||
# https://github.com/greshake/i3status-rust/blob/master/doc/blocks.md
|
||||
[[block]]
|
||||
block = "pomodoro"
|
||||
length = 25
|
||||
|
@ -22,16 +22,16 @@ pomodoro_paused = "⏸"
|
|||
pomodoro_break = ""
|
||||
|
||||
|
||||
# [[block]]
|
||||
# block = "disk_space"
|
||||
# path = "/"
|
||||
# info_type = "available"
|
||||
# unit = "GB"
|
||||
# interval = 20
|
||||
# warning = 1.5
|
||||
# alert = 0.8
|
||||
# alert_absolute = true
|
||||
# format = "{icon}/{available}"
|
||||
[[block]]
|
||||
block = "disk_space"
|
||||
path = "/"
|
||||
info_type = "available"
|
||||
unit = "GB"
|
||||
interval = 20
|
||||
warning = 1.5
|
||||
alert = 0.4
|
||||
alert_absolute = true
|
||||
format = "{icon}/{available}"
|
||||
|
||||
[[block]]
|
||||
block = "disk_space"
|
||||
|
@ -70,31 +70,32 @@ device = "enp31s0"
|
|||
format = "eth {ip} {speed_down;K*b} {graph_down;K*b}"
|
||||
interval = 5
|
||||
|
||||
# [[block]]
|
||||
# block = "net"
|
||||
# device = "wlp3s0"
|
||||
# on_click = "alacritty -e nmtui"
|
||||
# format = "{ssid} {signal_strength} {ip} {speed_down;K*b}"
|
||||
# # format = "{ssid} {signal_strength} {ip} {speed_down;K*b} {graph_down;K*b}"
|
||||
# interval = 5
|
||||
[[block]]
|
||||
block = "net"
|
||||
device = "wlp3s0"
|
||||
# on_click = "kitty -e nmtui"
|
||||
format = "{ssid} ({signal_strength}) {ip} {speed_down;K*b}"
|
||||
# format = "{ssid} {signal_strength} {ip} {speed_down;K*b} {graph_down;K*b}"
|
||||
interval = 5
|
||||
|
||||
[[block]]
|
||||
block = "sound"
|
||||
format = "{volume}"
|
||||
show_volume_when_muted = true
|
||||
|
||||
# [[block]]
|
||||
# block = "sound"
|
||||
# name = "Mic"
|
||||
# format = "{output_name} {volume}"
|
||||
# show_volume_when_muted = true
|
||||
[[block]]
|
||||
block = "sound"
|
||||
name = "Capture"
|
||||
device_kind = "source"
|
||||
format = "Mic {volume}"
|
||||
show_volume_when_muted = true
|
||||
|
||||
# [[block]]
|
||||
# block = "battery"
|
||||
# # driver = "upower"
|
||||
# driver = "sysfs"
|
||||
# format = "{percentage} {time}"
|
||||
# allow_missing = true
|
||||
[[block]]
|
||||
block = "battery"
|
||||
# driver = "upower"
|
||||
driver = "sysfs"
|
||||
format = "{percentage} {time}"
|
||||
allow_missing = true
|
||||
|
||||
# [[block]]
|
||||
# block = "networkmanager"
|
||||
|
@ -108,4 +109,4 @@ show_volume_when_muted = true
|
|||
block = "time"
|
||||
timezone = "Europe/Berlin"
|
||||
interval = 5
|
||||
format = "%a %Y-%m-%d %R:%S"
|
||||
format = "%a %Y-%m-%d (%V) %R:%S"
|
||||
|
|
|
@ -32,7 +32,9 @@ This function should only modify configuration layer settings."
|
|||
|
||||
;; List of configuration layers to load.
|
||||
dotspacemacs-configuration-layers
|
||||
'(javascript
|
||||
'(sql
|
||||
typescript
|
||||
javascript
|
||||
systemd
|
||||
;; ----------------------------------------------------------------
|
||||
;; Example of useful layers you may want to use right away.
|
||||
|
@ -49,6 +51,7 @@ This function should only modify configuration layer settings."
|
|||
graphviz
|
||||
helm
|
||||
html
|
||||
;; (keypoard-layout :variables kl-layout 'colemak-neio-literal)
|
||||
latex
|
||||
(lsp :variables
|
||||
lsp-rust-server
|
||||
|
@ -59,6 +62,7 @@ This function should only modify configuration layer settings."
|
|||
org-enable-roam-ui t)
|
||||
plantuml
|
||||
(python :variables python-backend 'lsp python-lsp-server 'mspyls)
|
||||
restclient
|
||||
(rust :variables rust-backend 'lsp)
|
||||
shell
|
||||
;; shell-scripts
|
||||
|
@ -70,6 +74,7 @@ This function should only modify configuration layer settings."
|
|||
tree-sitter-fold-enable t
|
||||
tree-sitter-fold-indicators-enable t)
|
||||
version-control
|
||||
(vue :variables vue-backend 'lsp)
|
||||
yaml
|
||||
;; (shell :variables
|
||||
;; shell-default-height 30
|
||||
|
|
20
.ssh/config
20
.ssh/config
|
@ -1,3 +1,11 @@
|
|||
# https://gist.github.com/grenade/6318301
|
||||
#
|
||||
# chmod 700 ~/.ssh
|
||||
# chmod 644 ~/.ssh/authorized_keys
|
||||
# chmod 644 ~/.ssh/known_hosts
|
||||
# chmod 644 ~/.ssh/config
|
||||
# chmod 600 ~/.ssh/id_rsa
|
||||
# chmod 644 ~/.ssh/id_rsa.pub
|
||||
# more secure ssh config
|
||||
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH
|
||||
#
|
||||
|
@ -9,6 +17,11 @@ IdentitiesOnly yes
|
|||
# make known_hosts unreadable
|
||||
HashKnownHosts yes
|
||||
|
||||
# see man ssh-config
|
||||
AddKeysToAgent yes
|
||||
IdentityAgent SSH_AUTH_SOCK
|
||||
|
||||
|
||||
# order HostKeyAlgorithms
|
||||
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
|
||||
|
||||
|
@ -20,6 +33,7 @@ Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.
|
|||
|
||||
|
||||
#Host hostname_alias
|
||||
# User yourusername
|
||||
# Hostname <IP or dns>
|
||||
# IdentityFile ~/.ssh/<your_keyfile_name>
|
||||
# Hostname <IP or dns>
|
||||
# Port 22022
|
||||
# User yourusername
|
||||
# IdentityFile ~/.ssh/<your_keyfile_name>.pub
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
* GUIX systems and home
|
||||
** Backlog
|
||||
*** TODO add ssh config
|
||||
*** TODO add ssh keys
|
||||
*** TODO password management
|
||||
start with keepassxc, but try password-store
|
||||
*** TODO figure out how to maintain emacs config
|
||||
*** TODO add LaTeX
|
||||
with XDG_CONFIG_DIR, XDG_DATA_DIR
|
||||
https://wiki.archlinux.org/title/XDG_Base_Directory
|
||||
|
||||
and make letter creation from org-capture work
|
||||
*** TODO add wireguard configuration
|
||||
*** TODO add libreoffice
|
||||
*** TODO add email management (mu4e?)
|
||||
*** TODO add config for desktop (multi-monitor)
|
||||
*** TODO add syncthing config
|
||||
how to back that up?
|
||||
*** TODO figure out luks setup
|
||||
*** TODO securely manage ssh keys
|
||||
they are in the keepass database file
|
11
README.org
11
README.org
|
@ -102,3 +102,14 @@
|
|||
- ~multiplib~ is required for wine
|
||||
- Sound troubleshooting: https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture/Troubleshooting#HDMI
|
||||
- Skype, VSCode: use ~yay~
|
||||
|
||||
** NEXT Moving to Guix
|
||||
|
||||
** ImageMagick Notes
|
||||
|
||||
convert multiple .png files into multipage pdf with downscaling
|
||||
#+begin_src bash
|
||||
convert filePrefix*.png -resize 1240x1753 \
|
||||
-extent 1240x1753 -gravity center \
|
||||
-units PixelsPerInch -density 150x150 multipage.pdf
|
||||
#+end_src
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,37 @@
|
|||
;; NOTE: This file is generated from ~/.dotfiles/System.org. Please see commentary there.
|
||||
|
||||
(list (channel
|
||||
; (name 'flat)
|
||||
; (url "https://github.com/flatwhatson/guix-channel.git")
|
||||
; (commit
|
||||
; "7b8353ebbcf486e3344924d1cac0fa7ba47c371d")
|
||||
; (introduction
|
||||
; (make-channel-introduction
|
||||
; "33f86a4b48205c0dc19d7c036c85393f0766f806"
|
||||
; (openpgp-fingerprint
|
||||
; "736A C00E 1254 378B A982 7AF6 9DBE 8265 81B6 4490"))))
|
||||
; (channel
|
||||
(name 'rde)
|
||||
(url "https://git.sr.ht/~abcdw/rde")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"257cebd587b66e4d865b3537a9a88cccd7107c95"
|
||||
(openpgp-fingerprint
|
||||
"2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0"))))
|
||||
(channel
|
||||
(name 'nonguix)
|
||||
(url "https://gitlab.com/nonguix/nonguix")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
|
||||
(openpgp-fingerprint
|
||||
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
|
||||
(channel
|
||||
(name 'guix)
|
||||
(url "https://git.savannah.gnu.org/git/guix.git")
|
||||
;; (url "file:///home/daviwil/Projects/Code/guix"))
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
||||
(openpgp-fingerprint
|
||||
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
|
|
@ -0,0 +1,76 @@
|
|||
# -*- mode: sh; -*-
|
||||
# Adapted from https://jdhao.github.io/2021/03/31/bash_prompt_config/
|
||||
|
||||
function fromhex() {
|
||||
hex=$1
|
||||
if [[ $hex == "#"* ]]; then
|
||||
hex=$(echo $1 | awk '{print substr($0,2)}')
|
||||
fi
|
||||
r=$(printf '0x%0.2s' "$hex")
|
||||
g=$(printf '0x%0.2s' ${hex#??})
|
||||
b=$(printf '0x%0.2s' ${hex#????})
|
||||
echo -e `printf "%03d" "$(((r<75?0:(r-35)/40)*6*6+(g<75?0:(g-35)/40)*6+(b<75?0:(b-35)/40)+16))"`
|
||||
}
|
||||
|
||||
GRAY="\e[1;30m"
|
||||
BOLD="\033[1m"
|
||||
LT_CYAN="\e[1;36m"
|
||||
LT_GREEN="\e[1;32m"
|
||||
LT_RED="\e[1;31m"
|
||||
GREEN="\e[0;32m"
|
||||
PURPLE="\e[1;35m"
|
||||
COLOR_NONE="\e[0m"
|
||||
|
||||
# Detect whether the current directory is a git repository.
|
||||
function is_git_repository() {
|
||||
git branch > /dev/null 2>&1
|
||||
}
|
||||
|
||||
function set_git_branch () {
|
||||
# Note that for new repo without commit, git rev-parse --abbrev-ref HEAD
|
||||
# will error out.
|
||||
if git rev-parse --abbrev-ref HEAD > /dev/null 2>&1; then
|
||||
BRANCH=" $(git rev-parse --abbrev-ref HEAD)"
|
||||
else
|
||||
BRANCH="<bare repo>"
|
||||
fi
|
||||
}
|
||||
|
||||
function set_bash_prompt () {
|
||||
PS1="\n"
|
||||
|
||||
# Host and directory
|
||||
PS1+="${LT_CYAN}\u@\h${COLOR_NONE} ${LT_RED}${BOLD}⛧${COLOR_NONE} "
|
||||
PS1+="${GREEN}\w${COLOR_NONE} • "
|
||||
|
||||
# Add git branch
|
||||
if is_git_repository; then
|
||||
set_git_branch
|
||||
PS1+="${PURPLE}${BRANCH}${COLOR_NONE} • "
|
||||
fi
|
||||
|
||||
# Current time in 12 hour format
|
||||
PS1+="${GREEN}$(date +'%r')${COLOR_NONE}\n"
|
||||
|
||||
# Prompt character with color based on exit code
|
||||
if [ "$?" == "0" ]; then
|
||||
PS1+="${LT_GREEN}"
|
||||
else
|
||||
PS1+="${LT_RED}"
|
||||
fi
|
||||
PS1+="λ${COLOR_NONE}"
|
||||
|
||||
# If inside vterm, add prompt metadata
|
||||
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
|
||||
PS1=$PS1' \[$(vterm_prompt_end)\]'
|
||||
fi
|
||||
}
|
||||
|
||||
# Include common vterm functions
|
||||
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
|
||||
&& [[ -n ${EMACS_VTERM_PATH} ]] \
|
||||
&& [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
|
||||
source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
|
||||
fi
|
||||
|
||||
export PROMPT_COMMAND=set_bash_prompt
|
|
@ -0,0 +1,7 @@
|
|||
set show-all-if-ambiguous on
|
||||
set menu-complete-display-prefix on
|
||||
TAB: menu-complete
|
||||
set visible-stats on
|
||||
set colored-stats on
|
||||
set colored-completion-prefix on
|
||||
set menu-complete-display-prefix on
|
|
@ -0,0 +1,133 @@
|
|||
(define-module (fschl home-services desktop)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages glib)
|
||||
;; #:use-module (fschl packages fonts)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services dotfiles)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (guix gexp)
|
||||
|
||||
#:export (home-desktop-service-type))
|
||||
|
||||
(define (home-desktop-profile-service config)
|
||||
(cons*
|
||||
;; NOTE: This is a very weird hack to get around an issue where "glib:bin"
|
||||
;; returns a newer version of glib than what most packages are using via the
|
||||
;; exported `glib' symbol. The "bin" output is needed to get the `gsettings'
|
||||
;; program to control GTK theme settings without a configuration file.
|
||||
(list glib "bin")
|
||||
(map specification->package+output
|
||||
'(;; Sway setup
|
||||
"sway"
|
||||
"swayidle"
|
||||
"swaylock"
|
||||
"waybar"
|
||||
"fuzzel"
|
||||
"mako"
|
||||
"gammastep"
|
||||
"grimshot" ;; grimshot --notify copy area
|
||||
"feh"
|
||||
"network-manager-applet"
|
||||
|
||||
;; Compatibility for older Xorg applications
|
||||
"xorg-server-xwayland"
|
||||
|
||||
;; Flatpak and XDG utilities
|
||||
;; "flatpak"
|
||||
"xdg-desktop-portal"
|
||||
"xdg-desktop-portal-gtk"
|
||||
"xdg-desktop-portal-wlr"
|
||||
"xdg-utils" ;; For xdg-open, etc
|
||||
"xdg-dbus-proxy"
|
||||
"shared-mime-info"
|
||||
|
||||
;; TODO: Remove when Emacs service is working
|
||||
"emacs-next-pgtk"
|
||||
|
||||
;; Appearance
|
||||
"matcha-theme"
|
||||
"papirus-icon-theme"
|
||||
"breeze-icons" ;; For KDE apps
|
||||
|
||||
;; Fonts
|
||||
;; "font-jost"
|
||||
"font-iosevka-ss08"
|
||||
"font-iosevka-aile"
|
||||
"font-jetbrains-mono"
|
||||
"font-google-noto"
|
||||
"font-google-noto-emoji"
|
||||
"font-liberation"
|
||||
"font-awesome"
|
||||
"gucharmap"
|
||||
"fontmanager"
|
||||
|
||||
;; Browsers
|
||||
"qtwayland@5"
|
||||
"qutebrowser"
|
||||
|
||||
;; Authentication
|
||||
"password-store"
|
||||
"keepassxc"
|
||||
|
||||
;; Audio devices and media playback
|
||||
"mpv"
|
||||
"mpv-mpris"
|
||||
"youtube-dl"
|
||||
"playerctl"
|
||||
"gstreamer"
|
||||
"gst-plugins-base"
|
||||
"gst-plugins-good"
|
||||
"gst-plugins-bad"
|
||||
"gst-plugins-ugly"
|
||||
"gst-libav"
|
||||
"alsa-utils"
|
||||
"pavucontrol"
|
||||
|
||||
;; Graphics
|
||||
"gimp"
|
||||
|
||||
;; PDF reader
|
||||
"zathura"
|
||||
"zathura-pdf-mupdf"
|
||||
|
||||
;; File syncing
|
||||
"syncthing"
|
||||
"syncthing-gtk"
|
||||
"borg"
|
||||
|
||||
;; General utilities
|
||||
"curl"
|
||||
"wget"
|
||||
"openssh"
|
||||
"zip"
|
||||
"unzip"
|
||||
"trash-cli"))))
|
||||
|
||||
(define (home-desktop-shepherd-services config)
|
||||
(list
|
||||
;; TODO: Use built-in syncthing service
|
||||
(shepherd-service
|
||||
(provision '(syncthing))
|
||||
(documentation "Run and control syncthing.")
|
||||
(start #~(make-forkexec-constructor '("syncthing" "-no-browser")))
|
||||
(stop #~(make-kill-destructor)))))
|
||||
|
||||
(define (home-desktop-environment-variables config)
|
||||
'(("_JAVA_AWT_WM_NONREPARENTING" . "1")))
|
||||
|
||||
(define home-desktop-service-type
|
||||
(service-type (name 'home-desktop)
|
||||
(description "My desktop environment service.")
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-desktop-profile-service)
|
||||
(service-extension
|
||||
home-shepherd-service-type
|
||||
home-desktop-shepherd-services)
|
||||
(service-extension
|
||||
home-environment-variables-service-type
|
||||
home-desktop-environment-variables)))
|
||||
(default-value #f)))
|
|
@ -0,0 +1,202 @@
|
|||
[global]
|
||||
### Display ###
|
||||
monitor = 0
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
geometry = "500x10-10+50"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
transparency = 10
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 1
|
||||
separator_color = frame
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 2
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#89AAEB"
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
font = Iosevka Aile 12
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = left
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = left
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 88
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /home/daviwil/.guix-extra-profiles/desktop/desktop/share/icons/gnome/256x256/status/:/home/daviwil/.guix-extra-profiles/desktop/desktop/share/icons/gnome/256x256/devices/:/home/daviwil/.guix-extra-profiles/desktop/desktop/share/icons/gnome/256x256/emblems/
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = no
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = qutebrowser
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
startup_notification = false
|
||||
verbosity = mesg
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 4
|
||||
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action
|
||||
mouse_right_click = close_all
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[shortcuts]
|
||||
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
#close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
#close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#222222"
|
||||
foreground = "#888888"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#1c1f26"
|
||||
foreground = "#ffffff"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
|
@ -0,0 +1,233 @@
|
|||
; Docs: https://github.com/polybar/polybar
|
||||
;==========================================================
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
[colors]
|
||||
background = #f0232635
|
||||
background-alt = #576075
|
||||
foreground = #A6Accd
|
||||
foreground-alt = #555
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
underline-1 = #c792ea
|
||||
|
||||
[bar/panel]
|
||||
width = 100%
|
||||
height = 30
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
enable-ipc = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 2
|
||||
line-color = #f00
|
||||
|
||||
border-size = 0
|
||||
border-color = #00000000
|
||||
|
||||
padding-top = 5
|
||||
padding-left = 1
|
||||
padding-right = 1
|
||||
|
||||
module-margin = 1
|
||||
|
||||
font-0 = "Iosevka Aile:size=16:weight=light;2"
|
||||
font-1 = "Font Awesome:size=12;2"
|
||||
font-2 = "Material Icons:size=18;5"
|
||||
font-3 = "Fira Mono:size=11;-3"
|
||||
|
||||
modules-left = exwm exwm-path
|
||||
modules-center = spotify
|
||||
modules-right = telegram mu4e cpu temperature battery date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
tray-maxsize = 28
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[bar/herbst]
|
||||
width = 100%
|
||||
height = 30
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
enable-ipc = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 2
|
||||
line-color = #f00
|
||||
|
||||
border-size = 0
|
||||
border-color = #00000000
|
||||
|
||||
padding-top = 5
|
||||
padding-left = 1
|
||||
padding-right = 1
|
||||
|
||||
module-margin = 1
|
||||
|
||||
font-0 = "Iosevka Aile:size=16:weight=semibold;2"
|
||||
font-1 = "Font Awesome:size=12;2"
|
||||
font-2 = "Material Icons:size=18;5"
|
||||
font-3 = "Fira Mono:size=11;-3"
|
||||
|
||||
modules-left = xworkspaces
|
||||
modules-center = spotify
|
||||
modules-right = cpu temperature battery date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
tray-maxsize = 28
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/xworkspaces]
|
||||
type = internal/xworkspaces
|
||||
enable-click = false
|
||||
|
||||
[module/exwm]
|
||||
type = custom/ipc
|
||||
hook-0 = emacsclient -e "(dw/polybar-exwm-workspace)" | sed -e 's/^"//' -e 's/"$//'
|
||||
initial = 1
|
||||
format-underline = ${colors.underline-1}
|
||||
format-background = ${colors.background-alt}
|
||||
format-padding = 1
|
||||
|
||||
[module/exwm-path]
|
||||
type = custom/ipc
|
||||
hook-0 = emacsclient -e "(dw/polybar-exwm-workspace-path)" | sed -e 's/^"//' -e 's/"$//'
|
||||
format-foreground = #f78c6c
|
||||
initial = 1
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/player-status.sh
|
||||
interval = 3
|
||||
|
||||
[module/mu4e]
|
||||
type = custom/ipc
|
||||
hook-0 = emacsclient -e '(dw/polybar-mail-count 500)' | sed -e 's/^"//' -e 's/"$//'
|
||||
initial = 1
|
||||
format-underline = ${colors.underline-1}
|
||||
click-left = emacsclient -e '(dw/go-to-inbox)'
|
||||
|
||||
[module/telegram]
|
||||
type = custom/ipc
|
||||
hook-0 = emacsclient -e '(dw/polybar-telegram-chats)' | sed -e 's/^"//' -e 's/"$//'
|
||||
format-padding = 3
|
||||
initial = 1
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
format-prefix-font = 1
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-prefix-underline = ${colors.underline-1}
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-underline = ${colors.underline-1}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-underline = ${colors.underline-1}
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format = <label> <ramp-coreload>
|
||||
format-underline = ${colors.underline-1}
|
||||
click-left = emacsclient -e "(proced)"
|
||||
label = %percentage:2%%
|
||||
ramp-coreload-spacing = 0
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-0-foreground = ${colors.foreground-alt}
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-6 = ▇
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "M:"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = ${colors.underline-1}
|
||||
label = %percentage_used%%
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
date = "W%U: %a %b %e"
|
||||
date-alt = "%A %B %d %Y"
|
||||
|
||||
time = %l:%M %p
|
||||
time-alt = %H:%M:%S
|
||||
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = ${colors.underline-1}
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
time-format = %-l:%M
|
||||
|
||||
label-charging = %percentage%% / %time%
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = ${colors.underline-1}
|
||||
|
||||
label-discharging = %percentage%% / %time%
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full = <ramp-capacity> <label-full>
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-framerate = 750
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 0
|
||||
warn-temperature = 60
|
||||
|
||||
format = <label>
|
||||
format-underline = ${colors.underline-1}
|
||||
format-warn = <label-warn>
|
||||
format-warn-underline = ${self.format-underline}
|
||||
|
||||
label = %temperature-c%
|
||||
label-warn = %temperature-c%!
|
||||
label-warn-foreground = ${colors.secondary}
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
status="$(playerctl -p spotify status 2>&1)"
|
||||
if [ "$status" != "No players found" ]
|
||||
then
|
||||
artist="$(playerctl -p spotify metadata artist)"
|
||||
if [ "$artist" != "" ]
|
||||
then
|
||||
echo " $(playerctl -p spotify metadata artist) - $(playerctl -p spotify metadata title)"
|
||||
else
|
||||
# Clear any string that was previously displayed
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
# Clear any string that was previously displayed
|
||||
echo ""
|
||||
fi
|
|
@ -0,0 +1,197 @@
|
|||
set $mod Mod4
|
||||
# at some point check https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway
|
||||
|
||||
# Configure displays
|
||||
|
||||
# The annoying thing is that sometimes the display ID changes when hotplugging
|
||||
# my Thunderbolt dock...
|
||||
set $primary DP-7 DP-8 HDMI-A-1
|
||||
set $laptop eDP-1
|
||||
|
||||
output $laptop pos 1920 135 scale 2
|
||||
output DP-7 pos 0 0 scale 2
|
||||
output DP-8 pos 0 0 scale 2
|
||||
output HDMI-A-1 scale 2
|
||||
|
||||
# output * bg ~/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg fill
|
||||
# output * bg ~/.dotfiles/backgrounds/scott-rodgerson-lRtzEExP0H8-unsplash.jpg fill
|
||||
|
||||
bindsym $mod+Shift+s exec ~/.bin/toggle-display $primary
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout de,de
|
||||
xkb_options ctrl:nocaps
|
||||
}
|
||||
|
||||
font pango:Iosevka ss08 7
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+Shift+x exit
|
||||
bindsym $mod+Shift+r reload
|
||||
bindsym $mod+r resize
|
||||
|
||||
bindsym $mod+Shift+Return exec foot
|
||||
|
||||
# use vim keys for window movement
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# move workspace
|
||||
bindsym $mod+Mod1+h move workspace to output left
|
||||
bindsym $mod+Mod1+l move workspace to output right
|
||||
bindsym $mod+Mod1+Left move workspace to output left
|
||||
bindsym $mod+Mod1+Right move workspace to output right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left 30 px
|
||||
bindsym $mod+Shift+Down move down 30 px
|
||||
bindsym $mod+Shift+Up move up 30 px
|
||||
bindsym $mod+Shift+Right move right 30 px
|
||||
bindsym $mod+Shift+h move left 30 px
|
||||
bindsym $mod+Shift+j move down 30 px
|
||||
bindsym $mod+Shift+k move up 30 px
|
||||
bindsym $mod+Shift+l move right 30 px
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+s split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
# bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
|
||||
# toggle pinned floating window
|
||||
bindsym $mod+Shift+p sticky toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+Control+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# App launcher
|
||||
bindsym $mod+space exec fuzzel -w 50 -x 8 -y 8 -r 3 -b 232635ff -t A6Accdff -s A6Accdff -S 232635ff -C c792eacc -m c792eacc -f "Iosevka ss08:weight=light:size=11" --no-fuzzy --icon-theme="Papirus-Dark"
|
||||
|
||||
# Set defaults
|
||||
default_orientation horizontal
|
||||
workspace_layout tabbed
|
||||
|
||||
# Configure gaps and borders
|
||||
default_border pixel 1
|
||||
gaps outer 0
|
||||
gaps inner 4
|
||||
smart_borders off
|
||||
hide_edge_borders --i3 none
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws0 "chat"
|
||||
set $ws1 "1 "
|
||||
set $ws2 "2 "
|
||||
set $ws3 "3 "
|
||||
set $ws4 "4 "
|
||||
set $ws5 "5 "
|
||||
# unlock-alt - keepassxc defaults here
|
||||
set $ws8 "8 "
|
||||
# linux - less often used terminals for background processes
|
||||
set $ws9 "9 "
|
||||
|
||||
assign [class="^Firefox$"] $ws1
|
||||
assign [class="^DebugScreen"] $ws3
|
||||
assign [class="^Thunderbird$"] $ws4
|
||||
assign [class=".*ee.*ass.*"] $ws8
|
||||
|
||||
# Move specific workspaces to outputs
|
||||
workspace $ws0 output $laptop
|
||||
workspace $ws1 output $primary $laptop
|
||||
workspace $ws2 output $primary $laptop
|
||||
workspace $ws3 output $laptop
|
||||
workspace $ws4 output $laptop
|
||||
workspace $ws5 output $laptop
|
||||
|
||||
# Switch to dev workspace by default
|
||||
#workspace $ws1
|
||||
|
||||
# Switch to workspace
|
||||
bindsym $mod+grave workspace $ws0
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace $WS8
|
||||
bindsym $mod+9 workspace $WS9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+grave move container to workspace $ws0
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace $WS8
|
||||
bindsym $mod+Shift+9 move container to workspace $WS9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# Bind hotkeys for brightness and volume
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
bindsym --locked $mod+p exec playerctl play-pause
|
||||
|
||||
# Screenshots
|
||||
bindsym Print exec grimshot --notify save output
|
||||
bindsym Alt+Print exec grimshot --notify save area
|
||||
|
||||
# Style the UI
|
||||
client.focused #c792eacc #232635dd #ffffffff #ffffffff #c792eacc
|
||||
client.unfocused #c792eacc #1c1f2bef #ffffffff #ffffffff #c792eacc
|
||||
|
||||
# Set up screen locking
|
||||
set $lock 'swaylock -f -i ~/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg -s fill --font "Iosevka ss08" --indicator-idle-visible'
|
||||
exec swayidle -w \
|
||||
timeout 900 $lock \
|
||||
timeout 960 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep $lock
|
||||
|
||||
# Window rules
|
||||
#for_window [title="Firefox — Sharing Indicator"] kill
|
||||
for_window [title=".* - mpv$"] floating enable, sticky enable
|
||||
|
||||
# Autostart applications
|
||||
exec waybar
|
||||
exec mako --border-radius=2 --font="Iosevka ss08 10" --max-visible=5 --outer-margin=5 --margin=3 --background="#1c1f26" --border-color="#89AAEB" --border-size=1 --default-timeout=7000
|
||||
exec nm-applet --indicator
|
||||
exec udiskie -t
|
||||
exec gammastep-indicator -l 50.8643:12.1124 -t 6500:3500 -b 1.0:0.7
|
||||
exec emacs
|
||||
|
||||
# Set GNOME settings (requires "glib:bin" in Guix)
|
||||
exec gsettings set org.gnome.desktop.interface gtk-theme "Matcha-dark-azul"
|
||||
exec gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark"
|
||||
exec gsettings set org.gnome.desktop.interface font-name "Iosevka Aile 11"
|
||||
|
||||
# Update DBUS activation records to ensure Flatpak apps work
|
||||
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"layer": "bottom",
|
||||
"position": "bottom",
|
||||
"height": 24,
|
||||
|
||||
// maybe take another look at e.g. https://gitlab.com/wef/dotfiles/-/blob/master/.config/waybar/config
|
||||
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-center": ["timer", "custom/disk_root", "custom/disk_home", "network"],
|
||||
"modules-right": ["tray", "cpu", "memory", "battery", "clock"],
|
||||
"sway/mode": {
|
||||
"format": " {}"
|
||||
},
|
||||
"sway/workspaces": {
|
||||
"format": "{name}",
|
||||
"disable-scroll": true
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%b %d %H:%M %p W%U}",
|
||||
"tooltip": false
|
||||
},
|
||||
"battery": {
|
||||
"format": " {time} {icon}",
|
||||
"format-alt": "{capacity}% {icon}",
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
"format-charging": "{capacity}% ",
|
||||
"interval": 30,
|
||||
"states": {
|
||||
"warning": 25,
|
||||
"critical": 10
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/disk_home": {
|
||||
"format": "🏠 {} ",
|
||||
"interval": 30,
|
||||
"exec": "df -h --output=avail $HOME | tail -1 | tr -d ' '"
|
||||
},
|
||||
"custom/disk_root": {
|
||||
"format": "💽 {} ",
|
||||
"interval": 30,
|
||||
"exec": "df -h --output=avail / | tail -1 | tr -d ' '"
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "<span color='#e88939'>{icon}</span> {temperatureC}°C",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"cpu": {
|
||||
"format": "🏭 {usage}%",
|
||||
"tooltip": false
|
||||
},
|
||||
"memory": {
|
||||
"format": "💾 {used:0.1f}G"
|
||||
},
|
||||
"custom/mail": {
|
||||
"format": "📩{}",
|
||||
"interval": 30,
|
||||
"exec": "notmuch count tag:flagged OR tag:inbox AND NOT tag:killed"
|
||||
},
|
||||
"network": {
|
||||
"family": "ipv6",
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "<span color='#589df6'></span> <span color='gray'>{essid}</span> {frequency} <span color='#589df6'>{signaldBm} dB</span> <span color='#589df6'>⇵</span> {bandwidthUpBits}/{bandwidthDownBits}",
|
||||
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}",
|
||||
"interval": 5
|
||||
},
|
||||
"timer": {
|
||||
"interval": 1,
|
||||
"exec": "~/.config/waybar/timer.sh",
|
||||
"exec-if": "pgrep emacs",
|
||||
"escape": true
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 20,
|
||||
"show-passive-items": true
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 2,
|
||||
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}",
|
||||
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
|
||||
},
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Iosevka ss08;
|
||||
font-size: 13px;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
|
||||
window.eDP-1 * {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
window {
|
||||
color: #ffffff;
|
||||
background: rgba(35, 38, 53, 0.8);
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
color: rgba(217, 216, 216, 0.6);
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: rgba(217, 216, 216, 1);
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
font-weight: bold;
|
||||
/* border-bottom: 2px solid rgba(217, 216, 216, 1); */
|
||||
}
|
||||
|
||||
#workspaces button.unfocused {
|
||||
/* border-bottom: 2px solid rgba(217, 216, 216, 0); */
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: rgba(238, 46, 36, 1);
|
||||
}
|
||||
|
||||
#mode,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#idle_inhibitor,
|
||||
#backlight,
|
||||
#custom-storage,
|
||||
#custom-spotify,
|
||||
#custom-weather,
|
||||
#custom-mail {
|
||||
margin: 0px 6px 0px 10px;
|
||||
min-width: 25px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin: 0px 2px 0px 2px;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
#custom-timer {
|
||||
font-weight: bold;
|
||||
color: rgba(247, 172, 66, 1);
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: rgba(255, 210, 4, 1);
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: rgba(238, 46, 36, 1);
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: rgba(217, 216, 216, 1);
|
||||
}
|
||||
|
||||
#custom-storage.warning {
|
||||
color: rgba(255, 210, 4, 1);
|
||||
}
|
||||
|
||||
#custom-storage.critical {
|
||||
color: rgba(238, 46, 36, 1);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
emacsclient -e "(dw/waybar-timer-status)" | sed 's/\"//g'
|
|
@ -0,0 +1,213 @@
|
|||
(define-module (fschl home-services emacs)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages emacs)
|
||||
#:use-module (gnu packages emacs-xyz)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix transformations)
|
||||
|
||||
#:export (home-emacs-config-service-type))
|
||||
|
||||
(define transform
|
||||
(options->transformation
|
||||
;; 0.0.9 is too old for the mu4e fix
|
||||
;; also, adopt the new ement.el bindings
|
||||
'((with-commit . "emacs-evil-collection=97a57c91d200a278d0bf91199e2eae45f7d875b0"))))
|
||||
|
||||
(define (home-emacs-config-profile-service config)
|
||||
(map (lambda (package-name)
|
||||
(transform
|
||||
(specification->package+output package-name)))
|
||||
(list "emacs-next-pgtk"
|
||||
|
||||
"emacs-tmr"
|
||||
"emacs-buffer-env"
|
||||
|
||||
"emacs-no-littering"
|
||||
|
||||
"emacs-exwm"
|
||||
"emacs-desktop-environment"
|
||||
|
||||
"emacs-god-mode"
|
||||
"emacs-modalka"
|
||||
"emacs-meow"
|
||||
|
||||
"emacs-popper"
|
||||
|
||||
"emacs-ement"
|
||||
|
||||
"emacs-evil"
|
||||
"emacs-evil-collection"
|
||||
"emacs-undo-tree"
|
||||
|
||||
"emacs-general"
|
||||
|
||||
"emacs-doom-themes"
|
||||
"emacs-spacegray-theme"
|
||||
|
||||
"emacs-emojify"
|
||||
|
||||
"emacs-mood-line"
|
||||
"emacs-doom-modeline"
|
||||
"emacs-all-the-icons"
|
||||
;"emacs-minions"
|
||||
|
||||
"emacs-alert"
|
||||
|
||||
"emacs-super-save"
|
||||
|
||||
"emacs-pinentry"
|
||||
"pinentry-emacs"
|
||||
|
||||
"emacs-evil-nerd-commenter"
|
||||
|
||||
"emacs-ws-butler"
|
||||
|
||||
"emacs-hydra"
|
||||
|
||||
"emacs-vertico"
|
||||
"emacs-corfu"
|
||||
"emacs-kind-icon"
|
||||
"emacs-orderless"
|
||||
"emacs-consult"
|
||||
"emacs-wgrep"
|
||||
"emacs-marginalia"
|
||||
"emacs-embark"
|
||||
|
||||
"emacs-avy"
|
||||
"emacs-ace-window"
|
||||
|
||||
"emacs-default-text-scale"
|
||||
"emacs-visual-fill-column"
|
||||
|
||||
"emacs-password-store"
|
||||
"emacs-auth-source-pass"
|
||||
|
||||
;; "emacs-dired-single"
|
||||
"emacs-dired-hacks"
|
||||
"emacs-all-the-icons-dired"
|
||||
|
||||
"emacs-openwith"
|
||||
|
||||
"emacs-org"
|
||||
"emacs-org-modern"
|
||||
"emacs-org-pomodoro"
|
||||
"emacs-evil-org"
|
||||
"emacs-org-make-toc"
|
||||
"emacs-org-present"
|
||||
"emacs-org-roam"
|
||||
"emacs-org-appear"
|
||||
"emacs-htmlize"
|
||||
"emacs-denote"
|
||||
|
||||
"emacs-magit"
|
||||
"emacs-magit-todos"
|
||||
|
||||
"git"
|
||||
"git:send-email"
|
||||
|
||||
"emacs-git-link"
|
||||
"emacs-git-gutter"
|
||||
"emacs-git-gutter-fringe"
|
||||
|
||||
"emacs-project"
|
||||
"ripgrep" ;; For consult-ripgrep
|
||||
|
||||
;; TODO: Use the built-in Eglot for now to avoid problems
|
||||
;; "emacs-eglot"
|
||||
|
||||
"emacs-lispy"
|
||||
"emacs-lispyville"
|
||||
|
||||
"emacs-sly"
|
||||
"emacs-sly-asdf"
|
||||
|
||||
"emacs-js2-mode"
|
||||
"emacs-typescript-mode"
|
||||
"emacs-apheleia"
|
||||
|
||||
"emacs-go-mode"
|
||||
|
||||
"emacs-rust-mode"
|
||||
"emacs-zig-mode"
|
||||
|
||||
"emacs-helpful"
|
||||
|
||||
"emacs-geiser"
|
||||
|
||||
"emacs-markdown-mode"
|
||||
|
||||
"emacs-web-mode"
|
||||
"emacs-skewer-mode"
|
||||
|
||||
"emacs-yaml-mode"
|
||||
|
||||
"emacs-flycheck"
|
||||
|
||||
"emacs-yasnippet"
|
||||
"emacs-yasnippet-snippets"
|
||||
|
||||
"emacs-smartparens"
|
||||
|
||||
"emacs-rainbow-delimiters"
|
||||
|
||||
"emacs-rainbow-mode"
|
||||
|
||||
"emacs-posframe"
|
||||
"emacs-keycast"
|
||||
|
||||
;"emacs-obs-websocket-el"
|
||||
|
||||
"emacs-a"
|
||||
"emacs-request"
|
||||
|
||||
"isync"
|
||||
"mu"
|
||||
"emacs-mu4e-alert"
|
||||
|
||||
"ledger"
|
||||
;; "hledger"
|
||||
"emacs-ledger-mode"
|
||||
|
||||
"emacs-eat"
|
||||
"emacs-eshell-z"
|
||||
"emacs-esh-autosuggest"
|
||||
"emacs-xterm-color"
|
||||
"emacs-exec-path-from-shell"
|
||||
|
||||
"emacs-pcmpl-args"
|
||||
|
||||
"emacs-eshell-syntax-highlighting"
|
||||
|
||||
"emacs-eshell-toggle"
|
||||
|
||||
"emacs-vterm"
|
||||
|
||||
"emacs-tracking"
|
||||
|
||||
"emacs-telega"
|
||||
|
||||
"emacs-elfeed"
|
||||
|
||||
"emacs-elpher"
|
||||
|
||||
"emacs-guix"
|
||||
|
||||
"emacs-daemons"
|
||||
|
||||
"emacs-pulseaudio-control"
|
||||
|
||||
"emacs-docker"
|
||||
"emacs-docker-tramp"
|
||||
"emacs-dockerfile-mode")))
|
||||
|
||||
(define home-emacs-config-service-type
|
||||
(service-type (name 'home-emacs-config)
|
||||
(description "Applies my personal Emacs configuration.")
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-emacs-config-profile-service)))
|
||||
(default-value #f)))
|
|
@ -0,0 +1,99 @@
|
|||
(define-module (fschl home-services pipewire)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define (home-pipewire-profile-service config)
|
||||
(map specification->package
|
||||
(list "pipewire"
|
||||
"wireplumber")))
|
||||
|
||||
(define (home-pipewire-shepherd-service config)
|
||||
(list
|
||||
;; Start Pipewire daemon
|
||||
(shepherd-service
|
||||
(requirement '(dbus))
|
||||
(provision '(pipewire))
|
||||
(stop #~(make-kill-destructor))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list #$(file-append pipewire "/bin/pipewire"))
|
||||
#:log-file (string-append
|
||||
(or (getenv "XDG_LOG_HOME")
|
||||
(format #f "~a/.local/var/log"
|
||||
(getenv "HOME")))
|
||||
"/pipewire.log")
|
||||
#:environment-variables
|
||||
(append (list "DISABLE_RTKIT=1")
|
||||
(default-environment-variables)))))
|
||||
;; Start Pipewire PulseAudio module
|
||||
(shepherd-service
|
||||
(requirement '(pipewire))
|
||||
(provision '(pipewire-pulse))
|
||||
(stop #~(make-kill-destructor))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list #$(file-append pipewire "/bin/pipewire-pulse"))
|
||||
#:log-file (string-append
|
||||
(or (getenv "XDG_LOG_HOME")
|
||||
(format #f "~a/.local/var/log"
|
||||
(getenv "HOME")))
|
||||
"/pipewire-pulse.log")
|
||||
#:environment-variables
|
||||
(append (list "DISABLE_RTKIT=1")
|
||||
(default-environment-variables)))))
|
||||
;; Start Wireplumber session manager
|
||||
(shepherd-service
|
||||
(requirement '(pipewire))
|
||||
(provision '(wireplumber))
|
||||
(stop #~(make-kill-destructor))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list #$(file-append wireplumber "/bin/wireplumber"))
|
||||
#:log-file (string-append
|
||||
(or (getenv "XDG_LOG_HOME")
|
||||
(format #f "~a/.local/var/log"
|
||||
(getenv "HOME")))
|
||||
"/wireplumber.log")
|
||||
#:environment-variables
|
||||
(append (list "DISABLE_RTKIT=1")
|
||||
(default-environment-variables)))))))
|
||||
|
||||
(define (home-pipewire-xdg-configuration-service config)
|
||||
`(("alsa/asoundrc"
|
||||
,(mixed-text-file
|
||||
"asoundrc"
|
||||
#~(string-append
|
||||
"<"
|
||||
#$(file-append
|
||||
pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf")
|
||||
">\n<"
|
||||
#$(file-append
|
||||
pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf")
|
||||
">\n"
|
||||
"
|
||||
pcm_type.pipewire {
|
||||
lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so")
|
||||
"
|
||||
}
|
||||
ctl_type.pipewire {
|
||||
lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so")
|
||||
"
|
||||
}
|
||||
")))))
|
||||
|
||||
(define-public home-pipewire-service-type
|
||||
(service-type (name 'home-pipewire)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-pipewire-profile-service)
|
||||
(service-extension
|
||||
home-shepherd-service-type
|
||||
home-pipewire-shepherd-service)
|
||||
(service-extension
|
||||
home-xdg-configuration-files-service-type
|
||||
home-pipewire-xdg-configuration-service)))
|
||||
(default-value #f)
|
||||
(description "Configures and runs the Pipewire audio system.")))
|
|
@ -0,0 +1,39 @@
|
|||
(define-module (fschl home-services template-file)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (fschl utils)
|
||||
#:export (home-template-file-service-type
|
||||
home-template-file-configuration))
|
||||
|
||||
(define-configuration/no-serialization home-template-file-configuration
|
||||
(base-path
|
||||
(string)
|
||||
"The base path from which all relative paths are calculated.")
|
||||
(files
|
||||
(list-of-strings)
|
||||
"The list of relative file paths to include.")
|
||||
(values
|
||||
(alist)
|
||||
"The list of key-value pairs to use for templating the configuration files"))
|
||||
|
||||
(define (home-template-file-files-service config)
|
||||
(map (lambda (file)
|
||||
(let ((full-path (canonicalize-path (string-append (home-template-file-configuration-base-path config)
|
||||
file-name-separator-string
|
||||
file))))
|
||||
`(,file ,(plain-file
|
||||
(basename full-path)
|
||||
(apply-template-file full-path
|
||||
(home-template-file-configuration-values config))))))
|
||||
(home-template-file-configuration-files config)))
|
||||
|
||||
(define-public home-template-file-service-type
|
||||
(service-type (name 'home-template-file)
|
||||
(description "Creates configuration files based on templated text.")
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-files-service-type
|
||||
home-template-file-files-service)))
|
||||
(default-value #f)))
|
|
@ -0,0 +1,32 @@
|
|||
(define-module (fschl home-services udiskie)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (guix gexp)
|
||||
|
||||
#:export (home-udiskie-service-type))
|
||||
|
||||
(define (home-udiskie-profile-service config)
|
||||
(list udiskie))
|
||||
|
||||
(define (home-udiskie-shepherd-service config)
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(udiskie))
|
||||
(documentation "Run and control udiskie.")
|
||||
(start #~(make-forkexec-constructor '("udiskie" "-t")))
|
||||
(stop #~(make-kill-destructor)))))
|
||||
|
||||
(define home-udiskie-service-type
|
||||
(service-type (name 'home-udiskie)
|
||||
(description "A service for launching Udiskie.")
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-udiskie-profile-service)
|
||||
(service-extension
|
||||
home-shepherd-service-type
|
||||
home-udiskie-shepherd-service)))
|
||||
(default-value #f)))
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Disable access control for the current user
|
||||
xhost +SI:localuser:$USER
|
||||
|
||||
# Run xsettingsd to progagate font and theme settings
|
||||
xsettingsd &
|
||||
|
||||
# Enable screen compositing
|
||||
compton &
|
||||
|
||||
# Turn off the system bell
|
||||
xset -b
|
||||
|
||||
# Enable screen locking on suspend
|
||||
xss-lock -- slock &
|
||||
|
||||
# Uncomment this to start xterm instead for debugging purposes!
|
||||
# Then you can manually run the window manager and log output
|
||||
# > exec dbus-launch emacs -mm --debug-init --use-exwm 2>&1 | tee ~/debug.log
|
||||
#xterm
|
||||
|
||||
# Fire it up
|
||||
exec dbus-launch --exit-with-session emacs -mm --debug-init --use-exwm --with-profile=default
|
||||
#exec dbus-launch --exit-with-session herbstluftwm
|
|
@ -0,0 +1,74 @@
|
|||
(define-module (fschl home-services xsettingsd)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (fschl packages fonts)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (guix gexp)
|
||||
#:export (home-xsettingsd-service-type
|
||||
home-xsettingsd-configuration))
|
||||
|
||||
(define-configuration home-xsettingsd-configuration
|
||||
(dpi
|
||||
(integer 180)
|
||||
"Screen dots per inch (DPI).")
|
||||
|
||||
(theme
|
||||
(string "Adwaita")
|
||||
"The name of the GTK theme to apply.")
|
||||
|
||||
(icon-theme
|
||||
(string "Adwaita")
|
||||
"The name of the icon theme to apply.")
|
||||
|
||||
(font
|
||||
(string "Deja Vu Sans 10")
|
||||
"The name and size of the normal user interface font.")
|
||||
|
||||
(monospace-font
|
||||
(string "Deja Vu Mono 10")
|
||||
"The name and size of the monospace user interface font.")
|
||||
|
||||
(extra-content
|
||||
(string "")
|
||||
"Extra content appended as-is to the xsettingsd configuration file.")
|
||||
|
||||
;; Don't use the serialization system!
|
||||
(no-serialization))
|
||||
|
||||
(define (generate-xsettingsd-file config)
|
||||
(string-append "
|
||||
Net/ThemeName \"" (home-xsettingsd-configuration-theme config) "\"
|
||||
Net/IconThemeName \"" (home-xsettingsd-configuration-icon-theme config) "\"
|
||||
Gtk/DecorationLayout \"menu:minimize,maximize,close\"
|
||||
Gtk/FontName \"" (home-xsettingsd-configuration-font config) "\"
|
||||
Gtk/MonospaceFontName \"" (home-xsettingsd-configuration-monospace-font config) "\"
|
||||
Gtk/CursorThemeName \"Adwaita\"
|
||||
Xft/DPI " (number->string (* 1024 (home-xsettingsd-configuration-dpi config))) " # 1024 * DPI"
|
||||
"\n"
|
||||
(home-xsettingsd-configuration-extra-content config)
|
||||
"\n"))
|
||||
|
||||
(define (home-xsettingsd-files-service config)
|
||||
(list
|
||||
`(".config/xsettingsd/xsettingsd.conf" ,(plain-file "xsettingsd.conf"
|
||||
(generate-xsettingsd-file config)))))
|
||||
|
||||
(define (home-xsettingsd-profile-service config)
|
||||
(map specification->package
|
||||
(list "xsettingsd")))
|
||||
|
||||
|
||||
(define home-xsettingsd-service-type
|
||||
(service-type (name 'home-xsettingsd)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-xsettingsd-profile-service)
|
||||
(service-extension
|
||||
home-files-service-type
|
||||
home-xsettingsd-files-service)))
|
||||
(default-value (home-xsettingsd-configuration))
|
||||
(description "Configures UI appearance settings for Xorg sessions using the xsettingsd
|
||||
daemon.")))
|
|
@ -0,0 +1,23 @@
|
|||
(define-module (fschl packages fonts)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system font)
|
||||
#:use-module ((guix licenses) #:prefix license:))
|
||||
|
||||
(define-public font-jost
|
||||
(package
|
||||
(name "font-jost")
|
||||
(version "3.5")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://github.com/indestructible-type/Jost"
|
||||
"/releases/download/" version "/Jost.zip"))
|
||||
(sha256
|
||||
(base32
|
||||
"1nb92imnk1g7c5nyra2q3k298ym8dp3hcxr1saxyj8mg6gxsqc0h"))))
|
||||
(build-system font-build-system)
|
||||
(home-page "https://indestructibletype.com/Jost.html")
|
||||
(synopsis "The Jost* font")
|
||||
(description "Jost* font.")
|
||||
(license license:silofl1.1)))
|
|
@ -0,0 +1,47 @@
|
|||
(define-module (fschl packages linux)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages audio)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages build-tools)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages pulseaudio)
|
||||
#:use-module (gnu packages vulkan)
|
||||
#:use-module (guix build-system meson)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
;; A temporary fix based on this patch:
|
||||
;; https://lists.gnu.org/archive/html/guix-patches/2021-10/msg00762.html
|
||||
|
||||
(define-public pipewire-0.3.38
|
||||
(package
|
||||
(inherit pipewire)
|
||||
(name "pipewire")
|
||||
(version "0.3.38")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/PipeWire/pipewire")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"15alnzwdgjbjrmphyinwdbaa1bi9cqbk8gkhrb4y6akjqph76hs0"))))
|
||||
(arguments
|
||||
`(#:meson ,meson-0.59
|
||||
#:configure-flags
|
||||
(list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
|
||||
"/lib/udev/rules.d")
|
||||
"-Dsystemd=disabled")))
|
||||
(inputs
|
||||
(append (package-inputs pipewire)
|
||||
`(("bluez" ,bluez)
|
||||
("jack" ,jack-2)
|
||||
("pulseaudio" ,pulseaudio)
|
||||
("vulkan-loader" ,vulkan-loader)
|
||||
("vulkan-headers" ,vulkan-headers))))))
|
|
@ -0,0 +1,264 @@
|
|||
(define-module (fschl systems base)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (gnu)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu system nss)
|
||||
#:use-module (gnu system setuid)
|
||||
#:use-module (nongnu packages linux)
|
||||
#:use-module (nongnu system linux-initrd))
|
||||
|
||||
(use-service-modules guix admin sysctl pm nix avahi dbus cups desktop linux
|
||||
mcron networking xorg ssh docker audio virtualization)
|
||||
|
||||
(use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts libusb
|
||||
cups freedesktop file-systems version-control package-management)
|
||||
|
||||
(define-public base-operating-system
|
||||
(operating-system
|
||||
(host-name "x230guix")
|
||||
(timezone "Europe/Berlin")
|
||||
(locale "en_US.utf8")
|
||||
|
||||
;; Use non-free Linux and firmware
|
||||
(kernel linux)
|
||||
(firmware (list linux-firmware))
|
||||
(initrd microcode-initrd)
|
||||
|
||||
;; Additional kernel modules
|
||||
(kernel-loadable-modules (list v4l2loopback-linux-module))
|
||||
|
||||
;; Choose US English keyboard layout. The "altgr-intl"
|
||||
;; variant provides dead keys for accented characters.
|
||||
(keyboard-layout (keyboard-layout "de" "altgr-intl" #:model "thinkpad"))
|
||||
|
||||
;; Use the UEFI variant of GRUB with the EFI System
|
||||
;; Partition mounted on /boot/efi.
|
||||
(bootloader (bootloader-configuration
|
||||
(bootloader grub-bootloader)
|
||||
;;(targets (list "/dev/sda"))
|
||||
(keyboard-layout keyboard-layout)))
|
||||
;; (bootloader (bootloader-configuration
|
||||
;; (bootloader grub-efi-bootloader)
|
||||
;; (targets '("/boot/efi"))
|
||||
;; (keyboard-layout keyboard-layout)))
|
||||
|
||||
;; Guix doesn't like it when there isn't a file-systems
|
||||
;; entry, so add one that is meant to be overridden
|
||||
(file-systems (cons*
|
||||
(file-system
|
||||
(mount-point "/tmp")
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(check? #f))
|
||||
|
||||
(file-system
|
||||
(device "/dev/sda3")
|
||||
(mount-point "/")
|
||||
(type "ext4"))
|
||||
%base-file-systems))
|
||||
|
||||
(users (cons (user-account
|
||||
(name "fschl")
|
||||
(comment "Frieder Schlesier")
|
||||
(group "users")
|
||||
(home-directory "/home/fschl")
|
||||
(supplementary-groups '("wheel" ;; sudo
|
||||
"netdev" ;; network devices
|
||||
"kvm"
|
||||
"tty"
|
||||
"input"
|
||||
"docker"
|
||||
"realtime" ;; Enable realtime scheduling
|
||||
"lp" ;; control bluetooth devices
|
||||
"audio" ;; control audio devices
|
||||
"video"))) ;; control video devices
|
||||
|
||||
%base-user-accounts))
|
||||
|
||||
;; Add the 'realtime' group
|
||||
(groups (cons (user-group (system? #t) (name "realtime"))
|
||||
%base-groups))
|
||||
|
||||
;; Install bare-minimum system packages
|
||||
(packages (append (map specification->package
|
||||
'("git"
|
||||
"ntfs-3g"
|
||||
"exfat-utils"
|
||||
"fuse-exfat"
|
||||
"stow"
|
||||
"vim"
|
||||
"emacs-no-x-toolkit"
|
||||
"brightnessctl"
|
||||
"bluez"
|
||||
"bluez-alsa"
|
||||
"intel-vaapi-driver"
|
||||
"libva-utils"
|
||||
"xf86-input-libinput"
|
||||
"nss-certs" ;; SSL root certificates
|
||||
"gvfs")) ;; Enable user mounts
|
||||
%base-packages))
|
||||
|
||||
;; Configure only the services necessary to run the system
|
||||
(services (append
|
||||
(modify-services %base-services
|
||||
(delete login-service-type)
|
||||
(delete mingetty-service-type)
|
||||
(delete console-font-service-type))
|
||||
(list
|
||||
;; Seat management (can't use seatd because Wireplumber depends on elogind)
|
||||
(service elogind-service-type)
|
||||
|
||||
;; Configure TTYs and graphical greeter
|
||||
;; (service console-font-service-type
|
||||
;; (map (lambda (tty)
|
||||
;; ;; Use a larger font for HIDPI screens
|
||||
;; (cons tty (file-append
|
||||
;; font-terminus
|
||||
;; "/share/consolefonts/ter-132n")))
|
||||
;; '("tty1" "tty2" "tty3")))
|
||||
|
||||
(service greetd-service-type
|
||||
(greetd-configuration
|
||||
(greeter-supplementary-groups (list "video" "input"))
|
||||
(terminals
|
||||
(list
|
||||
;; TTY1 is the graphical login screen for Sway
|
||||
(greetd-terminal-configuration
|
||||
(terminal-vt "1")
|
||||
(terminal-switch #t)
|
||||
;; (default-session-command (greetd-wlgreet-sway-session
|
||||
;; (sway-configuration
|
||||
;; (plain-file "sway-greet.conf"
|
||||
;; "output * bg /home/fschl/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg fill\n"))))
|
||||
)
|
||||
|
||||
;; Set up remaining TTYs for terminal use
|
||||
(greetd-terminal-configuration (terminal-vt "2"))
|
||||
(greetd-terminal-configuration (terminal-vt "3"))))))
|
||||
|
||||
;; Configure swaylock as a setuid program
|
||||
(service screen-locker-service-type
|
||||
(screen-locker-configuration
|
||||
(name "swaylock")
|
||||
(program (file-append swaylock "/bin/swaylock"))
|
||||
(using-pam? #t)
|
||||
(using-setuid? #f)))
|
||||
|
||||
;; Configure the Guix service and ensure we use Nonguix substitutes
|
||||
(simple-service 'add-nonguix-substitutes
|
||||
guix-service-type
|
||||
(guix-extension
|
||||
(substitute-urls
|
||||
(append (list "https://substitutes.nonguix.org")
|
||||
%default-substitute-urls))
|
||||
(authorized-keys
|
||||
(append (list (plain-file "nonguix.pub"
|
||||
"(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
|
||||
%default-authorized-guix-keys))))
|
||||
|
||||
;; Set up Polkit to allow `wheel' users to run admin tasks
|
||||
polkit-wheel-service
|
||||
|
||||
;; Give certain programs super-user access
|
||||
(simple-service 'mount-setuid-helpers
|
||||
setuid-program-service-type
|
||||
(map (lambda (program)
|
||||
(setuid-program
|
||||
(program program)))
|
||||
(list (file-append nfs-utils "/sbin/mount.nfs")
|
||||
(file-append ntfs-3g "/sbin/mount.ntfs-3g"))))
|
||||
|
||||
;; Networking services
|
||||
(service network-manager-service-type
|
||||
(network-manager-configuration
|
||||
(vpn-plugins
|
||||
(list network-manager-openvpn))))
|
||||
(service wpa-supplicant-service-type) ;; Needed by NetworkManager
|
||||
(service modem-manager-service-type) ;; For cellular modems
|
||||
(service bluetooth-service-type
|
||||
(bluetooth-configuration
|
||||
(auto-enable? #t)))
|
||||
(service usb-modeswitch-service-type)
|
||||
|
||||
;; Basic desktop system services (copied from %desktop-services)
|
||||
(service avahi-service-type)
|
||||
(service udisks-service-type)
|
||||
(service upower-service-type)
|
||||
(service cups-pk-helper-service-type)
|
||||
(service geoclue-service-type)
|
||||
(service polkit-service-type)
|
||||
(service dbus-root-service-type)
|
||||
fontconfig-file-system-service ;; Manage the fontconfig cache
|
||||
|
||||
;; Power and thermal management services
|
||||
(service thermald-service-type)
|
||||
(service tlp-service-type
|
||||
(tlp-configuration
|
||||
(cpu-boost-on-ac? #t)
|
||||
(wifi-pwr-on-bat? #t)))
|
||||
|
||||
;; Enable JACK to enter realtime mode
|
||||
(service pam-limits-service-type
|
||||
(list
|
||||
(pam-limits-entry "@realtime" 'both 'rtprio 99)
|
||||
(pam-limits-entry "@realtime" 'both 'nice -19)
|
||||
(pam-limits-entry "@realtime" 'both 'memlock 'unlimited)))
|
||||
|
||||
;; Configure v4l2loopback module for virtual cameras
|
||||
;; See also: https://stackoverflow.com/a/66072635
|
||||
;; https://github.com/umlaeute/v4l2loopback
|
||||
;; (service kernel-module-loader-service-type '("v4l2loopback"))
|
||||
;; (simple-service 'v4l2loopback-config etc-service-type
|
||||
;; (list `("modprobe.d/v4l2loopback.conf"
|
||||
;; ,(plain-file "v4l2loopback.conf"
|
||||
;; "options v4l2loopback devices=1 video_nr=2 exclusive_caps=1 card_label=\"OBS Virtual Camera\""))))
|
||||
|
||||
|
||||
;; Enable Docker containers and virtual machines
|
||||
(service docker-service-type)
|
||||
(service libvirt-service-type
|
||||
(libvirt-configuration
|
||||
(unix-sock-group "libvirt")
|
||||
(tls-port "16555")))
|
||||
|
||||
;; Enable SSH access
|
||||
(service openssh-service-type
|
||||
(openssh-configuration
|
||||
(openssh openssh-sans-x)
|
||||
(port-number 2222)))
|
||||
|
||||
;; Enable printing and scanning
|
||||
(service sane-service-type)
|
||||
(service cups-service-type
|
||||
(cups-configuration
|
||||
(web-interface? #t)
|
||||
(extensions
|
||||
(list cups-filters))))
|
||||
|
||||
;; Set up the X11 socket directory for XWayland
|
||||
(service x11-socket-directory-service-type)
|
||||
|
||||
;; Sync system clock with time servers
|
||||
(service ntp-service-type)
|
||||
|
||||
;; Add udev rules for MTP (mobile) devices for non-root user access
|
||||
(simple-service 'mtp udev-service-type (list libmtp))
|
||||
|
||||
;; Add udev rules for a few packages
|
||||
(udev-rules-service 'pipewire-add-udev-rules pipewire)
|
||||
(udev-rules-service 'brightnessctl-udev-rules brightnessctl)
|
||||
|
||||
;; Enable the build service for Nix package manager
|
||||
(service nix-service-type)
|
||||
|
||||
;; Schedule cron jobs for system tasks
|
||||
(simple-service 'system-cron-jobs
|
||||
mcron-service-type
|
||||
(list
|
||||
;; Run `guix gc' 5 minutes after midnight every day.
|
||||
;; Clean up generations older than 2 months and free
|
||||
;; at least 10G of space.
|
||||
#~(job "5 0 * * *" "guix gc -d 2m -F 10G"))))))
|
||||
|
||||
;; Allow resolution of '.local' host names with mDNS
|
||||
(name-service-switch %mdns-host-lookup-nss)))
|
|
@ -0,0 +1,102 @@
|
|||
(define-module (fschl systems common)
|
||||
#:use-module (fschl utils)
|
||||
#:use-module (fschl home-services emacs)
|
||||
#:use-module (fschl home-services desktop)
|
||||
#:use-module (fschl home-services udiskie)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services dotfiles)
|
||||
#:use-module (gnu home services gnupg)
|
||||
#:use-module (gnu home services mcron)
|
||||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu home services desktop)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define-public common-home-services
|
||||
(list
|
||||
;; Set environment variables for every session
|
||||
(simple-service 'profile-env-vars-service
|
||||
home-environment-variables-service-type
|
||||
'( ;; Sort hidden (dot) files first in `ls` listings
|
||||
("LC_COLLATE" . "C")
|
||||
|
||||
;; Emacs is our editor
|
||||
("VISUAL" . "emacsclient")
|
||||
("EDITOR" . "emacsclient")
|
||||
|
||||
;; Add some things to $PATH (maybe integrate into other services?)
|
||||
;; ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH")
|
||||
|
||||
;; Make sure Flatpak apps are visible
|
||||
;; ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")
|
||||
|
||||
;; Make sure JAVA_HOME is set
|
||||
;; TODO: Move this to a different service
|
||||
;; ("JAVA_HOME" . "$(dirname $(dirname $(readlink $(which java))))")
|
||||
|
||||
;; Set Wayland-specific environment variables (taken from RDE)
|
||||
("XDG_CURRENT_DESKTOP" . "sway")
|
||||
("XDG_SESSION_TYPE" . "wayland")
|
||||
("RTC_USE_PIPEWIRE" . "true")
|
||||
("SDL_VIDEODRIVER" . "wayland")
|
||||
("MOZ_ENABLE_WAYLAND" . "1")
|
||||
("CLUTTER_BACKEND" . "wayland")
|
||||
("ELM_ENGINE" . "wayland_egl")
|
||||
("ECORE_EVAS_ENGINE" . "wayland-egl")
|
||||
("QT_QPA_PLATFORM" . "wayland-egl")))
|
||||
|
||||
;; Set up the shell environment
|
||||
;; (service home-bash-service-type
|
||||
;; (home-bash-configuration
|
||||
;; (bash-profile
|
||||
;; `(,(plain-file "bash-profile-extras"
|
||||
;; (string-append
|
||||
;; ;; Load the Nix profile
|
||||
;; "if [ -f /run/current-system/profile/etc/profile.d/nix.sh ]; then\n"
|
||||
;; " . /run/current-system/profile/etc/profile.d/nix.sh\n"
|
||||
;; "fi\n"))))
|
||||
;; (bashrc
|
||||
;; `(,(local-file "../files/bash-prompt")))))
|
||||
|
||||
;; Place other files
|
||||
;; (simple-service 'profile-files-service
|
||||
;; home-files-service-type
|
||||
;; (list `(".inputrc" ,(local-file "../files/inputrc"))))
|
||||
|
||||
;; GnuPG configuration
|
||||
;; (service home-gpg-agent-service-type
|
||||
;; (home-gpg-agent-configuration
|
||||
;; (pinentry-program
|
||||
;; (file-append pinentry-emacs "/bin/pinentry-emacs"))
|
||||
;; (ssh-support? #t)
|
||||
;; (default-cache-ttl 28800)
|
||||
;; (max-cache-ttl 28800)
|
||||
;; (default-cache-ttl-ssh 28800)
|
||||
;; (max-cache-ttl-ssh 28800)))
|
||||
|
||||
;; Emacs configuration
|
||||
(service home-emacs-config-service-type)
|
||||
|
||||
;; Run user dbus session
|
||||
(service home-dbus-service-type)
|
||||
|
||||
;; Set up desktop environment
|
||||
(service home-desktop-service-type)
|
||||
|
||||
(service home-dotfiles-service-type
|
||||
(home-dotfiles-configuration
|
||||
(directories (list "../home-services/dotfiles"))))
|
||||
|
||||
;; Start background jobs
|
||||
;; (service home-mcron-service-type
|
||||
;; (home-mcron-configuration
|
||||
;; (jobs
|
||||
;; (list
|
||||
;; #~(job
|
||||
;; '(next-hour (range 0 24 4))
|
||||
;; "~/.dotfiles/.bin/sync-passwords")))))
|
||||
|
||||
;; Udiskie for auto-mounting devices
|
||||
(service home-udiskie-service-type)))
|
|
@ -0,0 +1,51 @@
|
|||
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
|
||||
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||
;;; Copyright © 2019 David Wilson <david@daviwil.com>
|
||||
;;;
|
||||
;;; This program is free software: you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation, either version 3 of the License, or
|
||||
;;; (at your option) any later version.
|
||||
;;;
|
||||
;;; This program is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;; Generate a bootable image (e.g. for USB sticks, etc.) with:
|
||||
;; $ guix system disk-image nongnu/system/install.scm
|
||||
|
||||
(define-module (fschl systems install)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu system install)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages vim)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages emacs)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages mtools)
|
||||
#:use-module (gnu packages file-systems)
|
||||
#:use-module (gnu packages package-management)
|
||||
#:use-module (nongnu packages linux)
|
||||
#:export (installation-os-nonfree))
|
||||
|
||||
(define installation-os-nonfree
|
||||
(operating-system
|
||||
(inherit installation-os)
|
||||
(kernel linux)
|
||||
(firmware (list linux-firmware))
|
||||
|
||||
;; Add the 'net.ifnames' argument to prevent network interfaces
|
||||
;; from having really long names. This can cause an issue with
|
||||
;; wpa_supplicant when you try to connect to a wifi network.
|
||||
(kernel-arguments '("quiet" "modprobe.blacklist=radeon" "net.ifnames=0"))
|
||||
|
||||
;; Add some extra packages useful for the installation process
|
||||
(packages
|
||||
(append (list exfat-utils fuse-exfat git curl stow vim emacs-no-x-toolkit)
|
||||
(operating-system-packages installation-os)))))
|
||||
|
||||
installation-os-nonfree
|
|
@ -0,0 +1,45 @@
|
|||
(define-module (fschl systems x230ding)
|
||||
#:use-module (fschl utils)
|
||||
#:use-module (fschl systems base)
|
||||
#:use-module (fschl systems common)
|
||||
; #:use-module (fschl home-services pipewire)
|
||||
#:use-module (fschl home-services xsettingsd)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu packages file-systems)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu system uuid)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:use-module (gnu system mapped-devices)
|
||||
#:use-module (nongnu packages linux))
|
||||
|
||||
(define home
|
||||
(home-environment
|
||||
(services (cons*
|
||||
(service home-xsettingsd-service-type
|
||||
(home-xsettingsd-configuration
|
||||
(dpi 180)))
|
||||
; (service home-pipewire-service-type)
|
||||
common-home-services))))
|
||||
|
||||
(define system
|
||||
(operating-system
|
||||
(inherit base-operating-system)
|
||||
(host-name "x230guix")
|
||||
|
||||
;; Add sof-firmware drivers for audio on ThinkPad x230
|
||||
;; (firmware (list linux-firmware sof-firmware))
|
||||
|
||||
;; (source (uuid "ad42a856-8e7c-4844-a55a-23ba4bd03dcc"))
|
||||
;; (target "system-root")
|
||||
;; (type luks-device-mapping))))
|
||||
|
||||
(file-systems (cons*
|
||||
(file-system
|
||||
(device "/dev/sda3")
|
||||
(mount-point "/")
|
||||
(type "ext4"))
|
||||
%base-file-systems))))
|
||||
|
||||
;; Return home or system config based on environment variable
|
||||
(if (getenv "RUNNING_GUIX_HOME") home system)
|
|
@ -0,0 +1,52 @@
|
|||
(define-module (fschl utils)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 regex)
|
||||
#:use-module (ice-9 pretty-print)
|
||||
#:use-module (ice-9 textual-ports)
|
||||
|
||||
#:export (gather-manifest-packages
|
||||
apply-template-file))
|
||||
|
||||
(define (read-manifest manifest-path)
|
||||
(with-input-from-file manifest-path
|
||||
(lambda ()
|
||||
(read))))
|
||||
|
||||
(define (gather-manifest-packages manifests)
|
||||
(if (pair? manifests)
|
||||
(begin
|
||||
(let ((manifest (read-manifest (string-append
|
||||
"/home/fschl/.dotfiles/.config/guix/manifests/"
|
||||
(symbol->string (car manifests))
|
||||
".scm"))))
|
||||
;; (pretty-print (eval manifest (current-module)))
|
||||
(append (map specification->package+output
|
||||
(cadadr manifest))
|
||||
(gather-manifest-packages (cdr manifests)))))
|
||||
'()))
|
||||
|
||||
|
||||
(define (apply-template template-string value-alist)
|
||||
(regexp-substitute/global #f
|
||||
"\\$\\{([A-Za-z/\\-]+)\\}"
|
||||
template-string
|
||||
'pre
|
||||
(lambda (m)
|
||||
(let ((entry (assq (string->symbol (match:substring m 1))
|
||||
value-alist)))
|
||||
(if entry
|
||||
(cdr entry)
|
||||
"VALUE NOT FOUND")))
|
||||
'post))
|
||||
|
||||
(define (apply-template-file file-path value-alist)
|
||||
(call-with-input-file file-path
|
||||
(lambda (port)
|
||||
(apply-template (get-string-all port)
|
||||
value-alist))))
|
10
publish.el
10
publish.el
|
@ -32,6 +32,7 @@
|
|||
(defun roam-sitemap (title list)
|
||||
(concat "#+OPTIONS: ^:nil author:nil html-postamble:nil\n"
|
||||
"#+SETUPFILE: ./simple_inline.theme\n"
|
||||
"#+HTML_HEAD_EXTRA: <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/plain.css\" />\n"
|
||||
"#+TITLE: " title "\n\n"
|
||||
(org-list-to-org list) "\nfile:sitemap.svg"))
|
||||
|
||||
|
@ -114,11 +115,12 @@
|
|||
:base-extension "org"
|
||||
:exclude ".stversions/\\|.stfolder"
|
||||
:sitemap-function roam-sitemap
|
||||
:sitemap-title "Roam notes"
|
||||
:sitemap-title "Roam Notes"
|
||||
:style "<link rel=\"stylesheet\" href=\"../css/plain.css\" type=\"text/css\">"
|
||||
:publishing-function roam-publication-wrapper
|
||||
:publishing-directory "~/projects/blog-fschlde/pkb/"
|
||||
:publishing-directory "~/projects/fschlde-static/pkb/"
|
||||
:section-number nil
|
||||
:table-of-contents nil
|
||||
:style "<link rel=\"stylesheet\" href=\"../other/mystyle.cs\" type=\"text/css\">")
|
||||
:table-of-contents t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -57,9 +57,11 @@
|
|||
# #+TITLE: ?
|
||||
# #+DATE:
|
||||
|
||||
# #+SUBJECT: test letter subject
|
||||
#+SUBJECT: Betreff des Briefs
|
||||
|
||||
#+LCO: Absender-Frieder
|
||||
# #+LCO: Absender-Marcelle
|
||||
# #+LCO: Absender-FamilieSchlesier
|
||||
#+LCO: Brief-de-modern
|
||||
#+STARTUP: showall
|
||||
|
||||
|
@ -70,7 +72,9 @@
|
|||
* Sehr geehrte Damen und Herren,
|
||||
?
|
||||
|
||||
* Mit freundlichen Grüßen, :closing: "
|
||||
* Mit freundlichen Grüßen, :closing:
|
||||
|
||||
Frieder Schlesier"
|
||||
)
|
||||
("m" "Schedule a meeting" entry
|
||||
(file+headline "~/Documents/Org/tasks.org")
|
||||
|
|
Loading…
Reference in New Issue