From b396a40a0c6f4e99f7ef836c5712ab0c7721392d Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Mon, 11 Aug 2025 16:07:15 +0200 Subject: [PATCH] Snowfall wip --- .gitignore | 13 +-- flake.lock | 92 ++++++++++++++++++++- flake.nix | 8 ++ packages/et-bembo/default.nix | 31 +++++++ package.nix => packages/nixmacs/default.nix | 18 +--- 5 files changed, 133 insertions(+), 29 deletions(-) create mode 100644 packages/et-bembo/default.nix rename package.nix => packages/nixmacs/default.nix (89%) diff --git a/.gitignore b/.gitignore index af81c0e..cc970e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1 @@ -#Ignore all -* -#Allow theese (don't forget to put '!') -!config.org -!early-init.el -!package.nix -!flake.nix -!init.el -!.gitignore -!flake.lock -!emax.svg -!nixmacs.xpm +elpa diff --git a/flake.lock b/flake.lock index ba995e0..6521471 100644 --- a/flake.lock +++ b/flake.lock @@ -23,6 +23,58 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils-plus": { + "inputs": { + "flake-utils": "flake-utils" + }, + "locked": { + "lastModified": 1738591040, + "narHash": "sha256-4WNeriUToshQ/L5J+dTSWC5OJIwT39SEP7V7oylndi8=", + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "afcb15b845e74ac5e998358709b2b5fe42a948d1", + "type": "github" + }, + "original": { + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "type": "github" + } + }, "nix-org-babel": { "locked": { "lastModified": 1731256202, @@ -58,7 +110,45 @@ "inputs": { "emacs-overlay": "emacs-overlay", "nix-org-babel": "nix-org-babel", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "snowfall-lib": "snowfall-lib" + } + }, + "snowfall-lib": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils-plus": "flake-utils-plus", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754782494, + "narHash": "sha256-pSvIyyYP9wprEYbHvkwishLIpmLRrMdgxi5r8q9Ie44=", + "owner": "KyleKrein", + "repo": "snowfall-lib", + "rev": "f0e35a78e9c874c6962fddc827965701c3f5ffd2", + "type": "github" + }, + "original": { + "owner": "KyleKrein", + "repo": "snowfall-lib", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index a277b8c..4379043 100644 --- a/flake.nix +++ b/flake.nix @@ -29,5 +29,13 @@ outputs-builder = channels: { formatter = channels.nixpkgs.alejandra; }; + + snowfall = { + namespace = "custom"; + meta = { + name = "KyleKrein's emacs configuration powered by Nix"; + title = "KyleKrein's emacs configuration powered by Nix"; + }; + }; }; } diff --git a/packages/et-bembo/default.nix b/packages/et-bembo/default.nix new file mode 100644 index 0000000..1ebe3f5 --- /dev/null +++ b/packages/et-bembo/default.nix @@ -0,0 +1,31 @@ +{ + lib, + stdenv, + fetchFromGitHub, +}: + +stdenv.mkDerivation rec { + pname = "et-bembo"; + version = "unstable-2018-04-11"; + + src = fetchFromGitHub { + owner = "DavidBarts"; + repo = "ET_Bembo"; + rev = "b1824ac5bee3f54ef1ce88c9d6c7850f6c869818"; + hash = "sha256-9G0Umcu5dkwx+mh0k5vPS3nIBdStlR0wBkDVzahVBwg="; + }; + + buildPhase = '' + mkdir -p $out/share/fonts/truetype + cp $src/* $out/share/fonts/truetype + ''; + + meta = { + description = ""; + homepage = "https://github.com/DavidBarts/ET_Bembo"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + mainProgram = "et-bembo"; + platforms = lib.platforms.all; + }; +} diff --git a/package.nix b/packages/nixmacs/default.nix similarity index 89% rename from package.nix rename to packages/nixmacs/default.nix index 505c9f3..22f0457 100644 --- a/package.nix +++ b/packages/nixmacs/default.nix @@ -4,22 +4,8 @@ native ? false, ... }: let - et-bembo = pkgs.stdenv.mkDerivation rec { - name = "Bembo Font"; - pname = name; - src = pkgs.fetchFromGitHub { - owner = "DavidBarts"; - repo = "ET_Bembo"; - rev = "b1824ac5bee3f54ef1ce88c9d6c7850f6c869818"; - hash = "sha256-9G0Umcu5dkwx+mh0k5vPS3nIBdStlR0wBkDVzahVBwg="; - }; - buildPhase = '' - mkdir -p $out/share/fonts/truetype - cp $src/* $out/share/fonts/truetype - ''; - }; preTangledFile = pkgs.writeText "config.org" '' - ${builtins.readFile ./config.org} + ${builtins.readFile ../../config.org} #+begin_src emacs-lisp (setq dashboard-startup-banner "${./nixmacs.xpm}") @@ -125,7 +111,7 @@ fontConfig = pkgs.makeFontsConf { fontDirectories = with pkgs; [ nerd-fonts.iosevka - et-bembo + custom.et-bembo dejavu_fonts iosevka nerd-fonts.symbols-only