about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/profpatsch/nman: unit test testable stuffsternenseemann2021-02-253-4/+87
| | | | | | | This is parsing and rendering of stuff currently mostly, since our main logic is relatively interwoven with IO stuff (to avoid copying stuff a lot). This is fine however as the application logic is tested using the nixos vm test we also have!
* pkgs/profpatsch/nman(1): examples after descriptionsternenseemann2021-02-251-30/+17
|
* pkgs/profpatsch/nman(1): reorder invocation descriptionssternenseemann2021-02-251-25/+26
| | | | Now shortest is listed first.
* pkgs/profpatsch/nman: let nix tools inherit stderr handlesternenseemann2021-02-251-12/+25
| | | | | | | | | This relieves us of the burden to print the error message and lets the user see what's going on, for example why they have to wait for years when running `nman duplicity` (we have to fetch all transitive python dependencies). We also print the exit status in case of errors and the signal that killed a process (in the case of SIGKILL, SIGSEGV and maybe more?).
* pkgs/profpatsch/nman(1): please mandoc -Tlintsternenseemann2021-02-251-1/+1
|
* pkgs/profpatsch/nman: use 100 for usage errorssternenseemann2021-02-252-3/+3
| | | | | | | In the Profpatsch universe, execline reigns surpreme. Therefore we must bow to its (understandable) rejection of POSIX and use 100 as the user error instead of the 64 of sysexits.h. This makes a lot of sense, as we are already using execline conventions for the other exit codes.
* pkgs/profpatsch/nman(1): add DISCLAIMER sectionsternenseemann2021-02-251-0/+13
| | | | | | | | We want to discourage scripting with nman, as we may want to tweak the user interface or internal behavior of nman in the future without maintaining backwards compatibilty. In other words: You have been warned.
* pkgs/profpatsch/nman(1): add Profpatsch's emailsternenseemann2021-02-251-2/+3
|
* pkgs/profpatsch/nman(1): misc clarificationssternenseemann2021-02-251-5/+7
| | | | (as suggested by Profpatsch)
* pkgs/profpatsch/nman: typo fixessternenseemann2021-02-252-2/+2
|
* pkgs/profpatsch/nman: clone path instead of resetting itsternenseemann2021-02-251-9/+6
| | | | | Just copy path instead of having a harder to maintain reset mechanism. Copying strings is not really a performance concern in this case.
* pkgs/profpatsch/nman: print io::Error for NmanError::IOsternenseemann2021-02-251-5/+4
| | | | | | | We reuse std::io::Error's Display trait to print precisely the error that occurred to the user as well. This will probably help a lot if an IO error should ever occurr, as they will only ever occurr in very weird situations (mktemp(3) failed or share/man is not a readable directory).
* pkgs/profpatsch/nman: adjust usage to match man pagesternenseemann2021-02-251-1/+1
|
* tests/profpatsch/programs/nman: add nixos test for nmansternenseemann2021-02-252-0/+54
| | | | | | | | | | | We can't really do normal unit tests, since they'd be integration tests requiring nix. Recursive nix is also a bad idea in normal derivations, so we add a NixOS test for nman. Here we are also somewhat limited since we already need to have all store paths used by nman in /nix/store otherwise we'd need to access the network which would fail. However we can verify that nman only builds specific store paths before finding the desired man page this way.
* pkgs/profpatsch/nman: add man page for nmansternenseemann2021-02-252-0/+197
| | | | Proof-reading would be very welcome!
* pkgs/profpatsch/nman: fix panic if mandir.len() < 3sternenseemann2021-02-251-1/+1
| | | | | | | | | | | | | Sometimes share/man contains directories that are not of the form man<section> which we are checking in build_man_page. However, this check can't deal with directories that are shorter than 3 characters due to the use of split_at() which panics if the index is out of range (for somer reason…). In nixpkgs it is relatively common to have directories like "de" in share/man. This has been resolved.
* pkgs/profpatsch/nman: repurpose old path field in DrvWithOutputsternenseemann2021-02-251-6/+8
| | | | | | | | | The path field wasn't used in DrvWithOutput as we only ever needed rendered. rendered however is a bit of a confusing name as it is not in fact fully rendered in all cases. Since we can pass rendered to nix-store --realise without preprocessing in all cases we rename it to path and add a note in the documentation. The old path field is removed for this without replacement.
* pkgs/profpatsch/nman: move parse_drv_* into implssternenseemann2021-02-251-34/+38
| | | | | * parse_drv_output → DrvOutput::parse * parse_drv_path → DrvWithOutput::parse
* pkgs/profpatsch/nman: document code furthersternenseemann2021-02-251-0/+54
|
* pkgs/profpatsch/nman: if no section is given, treat it as unknownsternenseemann2021-02-251-37/+67
| | | | | | | | | | | | | | | Previously, we would always assume section 1 was requested if no section was given on the command line. Now the section is treated as if it was unknown and we search for a matching man page by looking through the sub directories of $output/share/man. This means the following invokation works as expected: nman libunwind unw_getcontext instead of requiring nman libunwind 3 unw_getcontext
* pkgs/profpatsch/nman: use pkgs.sternenseemann.temp for TempDirsternenseemann2021-02-253-44/+15
| | | | | temp is essentially the old TempDir code from nman, but using libc's mkdtemp(3) directly instead of mktemp(1) and a slightly better API.
* pkgs/profpatsch/nman: print context for common error messagessternenseemann2021-02-251-34/+43
| | | | | Most notably stderr produced by nix-instantiate and nix-store will now be printed on an error.
* pkgs/profpatsch/nman: reduce and unify exit codessternenseemann2021-02-251-7/+9
|
* pkgs/profpatsch/nman: mutate PathBuf directly instead of using .join()sternenseemann2021-02-251-5/+4
| | | | Should save on copying a bit.
* pkgs/profpatsch/nman: print errors to stderrsternenseemann2021-02-251-4/+2
|
* pkgs/profpatsch/nman: prefer out over docsternenseemann2021-02-251-1/+1
| | | | | | | | man pages are usually pretty small and therefore often also included in out whereas doc seems to seldomly contain any man pages. TODO: confirm this and get a better overview over man pages in doc outputs
* pkgs/profpatsch/nman: check for newline before trimmingsternenseemann2021-02-251-1/+4
|
* pkgs/profpatsch/nman: don't realise all build outputs for `out`sternenseemann2021-02-251-5/+15
| | | | | | | | | | | | | | | nix-instantiate unfortunately prints the plain .drv path for <attr>.out wheras it prints <name>.drv!<output> for all non-default outputs. If we realise the plain .drv path, _all_ outputs are realised which is not desireable since we may not need extra store path being created by this, e. g. for a derivation with outputs = [ "out" "lib" "dev" ] we only need to realise "out" if the man pages are located in there, saving a bit of time and disk space. We implement this better behavior by adding the render function to DrvWithOutput which converts a DrvWithOutput (at the cost of copying) to an OsString. If the output is out, "!out" is appended to the path meaning nix-store will only realise the default output.
* pkgs/profpatsch/nman: distinguish between failed and missing cmdssternenseemann2021-02-251-4/+7
|
* pkgs/profpatsch/nman: refactor exit code handling, print error messagessternenseemann2021-02-251-12/+30
| | | | | | * make exit code determination nicer syntactically by using an impl * add .msg() function which returns an appropriate error message for every error type.
* pkgs/profpatsch/nman: fix building of default outputsternenseemann2021-02-251-5/+9
| | | | | | | | | | Unfortunately, nix-instantiate prints only the drv path for the `out` output which causes nix-store to realise all drv outputs. This of course breaks build_man_page since it expects the output to be just one path. We fix this (for now) by using split(). Ideally we would use <drv_path>!out for realising the default output which only builds the output we need. However this is a bit annoying to solve since it means we have to allocate a bit of memory.
* pkgs/profpatsch/nman: initial rewrite in ruststernenseemann2021-02-254-150/+293
| | | | | | | | | | | | | | | | | | | | | | This is a complete and user interface compatible rewrite of nman.go in Rust which aleviates a few flaws of the previous implementation: * Garbage collector roots for both the derivation and the build outputs are created in a temporary directory which is cleaned afterwards. This prevents a race condition between nman and nix-store --gc and doesn't pollute the user's working directory. * Instead of building just one build output, nman now checks every output for the requested man page which fixes nman for derivations which have their man pages split between multiple outputs, e. g. man and devman. Future work: * Improve error messages reported to the user * Man page * Implement man page search heuristics if no section is specified: Instead of falling back to section 1, all sections should be checked for the desired page (in an ascending order?)
* machines/herja: Replace unnecessary cups packagesdevhell2021-02-251-1/+1
| | | | No more Brother crap.
* machines/herja: add rocm-opencl-icddevhell2021-02-251-1/+6
| | | | I don't know what I'm doing, but it's fun.
* modules/hardware/low-battery: suspend on low batterysternenseemann2021-02-253-0/+51
|
* machines/sternenseemann/wolfgang: support openlab printersternenseemann2021-02-251-1/+4
|
* machines/herja: Add "sometimes" different ethdevhell2021-02-231-0/+1
| | | | | So, turns out that enp6s0f3u1 sometimes also is initialised as enp6s0f4u1. Why? WHyyyyyyyyy?????
* machines/sternenseemann: update TODOsternenseemann2021-02-231-1/+3
| | | | | Reminder to myself to never check in TODO files since you always end up forgetting to update them in the right commits.
* machines/sternenseemann: remove unused pkgs.nixsternenseemann2021-02-231-13/+0
|
* machines/sternenseemann: remove unused patches dirsternenseemann2021-02-231-131/+0
|
* machines/herja: Fix external eth interface namedevhell2021-02-231-1/+1
| | | | Dunno why I thought it was the former.
* release.nix: update programs.sqlite to 21.05pre271444.9816b99e71csternenseemann2021-02-221-2/+2
|
* pkgs/sternenseemann/vuizvui-update-programs-sqlite: automaticallly commitsternenseemann2021-02-221-1/+13
| | | | | | Another convenience feature you'd want virtually always want is to automatically commit the changed release.nix which is added in this commit.
* machines/herja: Add Ethernet dongle interfacedevhell2021-02-221-0/+1
| | | | | The T14s is an awesome machine, but unfortunately it needs an Ethernet dongle.
* modules/user/profpatsch: description for services.dunst.settingssternenseemann2021-02-221-0/+6
| | | | | This is not really to inform anybody about anything, but mostly to get rid of the warning generated by `nix-build -A manual release.nix`.
* Merge pull request #49 (support programs.sqlite)aszlig2021-02-195-6/+147
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This started with pull request #43, which was about disabling the command-not-found handler. The follow-up pull request, which is what I'm merging now, however re-uses the programs.sqlite that is shipped as part of the official nixpkgs channels. While ideally the programs.sqlite would be in par with the jobset input for nixpkgsSrc on Hydra, it's not easily possible since we'd need extra configuration on Hydra, which in turn would make it harder to reproduce the configuration on other systems. There also is no "tarball" jobset input, which would at least make it easier to do via declarative jobsets. So until we have a definitive solution to this, we currently use fetchurl to get the programs.sqlite based on a fixed snapshots and in addition to that, @sternenseeman also wrote a handy updater to make updating a breeze. While I didn't test this on one of my machines yet, I did however add a Hydra jobset for the branch and it so far didn't introduce new eval errors or build failures, so I consider this safe to merge. Thanks to @sternenseeman for implementing both #43 and #49.
| * pkgs/sternenseemann: add update script for programs.sqlitesternenseemann2021-02-192-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | This script downloads the latest nixos-unstable nixexprs.tar.xz, extracts programs.sqlite, figures out its hash and updates version and hash in the given release.nix. Accessible as pkgs.sternenseemann.vuizvui-update-programs-sqlite for a lack of a better place to put it. Maybe we should add something? build-support doesn't feel right. Future work: run this automatically once in a while via GitHub actions.
| * modules/core/common: set correct dbPath for command-not-foundsternenseemann2021-02-192-6/+9
| | | | | | | | | | | | | | | | Since we now distribute the programs.sqlite database with the vuizvui channel, we can make use of it in programs.command-not-found. We change the default path used to use the nixpkgs sub directory of the vuizvui channel (by default it expects a channel named nixos containing the database).
| * release.nix: inject programs.sqlite from a nixos channelsternenseemann2021-02-191-0/+20
|/ | | | | | | | | | | | | | programs.command-not-found requires a database containing an index of all of nixpkgs. Since this is pretty expensive to create we fetch the database from the nixos-unstable channel. Unfortunately it is not available via git, so we need to use the tarball which also means hydra can't automatically update it. One improvement to this change that would be possible is to also index vuizvui and merge that with the database from upstream. This should probably be investigated in the future, but probably affects less people as the nix tool will only be usable with vuizvui packages as commond-not-found suggests if vuizvui.modifyNixPath = true.
* machines/sternenseemann/wolfgang: add github clisternenseemann2021-02-191-0/+1
| | | | gh pr checkout sure is extremely convenient.