From 5e8fdf436d5e1e87d41f37dd38f0836a4de8bda3 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:16:02 +1000 Subject: [PATCH] chore: cleanup modules system-specific modules such as darwin/games will now automatically import games.nix removes alot of duplication --- modules/darwin/applications.nix | 2 ++ modules/darwin/games.nix | 6 +----- modules/games.nix | 8 ++++++++ modules/linux/applications.nix | 2 ++ modules/linux/games.nix | 7 +++---- 5 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 modules/games.nix diff --git a/modules/darwin/applications.nix b/modules/darwin/applications.nix index 037acc4..fa949e7 100644 --- a/modules/darwin/applications.nix +++ b/modules/darwin/applications.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: { + imports = [ ../applications.nix ]; + # dock system.defaults.dock.persistent-apps = [ "/Applications/Firefox.app" diff --git a/modules/darwin/games.nix b/modules/darwin/games.nix index 6eb8cf5..d4bcd76 100644 --- a/modules/darwin/games.nix +++ b/modules/darwin/games.nix @@ -1,10 +1,7 @@ { config, lib, pkgs, ... }: { - environment.systemPackages = with pkgs; [ - osu-lazer-bin - prismlauncher - ]; + imports = [ ../games.nix ]; homebrew.casks = [ "whisky" @@ -12,7 +9,6 @@ "gog-galaxy" ]; - system.defaults.dock.persistent-apps = [ "/Applications/Steam.app" "/Applications/GOG Galaxy.app" diff --git a/modules/games.nix b/modules/games.nix new file mode 100644 index 0000000..653cfa6 --- /dev/null +++ b/modules/games.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + osu-lazer-bin + prismlauncher + ]; +} diff --git a/modules/linux/applications.nix b/modules/linux/applications.nix index 21ff7e6..751d417 100644 --- a/modules/linux/applications.nix +++ b/modules/linux/applications.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: { + imports = [ ../applications.nix ]; + # nix pkgs environment.systemPackages = with pkgs; [ mpv diff --git a/modules/linux/games.nix b/modules/linux/games.nix index 75b325a..5c65493 100644 --- a/modules/linux/games.nix +++ b/modules/linux/games.nix @@ -1,11 +1,10 @@ { config, lib, pkgs, ... }: { - environment.systemPackages = with pkgs; [ - osu-lazer-bin - prismlauncher - heroic + imports = [ ../games.nix ]; + environment.systemPackages = with pkgs; [ + heroic mangohud ];