try installing monaspace but doesnt quite work

This commit is contained in:
nora 2023-11-11 21:19:00 +01:00
parent a7d3128aef
commit 38db3382e4
5 changed files with 79 additions and 12 deletions

View file

@ -1,3 +1,4 @@
pkgs: { pkgs: {
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs; cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
monaspace = import ./monaspace.nix pkgs;
} }

50
custom-pkgs/monaspace.nix Normal file
View file

@ -0,0 +1,50 @@
# Copied from https://github.com/NixOS/nixpkgs/blob/703b9db6c5154530264bd7b6b09552596d0e5ede/pkgs/by-name/mo/monaspace/package.nix,
# in nixos-unstable soon
{ lib, stdenv, fetchzip, ... }:
stdenv.mkDerivation (finalAttrs: {
pname = "monaspace";
version = "1.000";
src = fetchzip {
url = "https://github.com/githubnext/monaspace/releases/download/v${finalAttrs.version}/monaspace-v${finalAttrs.version}.zip";
stripRoot = false;
hash = "sha256-H8NOS+pVkrY9DofuJhPR2OlzkF4fMdmP2zfDBfrk83A=";
};
outputs = [ "out" "woff" ];
installPhase = ''
runHook preInstall
pushd monaspace-v${finalAttrs.version}/fonts/
install -Dm644 otf/*.otf -t $out/share/fonts/opentype
install -Dm644 variable/*.ttf -t $out/share/fonts/truetype
install -Dm644 webfonts/*.woff -t $woff/share/fonts/woff
popd
runHook postInstall
'';
meta = {
description = "An innovative superfamily of fonts for code";
longDescription = ''
Since the earliest days of the teletype machine, code has been set in
monospaced typeletters, on a grid. Monaspace is a new type system that
advances the state of the art for the display of code on screen.
Every advancement in the technology of computing has been accompanied by
advancements to the display and editing of code. CRTs made screen editors
possible. The advent of graphical user interfaces gave rise to integrated
development environments.
Even today, we still have limited options when we want to layer additional
meaning on top of code. Syntax highlighting was invented in 1982 to help
children to code in BASIC. But beyond colors, most editors must
communicate with developers through their interfaceshovers, underlines,
and other graphical decorations.
Monaspace offers a more expressive palette for code and the tools we use
to work with it.
'';
homepage = "https://monaspace.githubnext.com/";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.all;
};
})

18
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1698479159, "lastModified": 1699025595,
"narHash": "sha256-rJHBDwW4LbADEfhkgGHjKGfL2dF44NrlyXdXeZrQahs=", "narHash": "sha256-e+o4PoSu2Z6Ww8y/AVUmMU200rNZoRK+p2opQ7Db8Rg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f92a54fef4eacdbe86b0a2054054dd58b0e2a2a4", "rev": "8765d4e38aa0be53cdeee26f7386173e6c65618d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -43,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1698318101, "lastModified": 1699099776,
"narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +59,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1698493525, "lastModified": 1699174032,
"narHash": "sha256-7LGGsrtUrvKZYPMNoEE2A4uHX7gU85RiLPwr/6QY4V4=", "narHash": "sha256-OSiNVBhNeleAfMZ4mMMF1h4l95tGfAhWE4OzYtMU3tI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "7636d4dbfd7aa1a05239272a856c34e2c28724df", "rev": "9d4f93294abb6017f139d8986d91bd4f9db8c083",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,6 +6,7 @@
mutableExtensionsDir = true; mutableExtensionsDir = true;
userSettings = { userSettings = {
# Note: In settings.json, `.` in a key is not equivalent to a nested object property. # Note: In settings.json, `.` in a key is not equivalent to a nested object property.
# Language-specific
"[nix]"."editor.formatOnSave" = true; "[nix]"."editor.formatOnSave" = true;
"[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide"; "[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
@ -17,18 +18,21 @@
}; };
}; };
}; };
"prolog.executablePath" = lib.getExe pkgs.swiProlog;
"[typescript]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[typescript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[javascript]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[javascript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[json]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[json]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[jsonc]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[jsonc]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[html]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[html]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[css]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; "[css]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
# Generic
"window.zoomLevel" = 1; "window.zoomLevel" = 1;
"terminal.integrated.enableMultiLinePasteWarning" = false; "terminal.integrated.enableMultiLinePasteWarning" = false;
"git.confirmSync" = false; "git.confirmSync" = false;
"debug.allowBreakpointsEverywhere" = false; "debug.allowBreakpointsEverywhere" = false;
# "editor.fontFamily" = "'Monaspace Neon Var', Arial";
"prolog.executablePath" = lib.getExe pkgs.swiProlog; "editor.fontLigatures" = true;
}; };
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
bmalehorn.vscode-fish bmalehorn.vscode-fish
@ -77,6 +81,12 @@
version = "0.8.23"; version = "0.8.23";
sha256 = "sha256-Da2dCpruVqzP3g1hH0+TyvvEa1wEwGXgvcmIq9B/2cQ="; sha256 = "sha256-Da2dCpruVqzP3g1hH0+TyvvEa1wEwGXgvcmIq9B/2cQ=";
} }
{
publisher = "evan-buss";
name = "font-switcher";
version = "4.1.0";
sha256 = "sha256-KkXUfA/W73kRfs1TpguXtZvBXFiSMXXzU9AYZGwpVsY=";
}
] ++ [ ] ++ [
(pkgs.vscode-utils.buildVscodeExtension { (pkgs.vscode-utils.buildVscodeExtension {
name = "riverdelta"; name = "riverdelta";

View file

@ -1,7 +1,11 @@
# This is your system's configuration file. # This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ inputs, lib, config, pkgs, ... }: { { inputs, lib, config, pkgs, ... }:
let
customPkgs = import ../custom-pkgs/default.nix pkgs;
in
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
# If you want to use modules from other flakes (such as nixos-hardware): # If you want to use modules from other flakes (such as nixos-hardware):
@ -151,6 +155,8 @@
#media-session.enable = true; #media-session.enable = true;
}; };
fonts.packages = with pkgs; [ fira-code customPkgs.monaspace ];
services.tailscale = { services.tailscale = {
enable = true; enable = true;
useRoutingFeatures = "both"; useRoutingFeatures = "both";