GUIX novosti (home, shell)

t460s-fhd
Jurij Podgoršek 2024-03-16 17:28:50 +01:00
parent fdcf19438b
commit 9ae8b1ec91
9 changed files with 76 additions and 196 deletions

View File

@ -0,0 +1,23 @@
(cons* (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
;(channel
; (name 'guixrus)
; (url "https://git.sr.ht/~whereiseveryone/guixrus")
; (introduction
; (make-channel-introduction
; "7c67c3a9f299517bfc4ce8235628657898dd26b2"
; (openpgp-fingerprint
; "CD2D 5EAA A98C CB37 DA91 D6B0 5F58 1664 7F8B E551"))))
;(channel
; (name 'kompot)
; ;;(url "https://git.kompot.si/kompot/guix-paketi")
; (url (string-append "file://" (getenv "HOME") "/projekti/guix-paketi"))
; (branch "main"))
%default-channels)

View File

@ -338,9 +338,6 @@ exec mako --default-timeout=5000 --icon-path /usr/share/icons/Numix
# Autotiling https://github.com/nwg-piotr/autotiling # Autotiling https://github.com/nwg-piotr/autotiling
exec ~/bin/autotiling.py exec ~/bin/autotiling.py
# Rdece, da lahko spim, hvala
exec gammastep -m wayland -l 46.05108:14.50513
# Zagoni programov razporejeni na workspejse # Zagoni programov razporejeni na workspejse
workspace 1: workspace 1:
#exec firefox #exec firefox

View File

@ -54,7 +54,7 @@ export GUILE_SITE_DIR="$HOME/.local/guile/site_dir"
export XDG_CURRENT_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway
# Guix # Guix
export GUIX_PACKAGE_PATH="$HOME/projekti/guix-paketi" #export GUIX_PACKAGE_PATH="$HOME/projekti/guix-paketi # guix channel!
#export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" #export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
#export GUIX_PROFILE="$HOME/.guix-profile" #export GUIX_PROFILE="$HOME/.guix-profile"
#export XDG_DATA_DIRS="/usr/local/share:/usr/share:$XDG_DATA_DIRS" #export XDG_DATA_DIRS="/usr/local/share:/usr/share:$XDG_DATA_DIRS"

View File

@ -46,6 +46,7 @@
(group "users") (group "users")
(supplementary-groups '("wheel" "netdev" (supplementary-groups '("wheel" "netdev"
"audio" "video" "dialout")) "audio" "video" "dialout"))
(shell (file-append zsh "/bin/zsh"))
(home-directory "/home/g1smo")) (home-directory "/home/g1smo"))
(user-account (user-account
(name "bask") (name "bask")

View File

@ -35,7 +35,7 @@ alias sudo='sudo env PATH=$PATH '
alias ag="rg" alias ag="rg"
alias less="less -R" alias less="less -R"
alias gitclean="git fetch -p && for branch in \$(git branch -vv | grep ': gone]' | gawk '{print \$1}'); do git branch -D \$branch; echo 'deleted \$branch'; done" alias gitclean="git fetch -p && for branch in \$\(git branch -vv | grep ': gone]' | gawk '{print \$1}'\); do git branch -D \$branch; echo 'deleted \$branch'; done"
alias sctl="systemctl" alias sctl="systemctl"
alias ddrush="ddev exec drush" alias ddrush="ddev exec drush"
alias dcomposer="ddev exec composer" alias dcomposer="ddev exec composer"

View File

@ -6,18 +6,27 @@
(use-modules (gnu home) (use-modules (gnu home)
(gnu packages) (gnu packages)
(gnu packages xdisorg)
(gnu services) (gnu services)
(guix gexp) (guix gexp)
(gnu home services shells)) (gnu home services shells)
(gnu home services desktop)
(gnu home services pm)
(gnu home services sound))
(home-environment (home-environment
;; Below is the list of packages that will show up in your ;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile. ;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages (list "crawl-tiles" (packages (specifications->packages (list "htop"
"emacs-pgtk"
"binutils"
"gcc-toolchain@11"
"icecat-l10n:sl"
"icecat"
"crawl-tiles"
"acpi" "acpi"
"zynaddsubfx" "zynaddsubfx"
"gnome-tweaks" "gnome-tweaks"
"papirus-icon-theme"
"gimp" "gimp"
"supercollider" "supercollider"
"ardour" "ardour"
@ -43,16 +52,14 @@
"libappindicator" "libappindicator"
"snixembed" "snixembed"
"vlc" "vlc"
"emacs-next-pgtk"
"qpwgraph" "qpwgraph"
"pamixer" "pamixer"
"element-desktop" "element-desktop"
"pavucontrol" "pavucontrol"
"libreoffice" "libreoffice"
"mako" "mako"
"firefox"
"alacritty" "alacritty"
"gammastep" "redshift-wayland"
"i3status" "i3status"
"rofi-wayland" "rofi-wayland"
"sway" "sway"
@ -78,31 +85,41 @@
"font-fira-code" "font-fira-code"
"font-awesome" "font-awesome"
"unzip" "unzip"
"zsh"
"curl"))) "curl")))
;; Below is the list of Home services. To search for available ;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal. ;; services, run 'guix home search KEYWORD' in a terminal.
(services (services
(list (service home-bash-service-type (list (service home-zsh-service-type
(home-bash-configuration (home-zsh-configuration
(aliases '(("ag" . "rg") (zshrc (list (local-file
("dcomposer" . "ddev exec composer") "/home/g1smo/sredstva/dotfiles/.zshrc"
("ddrush" . "ddev exec drush") "zshrc")))
("gitclean" . "git fetch -p && for branch in $(git branch -vv | grep '\\'': gone]'\\'' | gawk '\\''{print $1}'\\''); do git branch -D $branch; echo '\\''deleted $branch'\\''; done") (zprofile (list (local-file
("grep" . "grep --color=auto") "/home/g1smo/sredstva/dotfiles/.profile"
("kill-element" . "kill $(ps aux | grep element | awk '\\''{print $2;}'\\'')") "profile")))))
("less" . "less -R")
("ll" . "ls -l") ;; Skrij misko po 4 sekundah ne-premikanja
("ls" . "ls --color -C") (service home-unclutter-service-type
("offer-files" . "python3 -m http.server") (home-unclutter-configuration
("run-gamma" . "pkill -f gammastep; sleep 3; screen -dm -- gammastep -m wayland -l 46.05108:14.50513") (idle-timeout 2)))
("sctl" . "systemctl")
("sudo" . "sudo env PATH=$PATH ") ;; Rdecenje zaslona @TODO se ne dela :(
("vi" . "vim") (service home-redshift-service-type
("wxon" . "xhost +local:"))) (home-redshift-configuration
(bashrc (list (local-file (redshift redshift-wayland)
"/home/g1smo/sredstva/dotfiles/guix/home.scm/.bashrc" (adjustment-method 'wayland)
"bashrc"))) (location-provider 'manual)
(bash-profile (list (local-file (latitude 46.05108)
"/home/g1smo/sredstva/dotfiles/guix/home.scm/.bash_profile" (longitude 14.50513)))
"bash_profile"))))))))
;; Pipewire zvok!
;; Dbus je odvisen paket
(service home-dbus-service-type)
(service home-pipewire-service-type)
;; Indikator nizke baterije
(service home-batsignal-service-type)
)))

View File

@ -1,75 +0,0 @@
(define-module (home services mako)
#:use-module (ice-9 match)
#:use-module (gnu home services)
#:use-module (gnu services configuration)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (gnu packages wm)
#:use-module (guix import utils)
#:use-module ((gnu home-services-utils) #:select (maybe-object->string))
#:export (home-mako-service-type
home-mako-configuration))
(define-configuration/no-serialization home-mako-configuration
(package
(package mako)
"mako package to use")
(config
(alist '())
""))
(define (serialize-mako-config config)
(define* (serialize-criteria criteria #:optional (res '()))
(match criteria
((field value)
(format #f "[~a]\n"
(string-join
(cons (format #f "~a=\"~a\"" field value) res))))
((field value . rest)
(serialize-criteria
rest
(cons (format #f "~a=\"~a\"" field value) res)))))
(define (serialize-key key)
(if (list? key)
(serialize-criteria key)
(string-append (maybe-object->string key) "=")))
(define (serialize-val val)
(cond
((or (number? val) (symbol? val)) (maybe-object->string val))
((list? val) (serialize-mako-config val))
(else val)))
(define (serialize-field key val)
(let ((val (serialize-val val))
(key (serialize-key key)))
(list key val)))
(generic-serialize-alist
(lambda args (flatten (interpose args)))
serialize-field
config))
(define (add-mako-configuration config)
(let ((cfg (home-mako-configuration-config config)))
`(("mako/config"
,(apply mixed-text-file
"config"
(serialize-mako-config cfg))))))
(define add-mako-package
(compose list home-mako-configuration-package))
(define home-mako-service-type
(service-type
(name 'home-mako)
(extensions
(list (service-extension
home-xdg-configuration-files-service-type
add-mako-configuration)
(service-extension
home-profile-service-type
add-mako-package)))
(default-value (home-mako-configuration))
(description "")))

View File

@ -1,87 +0,0 @@
(define-module (home services pipewire)
#:use-module (guix gexp)
#:use-module (gnu packages linux)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd))
(define (home-pipewire-files-service _)
`(("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 (home-pipewire-shepherd-service _)
(list
(shepherd-service
(requirement '(dbus))
(provision '(pipewire))
(stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor
(list #$(file-append pipewire "/bin/pipewire")))))
(shepherd-service
(requirement '(pipewire))
(provision '(wireplumber))
(stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor
(list #$(file-append wireplumber "/bin/wireplumber")))))
#;
(shepherd-service
(requirement '(pipewire))
(provision '(pipewire-media-session))
(stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor
(list
#$(file-append
pipewire-media-session
"/bin/pipewire-media-session")
"-c"
#$(file-append
pipewire-media-session
"/share/pipewire/media-session.d/media-session.conf")))))
(shepherd-service
(requirement '(pipewire))
(provision '(pipewire-pulse))
(stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor
(list #$(file-append pipewire "/bin/pipewire-pulse")))))))
(define-public home-pipewire-service-type
(service-type
(name 'home-pipewire)
(extensions
(list (service-extension
home-xdg-configuration-files-service-type
home-pipewire-files-service)
(service-extension
home-shepherd-service-type
home-pipewire-shepherd-service)
(service-extension
home-profile-service-type
(const (list pipewire pulseaudio)))))
(default-value #f)
(description "run pipewire and stuff")))

View File

@ -42,6 +42,10 @@ ln -s $DIR/.config/compton.conf ~/.config/compton.conf
# redshift (pordeci skrin, X) # redshift (pordeci skrin, X)
ln -s $DIR/.config/redshift ~/.config/redshift ln -s $DIR/.config/redshift ~/.config/redshift
# guix (channel z lokalnimi paketi
mkdir ~/.config/guix
ln -s $DIR/.config/guix/channels.scm ~/.config/guix/channels.scm
# i3 block, bolj fensi statusbar (ne uporabljam vec) # i3 block, bolj fensi statusbar (ne uporabljam vec)
ln -s $DIR/.i3blocks.conf ~/.i3blocks.conf ln -s $DIR/.i3blocks.conf ~/.i3blocks.conf