{
  inputs,
  system,
  user,
  userFullname,
  ...
}: {
  nixos-modules ? [],
  home-modules ? [],
}: let
  inherit (inputs) home-manager nixpkgs sops-nix nixvim;
  stable-pkgs = import inputs.nixpkgs-stable {
    inherit system;
    config.permittedInsecurePackages = [
      "electron-27.3.11"
    ];
  };
in
  nixpkgs.lib.nixosSystem {
    specialArgs = {inherit inputs stable-pkgs user userFullname;};

    inherit system;

    modules =
      nixos-modules
      ++ [
        home-manager.nixosModules.home-manager
        sops-nix.nixosModules.sops
        {
          home-manager = {
            useGlobalPkgs = true;
            useUserPackages = true;
            backupFileExtension = "bak";
            extraSpecialArgs = {inherit stable-pkgs;};
            users.${user}.imports =
              home-modules
              ++ [
                nixvim.homeManagerModules.nixvim
                ../home/.
                {
                  options.home.userFullname = nixpkgs.lib.mkOption {default = userFullname;};
                  config.home.username = user;
                }
              ];
          };
          sops = {
            defaultSopsFile = ../secrets/secrets.yaml;
            defaultSopsFormat = "yaml";
            age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
          };
          imports = [
            {
              options.user = nixpkgs.lib.mkOption {default = user;};
            }
            ../nixos/.
          ];
        }
      ];
  }
