From 78ea6db567e384425af5d11976414051832b814e Mon Sep 17 00:00:00 2001 From: kat witch Date: Thu, 2 Sep 2021 23:49:14 +0100 Subject: [PATCH] hosts/shinmyoumaru: Move to cross-compilation --- config/hosts/shinmyoumaru/nixos.nix | 16 ++++++++++++++-- config/profiles/base/kitty.nix | 2 +- config/profiles/base/packages.nix | 4 +--- config/users/kat/base/shell.nix | 3 --- config/users/kat/personal/shell.nix | 7 ++++++- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/config/hosts/shinmyoumaru/nixos.nix b/config/hosts/shinmyoumaru/nixos.nix index 1e308c5f..3b7e97ec 100644 --- a/config/hosts/shinmyoumaru/nixos.nix +++ b/config/hosts/shinmyoumaru/nixos.nix @@ -3,16 +3,28 @@ { # Imports - imports = [ + imports = with meta; [ + profiles.base ./image.nix ]; + home-manager.users.kat.programs.neovim.enable = mkForce false; + # Weird Shit - nixpkgs.localSystem = systems.examples.raspberryPi // { + nixpkgs.crossSystem = systems.examples.raspberryPi // { system = "armv6l-linux"; }; + environment.noXlibs = true; + documentation.info.enable = false; + documentation.man.enable = false; + programs.command-not-found.enable = false; + security.polkit.enable = false; + security.audit.enable = false; + services.udisks2.enable = false; + boot.enableContainers = false; + nix = { binaryCaches = lib.mkForce [ "https://app.cachix.org/cache/thefloweringash-armv7" ]; binaryCachePublicKeys = [ "thefloweringash-armv7.cachix.org-1:v+5yzBD2odFKeXbmC+OPWVqx4WVoIVO6UXgnSAWFtso=" ]; diff --git a/config/profiles/base/kitty.nix b/config/profiles/base/kitty.nix index 007080c4..1050fbeb 100644 --- a/config/profiles/base/kitty.nix +++ b/config/profiles/base/kitty.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - environment.systemPackages = [ pkgs.kitty.terminfo ]; + environment.systemPackages = [ pkgs.buildPackages.buildPackages.kitty.terminfo ]; } diff --git a/config/profiles/base/packages.nix b/config/profiles/base/packages.nix index 16687f68..44763348 100644 --- a/config/profiles/base/packages.nix +++ b/config/profiles/base/packages.nix @@ -5,8 +5,6 @@ smartmontools hddtemp lm_sensors - pinentry-curses gnupg - foot.terminfo - ]; + ] ++ (lib.optional config.programs.gnupg.agent.enable pinentry-curses); } diff --git a/config/users/kat/base/shell.nix b/config/users/kat/base/shell.nix index ed296d9f..313eca04 100644 --- a/config/users/kat/base/shell.nix +++ b/config/users/kat/base/shell.nix @@ -17,9 +17,6 @@ in genmac = '' nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/' ''; - nano = '' - ${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png} - ''; getAlias = '' printf '%s\n' $aliases[$1] ''; diff --git a/config/users/kat/personal/shell.nix b/config/users/kat/personal/shell.nix index 835e1454..5b63ae93 100644 --- a/config/users/kat/personal/shell.nix +++ b/config/users/kat/personal/shell.nix @@ -1,6 +1,11 @@ -{ config, lib, ... }: with lib; +{ config, lib, pkgs, ... }: with lib; { + home.shell.functions = { + nano = '' + ${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png} + ''; + }; programs.zsh = { shellAliases = mapListToAttrs (attr: nameValuePair "abby${attr}" "mpv $(bitw get secrets/abby -f ${attr})") ["radio" "tv"]; };