rune module

This commit is contained in:
Daylin Morgan 2024-01-28 23:19:30 -06:00
parent d10d80bcc6
commit cb7f743205
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
10 changed files with 102 additions and 30 deletions

View file

@ -1,5 +1,5 @@
{...}: { {mkRune, ...}: {
users.motdFile = ./rune; users.motd = mkRune {number="6"; rune = "algiz";};
swapDevices = [ swapDevices = [
{ {

View file

@ -1,11 +1,11 @@
{ {
inputs, inputs,
lib,
config, config,
pkgs, pkgs,
mkRune,
... ...
}: { }: {
users.motdFile = ./rune; users.motd = mkRune {number="2"; rune="mannaz";};
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader = { boot.loader = {

View file

@ -1,16 +0,0 @@

.+.
.*@@@*.
.+@@- -%@*.
.+@@= -%@*.
.+@%= -%@+.
+@@- :@@*
.*@%- :#@*:
.#@%: :#@#:
:#@#-*@#:
=@@@+
.*@#-#@#:
.*@%- :#@#:
.*@%- :%@*.
+@%- -%@+
:- -:

View file

@ -1,9 +1,12 @@
{ {
config, config,
pkgs, pkgs,
mkRune,
... ...
} }:
: { let
rune = import ../../modules/runes/othalan.nix;
in {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.printing.enable = true; services.printing.enable = true;
services.fwupd.enable = true; services.fwupd.enable = true;
@ -30,7 +33,8 @@
services.getty.greetingLine = services.getty.greetingLine =
''<<< Welcome to NixOS ${config.system.nixos.label} (\m) - \l >>>'' ''<<< Welcome to NixOS ${config.system.nixos.label} (\m) - \l >>>''
+ (builtins.readFile ./rune); + mkRune {rune = "othalan"; runeKind = "ascii";};
# + inputs.self.nixosModules.runes.othalan.ascii;
# catppuccin/tty # catppuccin/tty
boot.kernelParams = [ boot.kernelParams = [

View file

@ -8,7 +8,10 @@
inherit (nixpkgs.lib.filesystem) listFilesRecursive; inherit (nixpkgs.lib.filesystem) listFilesRecursive;
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
runes = import ../modules/runes;
in rec { in rec {
mkRune = {rune, number ? "2", runeKind ? "braille"}: "\e[3${number}m" + runes.${rune}.${runeKind} + "\e[0m";
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system}); forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
buildOizys = _: buildOizys = _:
@ -29,7 +32,7 @@ in rec {
modules = modules =
[../modules/common.nix] [../modules/common.nix]
++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}")); ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}"));
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs mkRune;};
}; };
mapHosts = dir: mapHosts = dir:

7
modules/runes/README.md Normal file
View file

@ -0,0 +1,7 @@
# Runes
![](https://upload.wikimedia.org/wikipedia/commons/0/0c/Runic_letter_mannaz.png)
![](https://upload.wikimedia.org/wikipedia/commons/1/14/Runic_letter_algiz.png)
![](https://upload.wikimedia.org/wikipedia/commons/1/16/Runic_letter_othalan.png)

View file

@ -1,5 +1,5 @@
 {
braille = ''
@ -13,4 +13,20 @@
 '';
ascii = ''
:%+ ## +%:
-%@+ @@ +@%-
-%@=%%=@%-
=%@@%=
@@
@%
@%
@%
@%
@%
@%
@@
##
'';
}

View file

@ -0,0 +1,5 @@
{
othalan = import ./othalan.nix;
algiz = import ./algiz.nix;
mannaz = import ./mannaz.nix;
}

View file

@ -1,5 +1,6 @@
 {
braille = ''
@ -12,4 +13,20 @@
 '';
ascii =''
:%*: :+%=
-@%%%*- -*%%#@+
-@- .=#@##@#=: .@+
-@- :=#@#*%#+: .@+
-@%%%*- :*%%#@+
-@*: .+@+
-@- .@+
-@= :@+
-@= :@+
-@= :@+
-@= :@+
-@= :@+
-%- :%=
'';
}

36
modules/runes/othalan.nix Normal file
View file

@ -0,0 +1,36 @@
{
ascii = ''
.+.
.*@@@*.
.+@@- -%@*.
.+@@= -%@*.
.+@%= -%@+.
+@@- :@@*
.*@%- :#@*:
.#@%: :#@#:
:#@#-*@#:
=@@@+
.*@#-#@#:
.*@%- :#@#:
.*@%- :%@*.
+@%- -%@+
:- -:
'';
braille = ''
'';
}