{ inputs, self, ... }: { flake.homeModules.global = { lib, config, pkgs, ... }: { imports = [ self.homeModules.globalOptions ]; nix.gc = lib.mkIf (!config.features.applications.cli.nh.enable) { automatic = true; persistent = true; dates = "Sun 05:00"; }; nixpkgs.config = lib.mkIf (config.info.isStandalone) { allowUnfree = true; }; home = { stateVersion = config.info.stateVersion; packages = with pkgs; [ speedtest-go bitwarden-cli ] ++ config.features.applications.extraPackages ++ (if config.info.isStandalone then [ pkgs.home-manager ] else []); shell.enableBashIntegration = true; username = "grey"; homeDirectory = "/home/${config.home.username}"; file = inputs.helpers.localBinFromStringAttrs config.features.applications.shellScripts; activation.linkGitConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { target = "${config.home.homeDirectory}/.gitconfig"; source = "${config.info.rootPath}/dotfiles/shared/git.conf"; }); }; targets.genericLinux.enable = config.info.isStandalone; xdg = { enable = true; localBinInPath = true; portal = lib.mkIf (config.info.isStandalone) { enable = true; xdgOpenUsePortal = true; config.common.default = "*"; extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ]; }; }; services.gnome-keyring.enable = config.info.isStandalone; programs = { sftpman = lib.mkIf (config.info.hostName != "sakamoto") { enable = true; mounts = { sakamoto = { host = "sakamoto"; mountDestPath = "/home/grey/mounts/ssh/sakamoto"; mountPoint = "/"; sshKey = "/home/grey/.ssh/id_sakamoto"; user = "grey"; }; }; }; gpg = { enable = true; }; ssh = { enable = true; enableDefaultConfig = false; settings = { "git.greyweather.dev" = { HostName = "git.greyweather.dev"; Port = "222"; User = "git"; IdentityFile = "~/.ssh/id_gitea"; }; "github.com" = { HostName = "github.com"; Port = 22; User = "git"; IdentityFile = "~/.ssh/id_github"; }; }; }; }; }; }