{ lib, pkgs, config, ...} @ args: let inherit (lib) mkOption types; cfg = config.chuj.system; in { options.chuj.system = { user = mkOption { type = types.str; }; host = mkOption { type = types.str; }; platform = mkOption { type = types.str; }; groups = mkOption { type = types.listOf types.str; default = []; }; stateVersion = mkOption { type = types.str; default = "23.11"; }; }; config = { networking.hostName = cfg.host; users.users.${cfg.user} = { isNormalUser = true; extraGroups = [ "wheel" ] ++ cfg.groups; }; nixpkgs.hostPlatform = cfg.platform; system.stateVersion = cfg.stateVersion; time.timeZone = "Europe/Warsaw"; hardware.pulseaudio.enable = true; networking.networkmanager.enable = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.overlays = import ../pkgs args; nixpkgs.config.allowUnfree = true; security.sudo = { package = pkgs.sudo.override { withInsults = true; }; extraConfig = '' Defaults pwfeedback ''; }; environment.systemPackages = with pkgs; [ ed # is the standard text editor. ripgrep file tree btop wget zip unzip rar unrar p7zip p7zip-rar gcc gnumake python311 ]; }; }