From 606cd8cf84f2d07cc26fbce286161f9765bfd37b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Mar 2023 10:21:36 +0000 Subject: [PATCH] hosts: homes: add work cloudtop The unfortunate host naming can't be fixed at the moment... --- flake/home-manager.nix | 16 +++++++++++++--- hosts/homes/ambroisie@ambroisie/default.nix | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 hosts/homes/ambroisie@ambroisie/default.nix diff --git a/flake/home-manager.nix b/flake/home-manager.nix index ce6791d..c55c8dd 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -38,14 +38,24 @@ let inherit inputs; }; }; + + hosts = { + "ambroisie@ambroisie" = "x86_64-linux"; # Unfortunate naming here... + }; in { perSystem = { system, ... }: { # Work-around for https://github.com/nix-community/home-manager/issues/3075 legacyPackages = { - homeConfigurations = lib.mapAttrs mkHome { - ambroisie = system; - }; + homeConfigurations = + let + filteredHosts = lib.filterAttrs (_: v: v == system) hosts; + allHosts = filteredHosts // { + # Default configuration + ambroisie = system; + }; + in + lib.mapAttrs mkHome allHosts; }; }; } diff --git a/hosts/homes/ambroisie@ambroisie/default.nix b/hosts/homes/ambroisie@ambroisie/default.nix new file mode 100644 index 0000000..e4dabcf --- /dev/null +++ b/hosts/homes/ambroisie@ambroisie/default.nix @@ -0,0 +1,16 @@ +# Google Cloudtop configuration +{ ... }: +{ + # Google specific configuration + home.homeDirectory = "/usr/local/google/home/ambroisie"; + + home.sessionVariables = { + # Some tooling (e.g: SSH) need to use this library + LD_PRELOAD = "/lib/x86_64-linux-gnu/libnss_cache.so.2\${LD_PRELOAD:+:}$LD_PRELOAD"; + }; + + my.home = { + # I don't need a GPG agent + gpg.enable = false; + }; +}