185 lines
5.7 KiB
Org Mode
185 lines
5.7 KiB
Org Mode
:PROPERTIES:
|
|
:ID: 20221021T115008.329657
|
|
:END:
|
|
#+TITLE: Arroyo Nix Support
|
|
#+FILETAGS: :Project:Arroyo:Nix:
|
|
|
|
,#+ARCOLOGY_KEY: cce/arroyo/nix
|
|
,#+ARCOLOGY_ALLOW_CRAWL: t
|
|
#+AUTO_TANGLE: t
|
|
|
|
This document collects some support that is shared between [[id:arroyo/nixos][Arroyo NixOS Generator]] and [[id:arroyo/home-manager][Arroyo Home Manager]].
|
|
|
|
* Making =arroyo-nix= an importable repository
|
|
|
|
So Arroyo dumps the tangled Nix files in to =~/arroyo-nix/=:
|
|
|
|
#+begin_src shell :exports both
|
|
ls ~/arroyo-nix
|
|
#+end_src
|
|
|
|
#+results:
|
|
| defexpr.nix |
|
|
| files |
|
|
| firefox |
|
|
| hm |
|
|
| home-manager.nix |
|
|
| home-manager.nix~ |
|
|
| hosts |
|
|
| lib |
|
|
| networks |
|
|
| nixgl.nix |
|
|
| nixgl-pkg.nix |
|
|
| nixops |
|
|
| nixos |
|
|
| overrides |
|
|
| pkgs |
|
|
| roles |
|
|
| versions.nix |
|
|
|
|
I have a handful of packages I want to export and include here. I *have* been trying to maintain a branch of nixpkgs containing my changes but it's been awfully difficult to keep it up to date and i haven't had the mental wherewithal to clean the changes up enough to merge in to nixpkgs.
|
|
|
|
#+begin_src nix :tangle ~/arroyo-nix/default.nix
|
|
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
with pkgs;
|
|
let
|
|
dbot = callPackage ./pkgs/drawingbot.nix {};
|
|
in {
|
|
# The `lib`, `modules`, and `overlay` names are special
|
|
lib = import ./lib { inherit pkgs; }; # functions
|
|
# modules = import ./modules; # NixOS modules
|
|
# overlays = import ./overlays; # nixpkgs overlays
|
|
overlays = [
|
|
(import ./overlay.nix)
|
|
];
|
|
|
|
nixGL = callPackage ./pkgs/nixgl.nix {};
|
|
myEmacs = callPackage ./pkgs/emacs.nix {};
|
|
arroyo-emacs = callPackage ./pkgs/emacs.nix {};
|
|
|
|
cpmtools = callPackage ./pkgs/cpmtools.nix {};
|
|
|
|
drawingbot-free = dbot;
|
|
drawingbot-premium = (dbot.override {
|
|
name = "drawingbotv3-premium";
|
|
}).overrideAttrs (old: old // {
|
|
src = /home/rrix/sync/DrawingBotV3-Premium-1.6.9-beta-linux.deb;
|
|
meta.license = lib.licenses.unfree;
|
|
});
|
|
|
|
koreader = callPackage ./pkgs/koreader.nix { unpatched = pkgs.koreader; };
|
|
homestuck = callPackage ./pkgs/homestuck-collection/default.nix {};
|
|
|
|
} // (with python3Packages; rec {
|
|
bandcamp-dl = toPythonApplication (callPackage ./pkgs/bandcamp-dl.nix {});
|
|
beetcamp = toPythonApplication (callPackage ./pkgs/beetcamp.nix {});
|
|
jisho-api = toPythonModule (callPackage ./pkgs/jisho-api.nix {});
|
|
|
|
vpypePackages = callPackage ./pkgs/vpype/default.nix {
|
|
inherit pnoise;
|
|
inherit svgelements;
|
|
inherit qasync;
|
|
inherit watchfiles;
|
|
inherit hnswlib;
|
|
};
|
|
vpype = vpypePackages.vpype;
|
|
vsketch = vpypePackages.vsketch;
|
|
pnoise = toPythonModule (callPackage ./pkgs/pnoise.nix {});
|
|
qasync = toPythonModule (callPackage ./pkgs/qasync.nix {});
|
|
svgelements = toPythonModule (callPackage ./pkgs/svgelements.nix {});
|
|
hnswlib = toPythonModule (callPackage ./pkgs/hnswlib.nix {});
|
|
# watchfiles = toPythonModule (callPackage ./pkgs/watchfiles/default.nix {});
|
|
|
|
feediverse = toPythonModule (callPackage ./pkgs/feediverse.nix {});
|
|
|
|
inaturalist-to-sqlite = toPythonModule (callPackage ./pkgs/inaturalist-to-sqlite.nix {});
|
|
twitter-to-sqlite = toPythonModule (callPackage ./pkgs/twitter-to-sqlite.nix {});
|
|
|
|
matrix-feedbot = toPythonModule (callPackage ./pkgs/feedbot.nix {});
|
|
|
|
arcology = toPythonModule (callPackage /home/rrix/org/arcology-fastapi/default.nix {});
|
|
|
|
morph-wrapper = toPythonModule (callPackage /home/rrix/Code/morph-wrapper/default.nix {});
|
|
|
|
passthroughbrowser = toPythonModule (callPackage ./pkgs/passthroughbrowser.nix {});
|
|
})
|
|
#+end_src
|
|
|
|
** Arroyo Nix [[id:c75d20e6-8888-4c5a-ac97-5997e2f1c711][nixpkgs]] overlay
|
|
:PROPERTIES:
|
|
:ID: 20221021T150642.149242
|
|
:END:
|
|
|
|
Arroyo-Nix could be used as an [[id:c75d20e6-8888-4c5a-ac97-5997e2f1c711][nixpkgs]] overlay:
|
|
|
|
#+begin_src nix :tangle ~/arroyo-nix/overlay.nix
|
|
self: super:
|
|
let
|
|
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
|
nameValuePair = n: v: { name = n; value = v; };
|
|
nurAttrs = import ./default.nix { pkgs = super; };
|
|
|
|
outAttrs = builtins.listToAttrs
|
|
(map (n: nameValuePair n nurAttrs.${n})
|
|
(builtins.filter (n: !isReserved n)
|
|
(builtins.attrNames nurAttrs))) // {
|
|
lib = (super.lib or {}) // (import ./lib/default.nix { pkgs = super; });
|
|
};
|
|
in outAttrs
|
|
#+end_src
|
|
|
|
** Arroyo Nix Library Helpers
|
|
:PROPERTIES:
|
|
:ID: 20221021T150631.404359
|
|
:END:
|
|
|
|
Arroyo exposes some library helpers which i would like to not just bare-import:
|
|
|
|
#+begin_src nix :tangle ~/arroyo-nix/lib/default.nix
|
|
{ pkgs }:
|
|
|
|
with pkgs.lib; {
|
|
pkgVersions = pkgs.callPackage ../versions.nix {};
|
|
mkKwriteConfig5 = pkgs.callPackage ./kde-configs.nix {};
|
|
mkNixGLWrapper = pkgs.callPackage ./nixgl.nix {};
|
|
mkActivationLocalLink = pkgs.callPackage ./mk_activation_local_link.nix {};
|
|
publicKeys = import ./public-keys.nix;
|
|
}
|
|
#+end_src
|
|
|
|
* [[id:arroyo/nixos][Arroyo NixOS]] loads this as an overlay
|
|
:PROPERTIES:
|
|
:ID: 20221021T121120.541960
|
|
:ROAM_ALIASES: rixpkgs
|
|
:END:
|
|
|
|
#+ARROYO_NIXOS_MODULE: nixos/rixpkgs.nix
|
|
|
|
Since arroyo is in my [[id:20220526T151642.467904][=NIX_PATH=]], i can just import it. [[id:cce/home-manager][home-manager]] is configured to use the system nixpkgs.
|
|
|
|
#+begin_src nix :tangle ~/arroyo-nix/nixos/rixpkgs.nix
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
nixpkgs.overlays = [
|
|
(import <arroyo/overlay.nix>)
|
|
];
|
|
}
|
|
#+end_src
|
|
|
|
* NEXT figure all this out -- probably have flake generation as well here.
|
|
* NEXT probably need an arroyo-db keyword to note which packages go in default.nix...
|
|
|
|
|
|
and probably one for lib... uagh.
|
|
|
|
* NEXT extract packages from [[id:c75d20e6-8888-4c5a-ac97-5997e2f1c711][nixpkgs]]
|
|
** DONE beets-bandcamp
|
|
:LOGBOOK:
|
|
- State "DONE" from "NEXT" [2022-10-28 Fri 10:42]
|
|
:END:
|
|
** NEXT libqtolm
|
|
** NEXT libquotient
|
|
** NEXT neochat with e2e
|