diff --git a/modules/home/themes/catppuccin/fish/default.nix b/modules/home/themes/catppuccin/fish/default.nix index a968f3f..9ac9a59 100644 --- a/modules/home/themes/catppuccin/fish/default.nix +++ b/modules/home/themes/catppuccin/fish/default.nix @@ -1,17 +1,6 @@ { lib, - pkgs, - inputs, - - namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". - system, - target, # The Snowfall Lib target for this home (eg. `x86_64-home`). - format, # A normalized name for the home target (eg. `home`). - virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. - host, # The host name for this home. - - config, ... }: { home.file.".config/fish/themes/Catppuccin\ Frappe.theme".source = lib.snowfall.fs.get-file "resources/apps/fish/Catppuccin\ Frappe.theme"; -} \ No newline at end of file +} diff --git a/modules/nixos/archetypes/workstation/default.nix b/modules/nixos/archetypes/workstation/default.nix index 24de0a1..a4d0761 100644 --- a/modules/nixos/archetypes/workstation/default.nix +++ b/modules/nixos/archetypes/workstation/default.nix @@ -1,15 +1,7 @@ { lib, pkgs, - inputs, - - namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - + namespace, config, ... }: with lib; with lib.${namespace}; @@ -20,7 +12,7 @@ in { config = mkIf cfg.enable { environment.sessionVariables = { - NIXOS_OZONE_WL = "1"; # Chromium/Electron native Wayland support + NIXOS_OZONE_WL = "0"; # Chromium/Electron native Wayland support (Buggy) MOZ_ENABLE_WAYLAND = "1"; # Firefox native Wayland support }; @@ -33,6 +25,9 @@ in { kernel.enable = true; # Kernel modifications bluetooth.enable = true; # Bluetooth support shell.enable = true; # Shell environment configuration + hardware.enable = true; # Common hardware support and tweaks + fonts.enable = true; # Common fonts and font management tweaks + audio.enable = true; # Audio setup }; desktop.gnome.enable = true; diff --git a/modules/nixos/common/audio/default.nix b/modules/nixos/common/audio/default.nix new file mode 100644 index 0000000..d9c4298 --- /dev/null +++ b/modules/nixos/common/audio/default.nix @@ -0,0 +1,24 @@ +{ + lib, + inputs, + namespace, + config, + ... +}: with lib; with lib.${namespace}; +let + cfg = config.${namespace}.common.audio; +in { + options.${namespace}.common.audio = { enable = mkEnableOption "whether to enable common audio support and tweaks"; }; + + config = mkIf cfg.enable { + hardware.pulseaudio.enable = false; + + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +} diff --git a/modules/nixos/common/bluetooth/default.nix b/modules/nixos/common/bluetooth/default.nix index df11af6..2939940 100644 --- a/modules/nixos/common/bluetooth/default.nix +++ b/modules/nixos/common/bluetooth/default.nix @@ -1,15 +1,7 @@ { lib, pkgs, - inputs, - - namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - + namespace, config, ... }: with lib; with lib.${namespace}; @@ -19,6 +11,8 @@ in { options.${namespace}.common.bluetooth = { enable = mkEnableOption "Enable bluetooth support on your current system"; }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ bluez ]; + hardware.bluetooth = { enable = true; powerOnBoot = true; diff --git a/modules/nixos/system/fonts/default.nix b/modules/nixos/common/fonts/default.nix similarity index 100% rename from modules/nixos/system/fonts/default.nix rename to modules/nixos/common/fonts/default.nix diff --git a/modules/nixos/common/hardware/default.nix b/modules/nixos/common/hardware/default.nix new file mode 100644 index 0000000..a7cb94a --- /dev/null +++ b/modules/nixos/common/hardware/default.nix @@ -0,0 +1,18 @@ +{ + lib, + inputs, + namespace, + config, + ... +}: with lib; with lib.${namespace}; +let + cfg = config.${namespace}.common.hardware; +in { + options.${namespace}.common.hardware = { enable = mkEnableOption "whether to enable common hardware support"; }; + + config = mkIf cfg.enable { + hardware.sensor.iio.enable = true; # Enable iio-sensor for automatic screen rotation and similar features. + + hardware.flipperzero.enable = true; # Enable support for the flipperzero device. + }; +} diff --git a/systems/x86_64-linux/puzzlevision/default.nix b/systems/x86_64-linux/puzzlevision/default.nix index 1abca8a..83d694c 100644 --- a/systems/x86_64-linux/puzzlevision/default.nix +++ b/systems/x86_64-linux/puzzlevision/default.nix @@ -1,21 +1,8 @@ { - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. lib, - # Instance of `pkgs` with overlays and custom packages applied. pkgs, - # All flake inputs. inputs, - - # Additional metadata, provided by Snowfall Lib. - namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the system system. + namespace, config, ... }: @@ -76,28 +63,12 @@ with lib.${namespace}; # Enable docker virtualisation.docker.enable = true; - # Sound configuration based on pipewire. - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - # Set system Type puzzlevision.archetypes.workstation.enable = true; # Enable flatpak support. services.flatpak.enable = true; - # Enable iio-sensor for automatic screen rotation and similar features. - hardware.sensor.iio.enable = true; - - # Enable support for flipper zero devices - hardware.flipperzero.enable = true; - # Configure users. snowfallorg.users.jo.admin = true; @@ -117,13 +88,6 @@ with lib.${namespace}; chromium vlc spotify - - ### Bluetooth - bluez - - ### Fonts - noto-fonts - noto-fonts-color-emoji ]; system.stateVersion = "23.05";