dotter: Simplify local setups

Everything that is in the repo should be listed in the global.toml
file. The local.toml file then picks the stuff to actually
write. For systemwide packages, a systemwide.toml (local) file
is used instead.
This commit is contained in:
Marty Oehme 2023-10-03 13:19:48 +02:00
parent 342a350c97
commit dcde027a67
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
6 changed files with 9 additions and 12 deletions

View file

@ -14,8 +14,6 @@ depends = [
"writing", "writing",
] ]
[system]
[workstation] [workstation]
depends = ["linux", "desktop", "multimedia", "qutebrowser"] depends = ["linux", "desktop", "multimedia", "qutebrowser"]
@ -79,3 +77,7 @@ terminal = "~"
[writing.files] [writing.files]
"writing/README.md" = { target = "~/README.md", type = "symbolic", if = "false" } "writing/README.md" = { target = "~/README.md", type = "symbolic", if = "false" }
writing = "~" writing = "~"
[system.files]
"bootstrap/system-packages" = { target = "/", type = "symbolic", owner = "root" }

View file

@ -1,7 +0,0 @@
[system]
[system.files]
"bootstrap/system-packages" = { target = "/", type = "symbolic", owner = "root" }
[system.variables]

View file

@ -1,4 +1,3 @@
includes = [".dotter/incl-systemwide.toml"]
packages = ["system", "workstation"] packages = ["system", "workstation"]
[files] [files]

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
# don't move the cache into repo
/.dotter/cache.toml
# no idea why gopass adds this image to config path # no idea why gopass adds this image to config path
gopass-logo-small.png gopass-logo-small.png
# #

View file

@ -77,13 +77,13 @@ manage_dotfiles() {
check_consent y "Link dot files?" "Not linking dotfiles." || return check_consent y "Link dot files?" "Not linking dotfiles." || return
check_consent n "Link system settings files? This will require sudo access but will not overwrite existing files." "Not touching system files." || link_systemfiles=false check_consent n "Link system settings files? This will require sudo access but will not overwrite existing files." "Not touching system files." || link_systemfiles=false
if [ "$link_systemfiles" == "false" ]; then if [ "$link_systemfiles" == "false" ]; then
dotter deploy -l .dotter/dots.toml dotter deploy
echo "Linked dotfiles." echo "Linked dotfiles."
else else
if [ -e "/etc/pacman.conf" ]; then if [ -e "/etc/pacman.conf" ]; then
check_consent n "Found an existing pacman.conf file, installation will error if it exists. Remove file?" && run_elevated rm "/etc/pacman.conf" check_consent n "Found an existing pacman.conf file, installation will error if it exists. Remove file?" && run_elevated rm "/etc/pacman.conf"
fi fi
dotter deploy -l .dotter/dots-with-systemwide.toml dotter deploy -l .dotter/systemwide.toml
echo "Linked dotfiles and system files." echo "Linked dotfiles and system files."
fi fi
} }