{ self, inputs, ... }: { flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: { config = { sops.secrets."nathan/pass".neededForUsers = true; users.users.nathan = { shell = pkgs.zsh; name = lib.mkDefault "nathan"; isNormalUser = lib.mkDefault true; #hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile; extraGroups = [ "networkmanager" "docker" "libvirtd" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCM7ZgIu4+ntHZbzo9iQPq5pUt7AhpOnfvvI0lWDgO4CgtkPGvyFrDnW87wjAKGKYkgKeHWHIkwq2hkEDqlPD+7xxtPpwzfyo7ZS23xlP31rL14HcG21jGHgx9SO7RmGDHHylu4PwJzz/KX59hcVmpSSV4hgB/mYA9UKe6VHv39X4y3HsjmiHwNBOKXltG4V+VkxOZD6HcZ62sgkyDTaqDpE7p+q8vHPbm6dVTKC9cMjtJmjB5EesMGKcEAy3VN2tA9M0EndtaLcBKM39vDXGpBsjURYZTu7NbQnncnO7L8kVL0nT4vA/d4mCjB51dPoXIcxn1ise0TOb9G7TxMbBQQO5YMOpiB2iuZRRvB3sYoKwbO8YfSxZi0EhvLcxkF9GBFw+pWPl0p0D2fPBbW88YQfEpoAt2EWvEu/pgaMJsTHpgaIuDwPLVQmDciX4MRoi324oElGSK8yN0P8IaCHhFchuehLBWvTi34Qot0GpnxeTzmlLzImICO9Yq0I7dk2rk= nathan@rpi-3dp" ]; packages = lib.mkIf (false) [ pkgs.home-manager ]; }; home-manager.users.nathan = with self.homeModules; let laptop = [ "laptop" ]; #homebox = [ "homebox" ]; #both = laptop ++ homebox; useWith = x: y: (lib.mkIf (builtins.any (z: z == config.networking.hostName) x) y); in lib.mkMerge [ self.homeModules.nathan (useWith laptop nathan-aurora) (useWith laptop nathan-firefox) (useWith laptop nathan-rofi) (useWith laptop nathan-hypridle) (useWith laptop nathan-hyprland) (useWith laptop nathan-kitty) (useWith laptop nathan-scripts) (useWith laptop { wayland.windowManager.hyprland.extraConfig = '' monitor=eDP-1,1920x1080@60,0x0,1 bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi' bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi ''; }) ]; }; }; flake.homeModules.nathan-standalone = { lib, ... }: { config = { nix = { nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; settings = { experimental-features = [ "nix-command" "flakes" ]; builders = "ssh://builder x86_64-linux,aarch64-linux /run/secrets/remoteBuildKey 1 1 nixos-test,benchmark,big-parallel,kvm - -"; builders-use-substitutes = true; }; }; programs.home-manager.enable = true; }; }; flake.homeConfigurations.nathan = inputs.home-manager.lib.homeManagerConfiguration { pkgs = import inputs.nixpkgs { system = builtins.currentSystem; }; modules = [ self.homeModules.nathan ]; }; }