{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }: let supportedDesktops = [ "gnome" "hyprland" ]; supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops; deskCfg = config.deskCfg; in { options.deskCfg = { de = lib.mkOption { default = ""; type = lib.types.str; description = "Desktop Environment"; }; userName = lib.mkOption { type = lib.types.str; description = "Main username for system"; }; hostName = lib.mkOption { type = lib.types.str; description = "Hostname for system"; }; installGaming = lib.mkOption { type = lib.types.bool; default = true; description = "Whether to install gaming software or not"; }; }; imports = [ modules/user/main_user.nix ]; config = { assertions = [ { assertion = builtins.elem deskCfg.de supportedDesktops; message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}"; } ]; nixpkgs.overlays = [ inputs.nur.overlay ]; # Enable flakes feature nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; # boot.plymouth.enable = true; networking.hostName = deskCfg.hostName; # Define your hostname. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.wireless.iwd.enable = true; time.timeZone = timeZone; main_user = { enable = true; userName = deskCfg.userName; isDesktopUser = true; }; #niriwm = { # enable = false; # useNonFree = true; # #installGaming = deskCfg.installGaming; # systemPackages = with pkgs; [ # libreoffice # rpi-imagergh # ]; #}; ## TODO move all of this into a hyprland config environment.systemPackages = with pkgs; [ nwg-hello cage ]; programs.hyprland.enable = true; # programs.steam.enable = true; # For electron apps in wayland environment.sessionVariables.NIXOS_OZONE_WL = "1"; services.greetd = { enable = true; settings = rec { initial_session = { command = "${pkgs.hyprland}/bin/hyprland"; user = "scrappy"; }; default_session = initial_session; }; }; # For yubioath desktop services.pcscd.enable = true; # Audio security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; pulse.enable = true; wireplumber.enable = true; }; programs.thunar = { enable = true; plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; }; programs.file-roller.enable = true; programs.xfconf.enable = true; # sound.enable = false; # services.xserver = { # enable = true; # displayManager.gdm.enable = true; # desktopManager.gnome.enable = true; # }; programs.regreet.enable = true; programs.zsh.enable = true; nixpkgs.config.allowUnfree = true; system.stateVersion = "24.05"; # Did you read the comment? }; }