added dedicated focusrite scarlett, appimage modules, modified cloud
these new modules include only packages, no other configuration. maybe later but none currently
This commit is contained in:
		
							
								
								
									
										19
									
								
								modules/apps/appimage.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/apps/appimage.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
  cfg = config.appimage;
 | 
			
		||||
in {
 | 
			
		||||
  options.appimage = {
 | 
			
		||||
    enable = mkEnableOption "AppImage support";
 | 
			
		||||
  };
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    environment.systemPackages = with pkgs; [
 | 
			
		||||
      appimageupdate
 | 
			
		||||
      appimage-run
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -21,11 +21,13 @@ in {
 | 
			
		||||
      inherit lib pkgs flatpakPackages;
 | 
			
		||||
    })
 | 
			
		||||
    ../../apps/gaming.nix
 | 
			
		||||
    ../../apps/appimage.nix
 | 
			
		||||
    ../../graphics
 | 
			
		||||
    ../../pwrMgmt
 | 
			
		||||
    ../../networking/core.nix
 | 
			
		||||
    ../../sound/pipewire.nix
 | 
			
		||||
    ../../sound/shairport.nix
 | 
			
		||||
    ../../sound/focusrite.nix
 | 
			
		||||
    ../../virtualization/podman.nix
 | 
			
		||||
    ../../virtualization/hardware.nix
 | 
			
		||||
  ];
 | 
			
		||||
@@ -34,9 +36,13 @@ in {
 | 
			
		||||
  nix.settings.experimental-features = ["nix-command" "flakes"];
 | 
			
		||||
 | 
			
		||||
  # Custom kernel/boot stuff
 | 
			
		||||
  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
			
		||||
  boot.loader.systemd-boot.enable = true;
 | 
			
		||||
  boot.loader.efi.canTouchEfiVariables = true;
 | 
			
		||||
  boot = {
 | 
			
		||||
    kernelPackages = pkgs.linuxPackages_latest;
 | 
			
		||||
    loader = {
 | 
			
		||||
      systemd-boot.enable = true;
 | 
			
		||||
      efi.canTouchEfiVariables = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # Enable Bluetooth if present
 | 
			
		||||
  hardware.bluetooth.enable = true;
 | 
			
		||||
@@ -63,21 +69,6 @@ in {
 | 
			
		||||
    wl-clip-persist
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  # Enable OpenSSH
 | 
			
		||||
  services.openssh.enable = true;
 | 
			
		||||
 | 
			
		||||
  # Enable keyring
 | 
			
		||||
  services.gnome.gnome-keyring.enable = true;
 | 
			
		||||
 | 
			
		||||
  # Enable GnuPG
 | 
			
		||||
  programs.gnupg.agent = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    enableSSHSupport = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # Enable SUID wrappers (some programs need them)
 | 
			
		||||
  programs.mtr.enable = true;
 | 
			
		||||
 | 
			
		||||
  # Enable Polkit
 | 
			
		||||
  security.polkit.enable = true;
 | 
			
		||||
 | 
			
		||||
@@ -145,14 +136,39 @@ in {
 | 
			
		||||
    networkManager.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  programs = {
 | 
			
		||||
    # Enable GnuPG
 | 
			
		||||
    gnupg.agent = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      enableSSHSupport = true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Enable SUID wrappers (some programs need them)
 | 
			
		||||
    mtr.enable = true;
 | 
			
		||||
 | 
			
		||||
    # Enable dconf
 | 
			
		||||
  programs.dconf.enable = true;
 | 
			
		||||
    dconf.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # Add username to groups "wheel" and "video" - more may be added here later
 | 
			
		||||
  users.users.${userName}.extraGroups = ["wheel" "video" "gamemode" "podman" "network"];
 | 
			
		||||
 | 
			
		||||
  services = {
 | 
			
		||||
    # Enable OpenSSH
 | 
			
		||||
    openssh.enable = true;
 | 
			
		||||
 | 
			
		||||
    # Enable keyring
 | 
			
		||||
    gnome.gnome-keyring.enable = true;
 | 
			
		||||
 | 
			
		||||
    # Flatpak packages (see ../../apps/flatpak.nix)
 | 
			
		||||
  services.flatpak.packages = flatpakPackages;
 | 
			
		||||
    flatpak.packages = flatpakPackages;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # Focusrite Scarlett audio interface support (see ../../sound/focusrite.nix)
 | 
			
		||||
  sound.hardware.focusrite.enable = true;
 | 
			
		||||
 | 
			
		||||
  # AppImage support
 | 
			
		||||
  appimage.enable = true;
 | 
			
		||||
 | 
			
		||||
  # XDG stuff
 | 
			
		||||
  xdg = {
 | 
			
		||||
@@ -160,12 +176,12 @@ in {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      config = {
 | 
			
		||||
        sway = {
 | 
			
		||||
          default = [ "wlr" "gtk" ];
 | 
			
		||||
          "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
 | 
			
		||||
          default = ["wlr" "gtk"];
 | 
			
		||||
          "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
 | 
			
		||||
        };
 | 
			
		||||
        common = {
 | 
			
		||||
          default = [ "gtk" ];
 | 
			
		||||
          "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
 | 
			
		||||
          default = ["gtk"];
 | 
			
		||||
          "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
      extraPortals = with pkgs; [
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										33
									
								
								modules/sound/focusrite.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								modules/sound/focusrite.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
# Must be paired with the pipewire Nix module, this does nothing but install packages
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
  cfg = config.sound.hardware.focusrite;
 | 
			
		||||
in {
 | 
			
		||||
  options.focusrite = {
 | 
			
		||||
    enable = mkEnableOption "Focusrite audio interface support";
 | 
			
		||||
    guiSupport = mkOption {
 | 
			
		||||
      type = types.bool;
 | 
			
		||||
      default = false;
 | 
			
		||||
      description = "Enable GUI support for Focusrite Scarlett audio interface (installs alsa-scarlett-gui)";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  config = mkIf cfg.enable (mkMerge [
 | 
			
		||||
    {
 | 
			
		||||
      environment.systemPackages = with pkgs;
 | 
			
		||||
        [
 | 
			
		||||
          scarlett2
 | 
			
		||||
          alsa-scarlett-gui
 | 
			
		||||
        ]
 | 
			
		||||
        ++ (
 | 
			
		||||
          if cfg.guiSupport
 | 
			
		||||
          then [pkgs.alsa-scarlett-gui]
 | 
			
		||||
          else []
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
  ]);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user