From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Rudi Blom <rudi.j.blom@gmail.com>, coff <coff@minnie.tuhs.org>
Subject: Re: [COFF] What is your prompt?
Date: Mon, 27 Dec 2021 19:37:15 +0100 [thread overview]
Message-ID: <20211227183715.zL8YT%steffen@sdaoden.eu> (raw)
In-Reply-To: <YcjcC7x8TrMq4kvy@mit.edu>
Theodore Ts'o wrote in
<YcjcC7x8TrMq4kvy@mit.edu>:
|On Sun, Dec 26, 2021 at 12:43:37AM +0100, Steffen Nurpmeso wrote:
|> I usually do "scp .* HOST:" whenever i get a HOST account, and
|> forget about it thereafter.
|
|I keep a private git repo on one of my machines, so when I get a HOST
|account, I run a comand like this:
|
|% git clone ssh://tytso@example.com/home/tytso/repos/dotfiles .
|% cd dotfiles
|% make
|
|This installs a bunch of symlinks from
|dotfiles/{.bashrc,.profile,.muttrc}, etc. to $HOME/.
|
|That way, I can run "git pull" to update my dotfiles on one particular
|machine, and if I make local changes, I'll do a "git push" to send
|them back to my dotfiles repo.
Negative.. but i have sort of this for root accounts, less any
fancy make(1) mechanism, however, but there is ~/sic/root.git, and
locally i merge/bundle according branches into machine specific
branche(s) that can then be pushed/fetched.
(My spare "wales" even simply selectively shares the filesystem
via snapshots, it is just which /root/.git branch is checked out,
and one "/root/bin/backup.sh restore" after FS synchronization;
same shared static kernel, but different ssh keys and /etc/hosts,
hostname via kernel command line, thanks to /dev/mapper even
/etc/fstab is identical. I can git merge "kent" into "wales", and
git just does it right!)
I "only have symlinks" in my non-root ~/, but i have to create
them manually. I do not have many accounts i work with:
practically all VMs for building+testing software, so not much
effort getting cosy there. Here on "kent" i created them on April
13th 2019, only added .irssi on April 22nd once i started using
IRC, too. That is manageable.
And all the directories that then exist nonetheless, ~/sic,
~/{,sec.}arena, ~/$USR (~/usr-kent-crux-linux-x86_64/{bin,lib..}
here) are created by ~/.profile when i login the first time with
the symlink tree present. (But of course they are empty, hm.)
It all _is_ in a sec.arena/configs.git directory, but there is
home/ as well as .home/ and some others, and only home/ content is
to be distributed, so i go into that home and scp(1). The data in
there is pretty stable, and what changes sometimes, for example my
mailer's config when its development continues, or the .cwmrc just
got a "pkill -CONT tmux" last week (^Z delivery sometimes hits
tmux not the terminal within where it is typed), is needed only
locally. But your approach is much nicer.
Just to add that ~/sic is an encfs mount of ~/.sic, ~/.mozilla of
~/.secweb-mozilla (normal browsing container mounts a specific
/home partition), and ~/sec.arena of ~/.sec.arena, only the latter
two of which are permanently mounted when the lid is up.
Really, i love what has become possible with modern hard- and
software!
|The Makefile I have in my top-level repo some folks might find
|interesting:
|
|.PHONY: all bin dotfiles
|
|all: dotfiles
|
|DIRS= .gnupg .mutt .config/gce-xfstests .config/gcloud/configurations \
|bin em
|#DBG= echo
|
|dotfiles:
| for file in $(shell find $(CURDIR) -maxdepth 1 -type f -name ".*" \
| -not -name ".*~" -not -name ".gitignore" -print); do \
| f=$$(basename $$file); \
| if test -f $(HOME)/$$f -a ! -h $(HOME)/$$f ; then \
| mkdir -p backup ; \
| mv $(HOME)/$$f backup ; \
| fi ; \
| $(DBG) ln -sfn $$file $(HOME)/$$f; \
| done
| for dir in $(DIRS) ; do \
| $(DBG) mkdir -p $(HOME)/$$dir ; \
| for file in $$(find $$(pwd)/$$dir -maxdepth 1 -type f \
| -not -name "*~" -print); do \
| f=$$(basename $$file); \
| if test -f $(HOME)/$$dir/$$f -a ! -h $(HOME)/$$dir/$$f ; then \
| mkdir -p backup/$$dir ; \
| mv $(HOME)/$$dir/$$f backup/$$dir ; \
| fi ; \
| $(DBG) ln -sfn $$file $(HOME)/$$dir/$$f; \
| done; \
| done
| if test -d backup ; then find backup -type f -print ; fi
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
next prev parent reply other threads:[~2021-12-27 18:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-25 2:50 Rudi Blom
2021-12-25 4:40 ` Theodore Ts'o
2021-12-25 17:39 ` Steffen Nurpmeso
2021-12-25 18:28 ` Grant Taylor via COFF
2021-12-25 19:14 ` Steffen Nurpmeso
2021-12-26 3:44 ` Grant Taylor via COFF
2021-12-25 23:19 ` Greg 'groggy' Lehey
2021-12-25 23:43 ` Steffen Nurpmeso
2021-12-26 21:18 ` Theodore Ts'o
2021-12-26 21:33 ` Warner Losh
2021-12-27 1:33 ` Theodore Ts'o
2021-12-27 2:52 ` Rudi Blom
2021-12-27 3:43 ` Greg 'groggy' Lehey
2021-12-27 4:06 ` Rudi Blom
2021-12-27 4:12 ` Greg 'groggy' Lehey
2021-12-27 4:28 ` Rudi Blom
2021-12-27 18:44 ` Steffen Nurpmeso
2021-12-27 18:55 ` Warner Losh
2021-12-27 19:07 ` Grant Taylor via COFF
2021-12-27 19:25 ` Steffen Nurpmeso
2021-12-27 18:37 ` Steffen Nurpmeso [this message]
2021-12-26 3:29 ` Grant Taylor via COFF
2021-12-26 3:54 ` Greg 'groggy' Lehey
2021-12-26 5:27 ` Grant Taylor via COFF
-- strict thread matches above, loose matches on Subject: below --
2021-12-23 6:59 [COFF] What is your prompt? (was: ksh88 source code?) Andy Kosela
2021-12-24 17:17 ` [COFF] What is your prompt? Grant Taylor via COFF
2021-12-26 22:17 ` Mike Markowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211227183715.zL8YT%steffen@sdaoden.eu \
--to=steffen@sdaoden.eu \
--cc=coff@minnie.tuhs.org \
--cc=rudi.j.blom@gmail.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).