TODO linux-gpib :PROPERTIES: :ID: 6b096efa-43f2-4ee9-bffd-2b61f45bf274 :END: I've added linux-gpib support to nixpkgs (not yet upstream) and it appears to work. In order to get this working on my machine before pulling the latest nixpkgs I've added the kernel module under pkgs (included as a kernel module in ryzen3950.nix). I've also added a flake input and set the linux-gpib package. This is then installed under electronics subdirectory. I also use hpdrive patches. These are designed for 4.3.3, but work with 4.3.4. Finally, I've updated the nixpkgs input of mach-nix to allow it to find the python-linux-gpib package.
languages :PROPERTIES: :ID: 3c9e7b8b-52cf-49e8-924c-b6fdc4cb1fc3 :END: ** Python :PROPERTIES: :ID: 1b0a692b-22f7-4d5b-822c-8923abbef97a :END: I use [[https://github.com/DavHau/mach-nix][mach-nix]] for creating declarative and reproducible Python environments. This is used both at the system level (for a system-wide installation of Python and packages) and at the project level.
TODO describe how to use mach-nix at system level and project level.
*** Jupyter :PROPERTIES: :ID: bd03fa65-c5b9-451c-939d-e201858218a0 :END: TODO describe how to use Jupyter.
** Rust :PROPERTIES: :ID: 53d828ea-4f4d-4c95-961f-75bc2c418d8f :END:
There are several simple steps for adding a package from a different version of nixpkgs. This works on new packages (i.e. not available in the main nixpkgs flake) and different versions of existing packages, which override those in the main nixpkgs flake without requiring you to write an overlay.
First, add the repo + branch as an input and then add it to the function argument of outputs. Finally, add the package to the ~overridePkgs~ attribute set. Here's an example:
{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/master"; home.url = "github:rycee/home-manager/bqv-flakes"; emacsOverlay.url = "github:nix-community/emacs-overlay";
sageNixpkgs.url = "github:nixos/nixpkgs/7866440f1223dc447f38cb23c00e10b44b4c98fe";
paraviewNixpkgs.url = "github:nixos/nixpkgs/72158c231ae46a34ec16b8134d2a8598506acd9c";
anystyleNixpkgs.url = "github:SCOTT-HAMILTON/nixpkgs/4cf6c95cb021b62e78e769af7ba64280b340b666";
vivadoNixpkgs.url = "github:matthuszagh/nixpkgs/vivado";
};
outputs = { self , nixpkgs , home , emacsOverlay , sageNixpkgs , paraviewNixpkgs , anystyleNixpkgs , vivadoNixpkgs }: let inherit (builtins) attrNames attrValues readDir; inherit (nixpkgs) lib; inherit (lib) recursiveUpdate genAttrs mapAttrs' nameValuePair; inherit (utils) pathsToImportedAttrs;
utils = import ./lib/utils.nix { inherit lib; };
system = "x86_64-linux";
externalOverlays = [
emacsOverlay.overlay
];
pkgImport = pkgs: import pkgs {
inherit system;
# Order is significant. First incorporate external overlays. We
# can then use and override these in custom packages (defined
# in `self.overlay`). Finally overlays in ./overlays can
# override everything else.
overlays = externalOverlays
++ [ self.overlay ]
++ (attrValues self.overlays);
config = { allowUnfree = true; };
};
overridePkgs = {
sageWithDoc = (pkgImport sageNixpkgs).sageWithDoc;
paraview = (pkgImport paraviewNixpkgs).paraview;
anystyle-cli = (pkgImport anystyleNixpkgs).anystyle-cli;
vivado = (pkgImport vivadoNixpkgs).vivado;
};
pkgs = (pkgImport nixpkgs) // overridePkgs;
[...]
git subtree push --prefix=users/profiles/emacs/emacs emacs master
host DPI :PROPERTIES: :ID: 993fec26-7113-407c-98d6-b9abeb1f0432 :END: Normally, it would seem to make sense to set ~services.xserver.dpi~ correctly based on the actual DPI of a screen. Instead, I've decided to set it correctly for the typical viewing distance of a desktop monitor (around 2ft), and then scale it accordingly for laptops that are closer. All applications (emacs, firefox, etc.) seem to use this setting when displaying graphics, so doing this will scale everything down proportionally. This looks nice even if it doesn't keep objects specified to be 1mm as 1mm. I think it is enough to target dimensional accuracy on a desktop and favor nice appearance on laptops and other displays.
subvolume hierarchy :PROPERTIES: :ID: a22f2fe2-994b-4407-9ae5-d8bfd495aaaf :END: ID gen top level path
258 1222851 5 nixos 259 1222869 258 var 260 1222869 258 home 261 1222867 258 tmp 262 1222765 258 .snapshots 789 187108 259 var/lib/machines 829 186803 258 .backup 1331 191641 258 srv 1332 191641 259 var/lib/portables 11616 1222869 260 home/matt/.cache