pleroma.debian.social

pleroma.debian.social

due to the nature of my job (developing new laptops/computers) i often find myself needing to set up a familiar environment with go-to apps and configs again and again on new systems for dogfooding tests. i'm curious if any of you use any kind of configuration management system for your personal desktops, for migrating systems / setting up new machines and restoring your preferences in a more automated way?

@mntmn Apart from having a configuration folder stored in git and sym-linking sub folder from it, no.

@mntmn sounds like a textbook usecase for NixOS but don't want to be obnoxious about it :p

@raito that's true, but then i'd need to move all those apps to Nix instead of debian packages, right?

(probably should add that i'm using Debian everywhere)

@mntmn that's correct, in all cases, you'd need Nix packages for many of these apps, depending on what your testing focus is on

@mntmn I use dotdrop for syncing my dot files

@raito well, it would be an alternative to flatpak stuff at least, because that's outside of apt scope already...

@mntmn alternatively, you can achieve similar results with Ansible/Chef, etc. But I think this is painful and I wouldn't recommend it. This way, you can use Debian packages though

@mntmn I have a folder synced to all machines using Unison that contains dotfiles, scripts and other random stuff I need on all systems. I then manually symlink those to relevant places as needed.

@mntmn I use Ansible for configuration management on my home servers, and recently I started trying to also manage a laptop with it.

For OS installation itself I ended up using a shell script, since that has less depdendencies so it takes less manual steps to run it on a freshly booted ArchISO.

But for things like installing packages, setting up configs in /etc, as well as dotfiles, I'm trying to use ansible.

1/

@avian i've used unison for a longer time but i couldn't fix an issue that would leave behind 0 byte sized "archive" files and break auto syncing... not sure what caused that (perhaps unclean shutdowns)

@mntmn
It's going slow, but hopefully at the end it'll be as easy to reinstall as my servers are.

That being said I heard other people are using Nix and its fully-declarative-configuration to a great effect.

@mntmn Its not called "The Universal Operating System" for nothing

@mntmn yeah, I think it's worth trying with Nix on Debian, writing a Nix file of your needs / even a home manager configuration (which is a tool that eats a Nix expression and setups your /home dotfiles and PATH) and you can figure out if you feel like the time investment is excessive or not

@mntmn I don't develop laptops but I also have 20+ laptops and I need a slightly similar environment across them and without NixOS, I think I would have wasted literal weeks in the end

@mntmn I use NixOS, so on a new machine I slap in my usual configuration.nix and press go and all my packages are installed and configured and daemons started - you can run nix on debian and get it to set up your packages and configuration but not necessarily start your packages, if I understand it. I just check my $HOME dotfiles out of fossil, but there's a thing called home-manager (based on nix) that does those declaratively, too, that many swear by!

@mntmn
Same as talpa mentions. But I'm also running NIxOS on one computer now which at least trivializes system setup as programs and their global configs are in one file: /etc/nix/configuration.nix.

Haven't tried the tool (home manager?) for doing the same with your ~/.config/* yet.

But Nix might be a bit much to learn just to make configs portable. Wouldn't recommend it unless you're open to joining the Nix cult.

@mntmn I use Ansible for this, but only at work.

@mntmn When migrating machines, I copy /etc/nixos and /home and then I'm ready to continue work.

@mntmn if they are very similar, I just dd and create disk images. If they are different enough that they get a special install with a seed file / kick-start image then Ansible to finish.

@miah because someone else mentioned usb drives, this also made me think in the direction of disk image, maybe a tool that would create a sparse/selective disk image of a work machine with the relevant apps and config folders, that i could download and chroot into or even overlay mount. but collecting all the config files is laborious i guess.

@mntmn For now I have my config files in git too, but Chezmoi is able to restore even packages across machines while not being as heavy as ansible
replies
0
announces
0
likes
0

@mntmn

I just wrote distro packages for my setups. Like seeding dotfiles into /etc/skel and depending on core packages I need for my things.

Makes for quick setup on new machines personally.

@mntmn this is a broad topic, so i will just mention some random curiosities from my - ever evolving - approach.
1. i run most tools like kicad, ltspice etc., from a different os user. i have scripted bindfs to mount application-relevant directories from my main user to "a puppet" user home dir.
2. on / i created a git repo, and i am including there also app-specific stuff, like custom udev rules.
3. most if not all app-specific folders, files are links to a dir which i am always backing up.

@Foxboron ah, that's a good idea

@mntmn
Like most replies here I keep a repo with default configs and customisation files.and use this on new systems. But I also serve a few files (via softlinks) to a random folder on my personal website.

For account preference things like my .vimrc or git .config it means I can simply wget them at will no matter where I am. Useful when setting up new user accounts, or working on accounts created by others.

@mntmn
It gives you some of the conceptual benefits of nix without buying into the entire language and abstraction things they do.

I also have post_install hooks to apply diffs to my system configurations. But arguably it's a little bit hard to maintain.

@mntmn what's wrong with scp? 🙃
Joke aside I have meta packets with what I need in my private repos for Debian and Chimera Linux dot files exist in git.

@TheOneDoc i use scp and sshfs a lot, and it's my preferred remote (also in LAN) file access method! i'm just interested in how people manage all that

@TheOneDoc btw how is Chimera going for you? is it better faster stronger than other distros?

@mntmn Interesting. I've never seen that, but I don't use any automatic syncing. I just run it manually from a shell when I need it.

The one issue I remember having some time back was incompatibility between versions in different Debian releases because of different ocaml compilers or something.

@mntmn I use ansible plus bash or sometimes just bash. But it is not fully automated or debugged because I don't design new laptops so my volume is low.

I have scripts on github that are public so you don't need secrets on the target machine and can just copy a one liner to start.

I do have a fully cooked minimal example that runs in a vm and installs all dependencies to run a verilog simulation.

https://github.com/poleguy/protonpack/blob/main/scripts/test_install.sh

I'm inspired by: https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/

@mntmn my approach is:
1. manually perform a minimal netinstall including an ssh server.
2. use ansible for system config / user setup. I've currently got different roles for servers, Gnome desktop, and sway workstation. ansible is handy for e.g. browser flatpaks that apt can't help with.
3. pull in dotfiles managed with mr/vcsh.

I recently installed a new device (sadly not a reform) and updated the ansible playbook for Trixie. This method is the best I've found for Debian.

@mntmn git repo with files and config plus a bash script that reinstall and setup everything (using debian since 98, the script has started around 2010 I think -- also have a version for openbsd)

@mntmn Lars built a custom minimal debian installer and uses ansible to set up his environment for exactly your use case https://vmdb2.liw.fi/

@mntmn Dogfooding?

@edwiebe a term for using your own products to make sure they're good

@mntmn bash scripts to get a base bootable system (Arch, so probably not applicable) and Ansible for setting up preferences, scripts, packages, Flatpaks, configs, etc.

I also try to keep the Ansible playbooks as universal as possible so that it works with as well as on Arch.

@mntmn There is ansible or puppet to configure and provision systems. Never used it for setting up my private machines though. I just use a git repo with configs and scripts to somewhat automate new machine setup

@mntmn Similar to the other folks here using Nix, I use Guix for this. (Which does have its frustrations on aarch64 since it's a less common platform, but it's gotten a bit better over time.) For the time being I'm doing this on the Reform Debian images, not running it as its own distro (both Nix and Guix can do this!)

It's nice to have all my machines have effectively the same desktop configuration though :)

@mntmn yep, I use a bare git repo plus a bash alias to track all my dotfiles: https://mastodon.social/@gnomon/113722460965617441

@mntmn just scripts usually, but I try to move towards Ansible for that kind of stuff

This is such a great use of git. Anytime I'm setting up a new shell it's so easy.

@mntmn I use Sparrow for that - https://sparrowhub.io

@mntmn For Debian I can recommend https://bundlewrap.org/ (beyond that, I'd also recommend NixOS for that use case)

@wamserma oh interesting

@melezhik thanks, looks interesting

@smlx @mntmn I have! I liked its central idea and I wanted to see how much of its features I could get with much, much less complexity. That's how I ended up at my current solution, which is conceptually compact enough to fit in my brain - I don't even script it, it's just three setup commands.

(vcsh is great too!)

@mntmn
I would say try , but I guess it's not there for everyday use without a lot of tinkering (and scheme knowledge) just yet