From f188ff672387f62a6a659699658f8b808e0c91fa Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:15:59 +1000 Subject: [PATCH] nix: compact audio.nix, applications.nix and login.nix into a singular file if you are gonna use a system with a desktop you would probably enable all of them in the first place --- flake.nix | 4 +--- modules/linux/applications.nix | 12 ----------- modules/linux/audio.nix | 13 ------------ modules/linux/desktop.nix | 37 ++++++++++++++++++++++++++++++++++ modules/linux/login.nix | 16 --------------- 5 files changed, 38 insertions(+), 44 deletions(-) delete mode 100644 modules/linux/applications.nix delete mode 100644 modules/linux/audio.nix create mode 100644 modules/linux/desktop.nix delete mode 100644 modules/linux/login.nix diff --git a/flake.nix b/flake.nix index d9665b8..b663ad5 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,8 @@ ./modules/nix.nix ./modules/shell.nix - ./modules/linux/applications.nix - ./modules/linux/audio.nix + ./modules/linux/desktop.nix ./modules/linux/hyprland.nix - ./modules/linux/login.nix ./modules/linux/stow.nix ./modules/linux/users.nix ./modules/linux/secureboot.nix diff --git a/modules/linux/applications.nix b/modules/linux/applications.nix deleted file mode 100644 index 832ef18..0000000 --- a/modules/linux/applications.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - programs.steam = { - extraPackages = [ pkgs.gamescope ]; - gamescopeSession.enable = true; - extest.enable = true; - }; - - services.flatpak.enable = true; - -} diff --git a/modules/linux/audio.nix b/modules/linux/audio.nix deleted file mode 100644 index a92e11e..0000000 --- a/modules/linux/audio.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - # Enable sound. - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; -} diff --git a/modules/linux/desktop.nix b/modules/linux/desktop.nix new file mode 100644 index 0000000..c8eb31a --- /dev/null +++ b/modules/linux/desktop.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +{ + # Enable sound. + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + # Enable display manager w/autologin + services.greetd = { + enable = true; + settings = { + initial_session = { + command = "${pkgs.hyprland}/bin/Hyprland"; + user = "nico"; + }; + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --time --greeting 'nyaaa~~'"; + }; + }; + }; + + # Applications + programs.steam = { + # doesn't do anything if steam isn't enabled so safe here + extraPackages = [ pkgs.gamescope ]; + gamescopeSession.enable = true; + extest.enable = true; + }; + + services.flatpak.enable = true; +} diff --git a/modules/linux/login.nix b/modules/linux/login.nix deleted file mode 100644 index 69fdbac..0000000 --- a/modules/linux/login.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.greetd = { - enable = true; - settings = { - initial_session = { - command = "${pkgs.hyprland}/bin/Hyprland"; - user = "nico"; - }; - default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --time --greeting 'nyaaa~~'"; - }; - }; - }; -}