!coeAONBrWyDJnYMbMi:nixos.org

NixOS System Operations

449 Members
About system administration for running NixOS systems in production. Declaratively manage your operations. | Room recommendations: #networking:nixos.org116 Servers

Load older messages


SenderMessageTime
31 Mar 2024
@janik0:matrix.org@janik0:matrix.org
In reply to @technicus:matrix.org
How can I add a mechanism that will backup the directories whenever I do sudo nixos-rebuild switch?
just overwrite nixos-rebuild with a wrapper script in your path or have your own deployment wrapper (can be as simple as a bash script)
23:28:41
@technicus:matrix.orgMiles Dyson
In reply to @raitobezarius:matrix.org
too many files just make it tedious
What is a method to make it less tedious?
23:30:00
@technicus:matrix.orgMiles Dyson
In reply to @janik0:matrix.org
just overwrite nixos-rebuild with a wrapper script in your path or have your own deployment wrapper (can be as simple as a bash script)
Thanks!
23:30:15
@adam:robins.wtfadamcstephens Make a systemd oneshot without wantedby, and start it on each nixos-rebuild  23:30:17
@adam:robins.wtfadamcstephens Then you can also schedule it with a timer :) 23:30:41
@technicus:matrix.orgMiles Dyson
In reply to @adam:robins.wtf
Make a systemd oneshot without wantedby, and start it on each nixos-rebuild 
I am terrible at making systemd units.
23:31:06
@janik0:matrix.org@janik0:matrix.org
In reply to @technicus:matrix.org
Thanks!
(most people use nixos deployment tools like https://github.com/zhaofengli/colmena but that only makes sense if you start managing more then one device)
23:31:43
@raitobezarius:matrix.orgraitobezarius
In reply to @technicus:matrix.org
What is a method to make it less tedious?
group more stuff together?
23:32:17
@janik0:matrix.org@janik0:matrix.org
In reply to @technicus:matrix.org
I am terrible at making systemd units.
just track your config in git and play around until you figure it out, this is one of NixOS strengths when it comes to learning stuff.
23:32:38
@janik0:matrix.org@janik0:matrix.org
In reply to @technicus:matrix.org
I am terrible at making systemd units.
* just track your config in git and play around until you figure it out, this is one of NixOS strengths when it comes to learning stuff (because worst case roll back is really simple compared to other systems)
23:33:06
@adam:robins.wtfadamcstephens This is about as simple of a unit as you can make. Possible with just `script` and maybe `path` attributes  23:33:30
@technicus:matrix.orgMiles Dyson
In reply to @janik0:matrix.org
(most people use nixos deployment tools like https://github.com/zhaofengli/colmena but that only makes sense if you start managing more then one device)

I do intend to manage multiple devices.

Are there multiple tools?

23:33:34
@janik0:matrix.org@janik0:matrix.org
In reply to @technicus:matrix.org

I do intend to manage multiple devices.

Are there multiple tools?

yes there is like 20 deployment tools, everyone and their dog built one 🙈
23:34:02
@adam:robins.wtfadamcstephens Oh no should I not be building a deployment tool? 23:34:41
@janik0:matrix.org@janik0:matrix.org
In reply to @adam:robins.wtf
Oh no should I not be building a deployment tool?
please don't, at this point nixos deployment tools are the equivalent of javascript frameworks in the nix world.
23:35:24
@janik0:matrix.org@janik0:matrix.orgwhat are you missing from other ones?23:35:34
@adam:robins.wtfadamcstephens Pull based, no building or eval on end systems  23:36:05
@janik0:matrix.org@janik0:matrix.org
In reply to @adam:robins.wtf
Pull based, no building or eval on end systems 
there was one posted on discourse recently doing exactly this iirc
23:36:24
@adam:robins.wtfadamcstephens Cachix deploy can technically do this, but it’s proprietary  23:36:32
@hexa:lossy.networkhexacomin23:37:01
@hexa:lossy.networkhexahttps://github.com/nlewo/comin23:37:06
@janik0:matrix.org@janik0:matrix.org
In reply to @hexa:lossy.network
comin
yeah that one, I forgot the name.
23:37:21
@hexa:lossy.networkhexabut you'd probably need a CI and a cache?23:37:26
@adam:robins.wtfadamcstephens And it still evals, no? 23:37:53
@hexa:lossy.networkhexamost likely, yes23:38:07
@adam:robins.wtfadamcstephens Even if you build on CI and push to cache 23:38:12
@hexa:lossy.networkhexayou want something that pushes the closure to the machine and switches23:38:37
@adam:robins.wtfadamcstephens Pulls but yes  23:38:48
@janik0:matrix.org@janik0:matrix.orgwait how would you do the deployment part without evaling anything on the remote host 🤔23:38:52
@hexa:lossy.networkhexahmm23:39:10

There are no newer messages yet.


Back to Room ListRoom Version: 10