Misc notes

This commit is contained in:
Geoffrey Frogeye 2023-12-16 23:43:01 +01:00
parent a46e7d7bca
commit 4a1d065554
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 4 additions and 9 deletions

View file

@ -506,7 +506,7 @@ in
(builtins.toString ./scripts) (builtins.toString ./scripts)
]; ];
file = { file = {
".face" = { ".face" = { # TODO Doesn't show on NixOS. See https://wiki.archlinux.org/title/LightDM#Changing_your_avatar ?
source = pkgs.runCommand "face.png" { } "${pkgs.inkscape}/bin/inkscape ${./face.svg} -w 1024 -o $out"; source = pkgs.runCommand "face.png" { } "${pkgs.inkscape}/bin/inkscape ${./face.svg} -w 1024 -o $out";
}; };
}; };

View file

@ -37,7 +37,7 @@ in
# lockColors = with config.lib.stylix.colors.withHashtag; { a = base00; b = base01; d = base00; }; # Black or White, depending on current theme # lockColors = with config.lib.stylix.colors.withHashtag; { a = base00; b = base01; d = base00; }; # Black or White, depending on current theme
# lockColors = with config.lib.stylix.colors.withHashtag; { a = base0A; b = base0B; d = base00; }; # Green + Yellow # lockColors = with config.lib.stylix.colors.withHashtag; { a = base0A; b = base0B; d = base00; }; # Green + Yellow
lockColors = { a = "#82a401"; b = "#466c01"; d = "#648901"; }; # Old lockColors = { a = "#82a401"; b = "#466c01"; d = "#648901"; }; # Old
lockSvg = pkgs.writeText "lock.svg" "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" height=\"50\" width=\"50\"><path fill=\"${lockColors.a}\" d=\"M0 50h50V0H0z\"/><path d=\"M0 0l50 50H25L0 25zm50 0v25L25 0z\" fill=\"${lockColors.d}\"/></svg>"; lockSvg = pkgs.writeText "lock.svg" "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" height=\"50\" width=\"50\"><path fill=\"${lockColors.a}\" d=\"M0 50h50V0H0z\"/><path d=\"M0 0l50 50H25L0 25zm50 0v25L25 0z\" fill=\"${lockColors.b}\"/></svg>";
lockPng = pkgs.runCommand "lock.png" { } "${pkgs.imagemagick}/bin/convert ${lockSvg} $out"; lockPng = pkgs.runCommand "lock.png" { } "${pkgs.imagemagick}/bin/convert ${lockSvg} $out";
locker = pkgs.writeShellScript "i3-locker" locker = pkgs.writeShellScript "i3-locker"
'' ''
@ -48,6 +48,7 @@ in
${pkgs.lightdm}/bin/dm-tool lock ${pkgs.lightdm}/bin/dm-tool lock
# TODO Does that work for all DMs? # TODO Does that work for all DMs?
# TODO Might want to use i3lock on NixOS configs still?
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
if [ -d ${config.xdg.cacheHome}/lockpatterns ] if [ -d ${config.xdg.cacheHome}/lockpatterns ]
then then

View file

@ -96,13 +96,6 @@ echo "{ ... }: { imports = [ ./hardware-configuration.nix ${nixos_config} ]; }"
# Install NixOS! Or create a new generation. # Install NixOS! Or create a new generation.
sudo nixos-install --no-root-password --root "$mountpoint" sudo nixos-install --no-root-password --root "$mountpoint"
# Install dotfiles. Actually not needed by nixos-install since it doesn't rewrite global paths to the mountpoint.
# Without it no nixos-rebuild from the system itself once installed though.
# Should probably be replaced with something like git-sync
# sudo mkdir -p $mountpoint/home/geoffrey/.config/
# sudo cp -a ../dotfiles $mountpoint/home/geoffrey/.config/
# sudo chown geoffrey:geoffrey $mountpoint/home/geoffrey -R
set +x set +x
# Signal the installation is done! # Signal the installation is done!
@ -113,3 +106,4 @@ echo "- Boot into the system"
echo "- Transfer necessary private keys (or use ssh -A for testing)" echo "- Transfer necessary private keys (or use ssh -A for testing)"
echo "- Run git-sync-init" echo "- Run git-sync-init"
echo "- Check that the system can build itself" echo "- Check that the system can build itself"
echo "- Change root and user password"