diff --git a/flake.nix b/flake.nix
index 90dedfb..8217dc9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,6 +8,14 @@
web-mode = { url = "github:fxbois/web-mode"; flake = false; };
hcl-mode = { url = "github:purcell/emacs-hcl-mode"; flake = false; };
yaml-mode = { url = "github:yoshiki/yaml-mode"; flake = false; };
+ nix-mode = { url = "github:NixOS/nix-mode"; flake = false; };
+ magit = { url = "github:magit/magit"; flake = false; };
+ compat = { url = "github:emacs-straight/compat"; flake = false; };
+ dash = { url = "github:magnars/dash.el"; flake = false; };
+ s-el = { url = "github:magnars/s.el"; flake = false; };
+ dockerfile-mode = { url = "github:spotify/dockerfile-mode"; flake = false; };
+ org-special-block-extras = { url = "github:alhassy/org-special-block-extras"; flake = false; };
+ lf = { url = "github:alhassy/lf"; flake = false; };
};
outputs = { self
@@ -19,11 +27,47 @@
, web-mode
, hcl-mode
, yaml-mode
+ , nix-mode
+ , magit
+ , compat
+ , dash
+ , s-el
+ , dockerfile-mode
+ , org-special-block-extras
+ , lf
, ...
}@inputs:
let
+ inherit (nixpkgs.lib)
+ genAttrs
+ concatMapStringsSep;
+
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
- forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
+ forAllSystems = f: genAttrs supportedSystems (system: f system);
+ packages = [
+ "modus-themes"
+ "org-thtml"
+ "emacs-htmlize"
+ "web-mode"
+ "hcl-mode"
+ "modus-themes"
+ "yaml-mode"
+ "nix-mode"
+ "magit"
+ "compat"
+ "dash"
+ "s-el"
+ "dockerfile-mode"
+ "org-special-block-extras"
+ "lf"
+ ];
+ loadPackages = pkgs:
+ pkgs.writeText "packages.el"
+ (concatMapStringsSep "\n" (x: ''
+ (if (file-exists-p "${inputs.${x}}/lisp")
+ (add-to-list 'load-path "${inputs.${x}}/lisp")
+ (add-to-list 'load-path "${inputs.${x}}"))
+ '') packages);
site = pkgs: which:
pkgs.stdenv.mkDerivation {
name = which;
@@ -33,26 +77,23 @@
buildPhase = ''
export TMPDIR="$(mktemp -d)" HOME=$(pwd)/tmp
- emacs -nw --fg-daemon &
+ emacs -nw --fg-daemon --debug-init &
timeout 10 bash -c 'until [ -e $TMPDIR/emacs$(id -u) ] ; do sleep 0.1 ; done'
- emacsclient -e $'(add-to-list \'load-path "${org-thtml}")'
- emacsclient -e $'(add-to-list \'load-path "${modus-themes}")'
- emacsclient -e $'(add-to-list \'load-path "${emacs-htmlize}")'
- emacsclient -e $'(add-to-list \'load-path "${web-mode}")'
- emacsclient -e $'(add-to-list \'load-path "${hcl-mode}")'
- emacsclient -e $'(add-to-list \'load-path "${yaml-mode}")'
+ emacsclient -e $'(load-file "${loadPackages pkgs}")'
+
+ emacsclient -e $'(add-to-list \'load-path "'"$(pwd)"'/lisp")'
emacsclient -e '(load-file "./make.el")'
emacsclient -e '(magic_rb/publish-website "${which}")'
- emacsclient -e '(kill-emacs)'
+ emacsclient -e '(kill-emacs)'
find public_html -name 'sitemap.*' -exec rm {} \;
'';
installPhase = ''
- mkdir -p $out
+ mkdir -p $out
cp -r public_html/* $out
'';
};
@@ -74,7 +115,7 @@
website = forAllSystems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; };
in
pkgs.runCommandNoCC "website" {}
''
@@ -86,20 +127,28 @@
generateCss = forAllSystems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; };
script = pkgs.writeText "init.el"
''
- (add-to-list 'load-path "${modus-themes}")
- (add-to-list 'load-path "${emacs-htmlize}")
+ (load-file "${loadPackages pkgs}")
+
+ (require 'nix-mode)
+ (require 'web-mode)
+ (require 'hcl-mode)
+ (require 'yaml-mode)
(require 'org)
(require 'ox)
(require 'ox-html)
(require 'modus-themes)
- (load-theme 'modus-operandi t nil)
-
+ (defface modus-themes-cyan-subtle
+ '((t :inherit modus-themes-subtle-cyan))
+ "")
+
+ (load-theme 'modus-vivendi t nil)
+
(org-html-htmlize-generate-css)
(with-current-buffer "*html*"
(write-file (getenv "OUTFILE")))
@@ -110,9 +159,9 @@
pkgs.writeShellScript "generate-css"
''
export PATH=$PATH:${pkgs.emacs}/bin
-
+
export OUTFILE="$(mktemp)" TMPDIR="$(mktemp -d)" HOME=$TMPDIR
- emacs -l ${script}
+ emacs -l ${builtins.trace "modus: ${modus-themes}" script} --debug-init
mv $OUTFILE ./assets/css/org.css
@@ -123,5 +172,17 @@
defaultPackage = forAllSystems (system:
self.website.${system}
);
+
+ devShells = forAllSystems (system:
+ let pkgs = import nixpkgs { inherit system; };
+ in
+ {
+ default = pkgs.mkShell {
+ nativeBuildInputs = with pkgs; [
+ httplz
+ ];
+ };
+ }
+ );
};
}
diff --git a/home/contact.org b/home/contact.org
index 5b1e083..2e0dd18 100644
--- a/home/contact.org
+++ b/home/contact.org
@@ -1,2 +1,3 @@
-- Discord: =Magic_RB#6785=
+- Discord: =magic_rb.#0=
+- Matrix: =@magic_rb:matrix.redalder.org=
- PGP: =0F49 1A57 B4DF 4313 6CD4 AB6B F07E 558C D1E6 999F=
diff --git a/home/index.org b/home/index.org
index f16e0f3..caffbc9 100644
--- a/home/index.org
+++ b/home/index.org
@@ -1,7 +1,4 @@
-#+ATTR_CTAG: project
-#+ATTR_CLINK: https://github.com/MagicRB/NixNG
-#+ATTR_CIMAGE: /icons/nix-ng-greener-no-gradient.svg
-#+BEGIN_SRC fundamental
+#+begin_card NixNG :link "https://github.com/nix-community/NixNG" :image "/icons/nix-ng-greener-no-gradient.svg"
A NixOS derivative with simpler design, currently replacing systemd with runit,
- aiming to deliver lighter systems and containers.
-#+END_SRC
+ aiming to deliver lighter systems and containers. TEST
+#+end_card
diff --git a/lisp/extra-blocks.el b/lisp/extra-blocks.el
new file mode 100644
index 0000000..1dbf382
--- /dev/null
+++ b/lisp/extra-blocks.el
@@ -0,0 +1,37 @@
+(require 'org-special-block-extras)
+
+(org-defblock note
+ (title)
+ "Test"
+ (format
+ (pcase backend
+ (`html " "
+ " " contents
+ "
+
+ %s
+
+ %s
+ " name "
"
+ "
- {{magic_rb/card-description item}} -
-