Open pshirshov opened 3 years ago
I do need to slow down and work on this.. and packaging in general for multiple packaging managers. To be honest though, apt, and pacman will likely get done first.
Well, working deb package can be reused in Nix relatively easy.
If you can provide instructions for offline installation to a prefixed path, that's good enough for Nix support and we can take it from there. We can't expect you to figure out how to write a Nix derivation, that's too much effort for something you're probably not using yourself.
A few more details on the requirements:
programs.kinto.enable = true;
). These are generally desirable properties of a project's installer for any packaging effort.
Once Kinto has a sane installation method, adding a Nixpkgs package and NixOS module should be relatively trivial and will likely require no further input from your end (lots of mac users in the Nix community ;) ).
@Atemu Thanks for the input, and typically on bash scripts I reference it this way #!/usr/bin/env bash
although I am noticing I missed the shell script in the root so I do need to update that one.
By default the app installs at ~/.config/kinto for now - and while I plan to keep that I also need to provide better multi-user support and should be installing it or allowing users to install it in a system path for all users as well and to keep defaults in a more global system path type location imo.
To re-iterate the few requirements in the readme
Beyond that there are other small dependencies that get referenced in this file here to ensure that many distros are covered. (sometimes thing still break because distros will change their packages names - it has happened to me) https://github.com/rbreaves/kinto/blob/master/xkeysnail_service.sh
There's also a file called limitedadmins that gets added to the sudoers.d directory to ensure that kinto/xkeysnail gets ran at a high enough permissions level, changes to Fedora as well related to selinux.
Not sure what all that would be involved to create a completely offline install for NixOS or any particular OS. I know that I desperately need to slow down though and get this into a PPA for Debian/Ubuntu based distros. Following that Arch's AUR is on the radar.
I don't think that much about NixOS that is true, and only because it just isn't an OS I have spent any time with. I feel I do need to spin it up in a VM though and really poke around. I was doing something similar not that long ago with ClearLinux as well and did get it working for ClearLinux, and made several notes, but have yet to merge those potential changes into a branch just yet. I am very impressed with the optimizations in ClearLinux, its packaging I find to be a bit unusual compared to most distros I am used to as many things end up getting bundled together, not sure of NixOS is similar or not.
NixOS is a lot different than what I expected it to be and there's no nice GUI installer for it either, that is saddening.
https://news.ycombinator.com/item?id=16773875
Also I really don't care to get into installing an OS purely by CLI without any sort of scripted setup.. so I found this. https://github.com/samuela/nixos-up
allowing users to install it in a system path for all users as well and to keep defaults in a more global system path type location imo.
Sounds good!
Beyond that there are other small dependencies that get referenced in this file here to ensure that many distros are covered. (sometimes thing still break because distros will change their packages names - it has happened to me) https://github.com/rbreaves/kinto/blob/master/xkeysnail_service.sh
There's also a file called limitedadmins that gets added to the sudoers.d directory to ensure that kinto/xkeysnail gets ran at a high enough permissions level, changes to Fedora as well related to selinux.
All of this needs to be precisely documented because configuring these things imperatively is not going to fly for NixOS at all and when packaging for regular distros, that'd be a hard sell too.
Let the distros and/or users take care of setting up services with the correct permissions etc. An install script that does anything more than putting files into some directory is a no-go when it comes to distro packaging.
I know that I desperately need to slow down though and get this into a PPA for Debian/Ubuntu based distros. Following that Arch's AUR is on the radar.
Do those first. Once those are possible, Nixpkgs packaging should be relatively trivial and can(/should) be handled on our end.
NixOS is a lot different than what I expected it to be and there's no nice GUI installer for it either, that is saddening.
NixOS is very different and a GUI installer isn't really that useful until there is a usable GUI to configure NixOS options which is where the real meat of NixOS is: Declarative configuration.
This is not your typical distro that is only really set apart in the way it unpacks tarballs to the root filesystem.
We can't expect you to figure out how to use NixOS, much less package for it, and nixos-up
isn't going to help there much I don't think.
You're going to have big issues on a conceptual level if you approach NixOS by trying to use it like a regular distro.
Once Kinto can be installed to regular FHS distros in a sane manner (current mechanism is not sane), we can take it from there.
Hi, @rbreaves is there any progress? I would like to see this package in nix to change my keyboard layout. Regards
@pshirshov @Atemu @dvonessen
I have a project that is closely related to Kinto, but is substantially different in how it installs and runs (such as using "user" services and no messing with sudoers
). If any of you are interested in discussing how to make it possible to install it on NixOS, I opened an issue here:
NixOS is a very special system and stateful installation approach doesn't work there.
Currently the installer fails immediately:
In case we change the basic installer it still fails:
Also the whole approach with mutating installer which requires
sudo
doesn't work on Nix, probably it would be necessary to use systemd's user services (systemd --user ...
)Could you implement a Nix formula please?