chore: remove fonts from sops-nix
Ok, hear me out: managing fonts with sops is a huge pain in the butt. Especially when you need to have your YubiKey plugged in, to have your terminal render.
This commit is contained in:
parent
3d6160f69f
commit
1a6686ead9
14 changed files with 17 additions and 237 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
.gitsecret/keys/random_seed
|
||||
!*.secret
|
||||
home/secrets/default.nix
|
||||
home/secrets/fonts.tgz
|
||||
|
||||
# Generated by nix-pre-commit-hooks
|
||||
/.pre-commit-config.yaml
|
||||
|
|
BIN
home/secrets/fonts.tgz.gpg
Normal file
BIN
home/secrets/fonts.tgz.gpg
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2,36 +2,12 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin;
|
||||
|
||||
# TODO: make this accept more than just otf
|
||||
fontMapping = fontname: {
|
||||
path =
|
||||
if isLinux
|
||||
then "${config.xdg.dataHome}/fonts/${fontname}.otf"
|
||||
else if isDarwin
|
||||
then "${config.home.homeDirectory}/Library/Fonts/${fontname}.otf"
|
||||
else throw "Unsupported platform";
|
||||
format = "binary";
|
||||
sopsFile = ./fonts/${fontname}.json;
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
sops = {
|
||||
gnupg.home = "${config.xdg.configHome}/gnupg";
|
||||
gnupg.home = config.programs.gpg.homedir;
|
||||
defaultSopsFile = ./main.yaml;
|
||||
secrets = {
|
||||
"kubeconfig".path = "${config.xdg.configHome}/kube/kubeconfig";
|
||||
"berkeley_regular" = fontMapping "berkeley_regular";
|
||||
"berkeley_italic" = fontMapping "berkeley_italic";
|
||||
"berkeley_bold" = fontMapping "berkeley_bold";
|
||||
"berkeley_bold_italic" = fontMapping "berkeley_bold_italic";
|
||||
"comic_code_regular" = fontMapping "comic_code_regular";
|
||||
"comic_code_italic" = fontMapping "comic_code_italic";
|
||||
"comic_code_medium" = fontMapping "comic_code_medium";
|
||||
"comic_code_medium_italic" = fontMapping "comic_code_medium_italic";
|
||||
"comic_code_bold" = fontMapping "comic_code_bold";
|
||||
"comic_code_bold_italic" = fontMapping "comic_code_bold_italic";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
15
justfile
15
justfile
|
@ -4,7 +4,6 @@ secret-stage:
|
|||
secret-unstage:
|
||||
git restore --staged home/secrets/default.nix
|
||||
|
||||
|
||||
[linux]
|
||||
boot: secret-stage && secret-unstage
|
||||
sudo nixos-rebuild boot --flake .
|
||||
|
@ -24,3 +23,17 @@ switch: secret-stage && secret-unstage
|
|||
[linux]
|
||||
switch: secret-stage && secret-unstage
|
||||
sudo nixos-rebuild switch --flake .
|
||||
|
||||
[linux]
|
||||
install-fonts:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
mkdir -p $XDG_DATA_HOME/fonts
|
||||
gpg --decrypt home/secrets/fonts.tgz.gpg | tar -xz -C $XDG_DATA_HOME/fonts --strip-components=1
|
||||
|
||||
[macos]
|
||||
install-fonts:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
mkdir -p ~/Library/Fonts
|
||||
gpg --decrypt home/secrets/fonts.tgz.gpg | tar -xz -C ~/Library/Fonts --strip-components=1
|
||||
|
|
Loading…
Reference in a new issue