aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-02-07 18:48:40 -0800
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:47 -0700
commitaa1ac68a50f6a1c1d4252d999ea908a3d2de72d5 (patch)
tree8353b177c6b2dfaf9e6de7851efd1965bb48ad88
parentff4462a084cc91607997ddac32159be3ea6c213d (diff)
migration: cmus
-rw-r--r--roles/home/desktop/cmus.nix62
-rw-r--r--snowfall/homes/x86_64-linux/c/default.nix1
-rw-r--r--snowfall/modules/home/apps/cmus/default.nix70
-rw-r--r--snowfall/modules/home/suites/media/default.nix17
4 files changed, 88 insertions, 62 deletions
diff --git a/roles/home/desktop/cmus.nix b/roles/home/desktop/cmus.nix
deleted file mode 100644
index 5d0dd3b..0000000
--- a/roles/home/desktop/cmus.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-lib.mkIf config.home.roles.desktop.music {
- home.packages = with pkgs; [
- cmus
- ];
-
- xdg.desktopEntries.cmus = {
- name = "cmus";
- genericName = "Music Player";
- exec = "${pkgs.kitty}/bin/kitty ${pkgs.cmus}/bin/cmus";
- categories = [ "Music" "Player" "Audio" "ConsoleOnly" ];
- };
-
- xdg.configFile."cmus/rc".text = let c = config.theme.colors; in ''
- set auto_expand_albums_follow=false
- set pause_on_output_change=true
- set repeat=true
- set shuffle=tracks
-
- fset unheard=play_count=0
- factivate
-
- set color_cmdline_attr=default
- set color_cmdline_bg=default
- set color_cmdline_fg=default
- set color_cur_sel_attr=default
- set color_error=231
- set color_info=lightyellow
- set color_separator=black
- set color_statusline_attr=default
- set color_statusline_bg=237
- set color_statusline_fg=248
- set color_titleline_attr=bold
- set color_titleline_bg=239
- set color_titleline_fg=default
- set color_trackwin_album_attr=bold
- set color_trackwin_album_bg=black
- set color_trackwin_album_fg=default
- set color_win_attr=default
- set color_win_bg=default
- set color_win_cur=231
- set color_win_cur_attr=default
- set color_win_cur_sel_attr=bold
- set color_win_cur_sel_bg=231
- set color_win_cur_sel_fg=black
- set color_win_dir=lightblue
- set color_win_fg=default
- set color_win_inactive_cur_sel_attr=bold
- set color_win_inactive_cur_sel_bg=237
- set color_win_inactive_cur_sel_fg=231
- set color_win_inactive_sel_attr=bold
- set color_win_inactive_sel_bg=237
- set color_win_inactive_sel_fg=default
- set color_win_sel_attr=bold
- set color_win_sel_bg=250
- set color_win_sel_fg=black
- set color_win_title_attr=bold
- set color_win_title_bg=250
- set color_win_title_fg=black
- '';
-}
diff --git a/snowfall/homes/x86_64-linux/c/default.nix b/snowfall/homes/x86_64-linux/c/default.nix
index ec9320d..aaa2aa5 100644
--- a/snowfall/homes/x86_64-linux/c/default.nix
+++ b/snowfall/homes/x86_64-linux/c/default.nix
@@ -6,6 +6,7 @@ with lib; with lib.${namespace}; {
common.enable = true;
desktop.enable = true;
dev.enable = true;
+ media.enable = true;
};
desktop.background = "shinobu.png";
diff --git a/snowfall/modules/home/apps/cmus/default.nix b/snowfall/modules/home/apps/cmus/default.nix
new file mode 100644
index 0000000..8fb286f
--- /dev/null
+++ b/snowfall/modules/home/apps/cmus/default.nix
@@ -0,0 +1,70 @@
+{ options, config, lib, pkgs, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.apps.cmus;
+in {
+ options.${namespace}.apps.cmus = with types; {
+ enable = mkEnableOption "cmus";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ cmus
+ ];
+
+ xdg.desktopEntries.cmus = {
+ name = "cmus";
+ genericName = "Music Player";
+ exec = "${pkgs.kitty}/bin/kitty ${pkgs.cmus}/bin/cmus";
+ categories = [ "Music" "Player" "Audio" "ConsoleOnly" ];
+ };
+
+ xdg.configFile."cmus/rc".text = ''
+ set auto_expand_albums_follow=false
+ set pause_on_output_change=true
+ set repeat=true
+ set shuffle=tracks
+
+ fset unheard=play_count=0
+ factivate
+
+ set color_cmdline_attr=default
+ set color_cmdline_bg=default
+ set color_cmdline_fg=default
+ set color_cur_sel_attr=default
+ set color_error=231
+ set color_info=lightyellow
+ set color_separator=black
+ set color_statusline_attr=default
+ set color_statusline_bg=237
+ set color_statusline_fg=248
+ set color_titleline_attr=bold
+ set color_titleline_bg=239
+ set color_titleline_fg=default
+ set color_trackwin_album_attr=bold
+ set color_trackwin_album_bg=black
+ set color_trackwin_album_fg=default
+ set color_win_attr=default
+ set color_win_bg=default
+ set color_win_cur=231
+ set color_win_cur_attr=default
+ set color_win_cur_sel_attr=bold
+ set color_win_cur_sel_bg=231
+ set color_win_cur_sel_fg=black
+ set color_win_dir=lightblue
+ set color_win_fg=default
+ set color_win_inactive_cur_sel_attr=bold
+ set color_win_inactive_cur_sel_bg=237
+ set color_win_inactive_cur_sel_fg=231
+ set color_win_inactive_sel_attr=bold
+ set color_win_inactive_sel_bg=237
+ set color_win_inactive_sel_fg=default
+ set color_win_sel_attr=bold
+ set color_win_sel_bg=250
+ set color_win_sel_fg=black
+ set color_win_title_attr=bold
+ set color_win_title_bg=250
+ set color_win_title_fg=black
+ '';
+ };
+}
diff --git a/snowfall/modules/home/suites/media/default.nix b/snowfall/modules/home/suites/media/default.nix
new file mode 100644
index 0000000..33a3394
--- /dev/null
+++ b/snowfall/modules/home/suites/media/default.nix
@@ -0,0 +1,17 @@
+{ options, config, lib, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.suites.media;
+in {
+ options.${namespace}.suites.media = with types; {
+ enable = mkEnableOption "media";
+ };
+
+ config = mkIf cfg.enable {
+ cxl = {
+ apps = {
+ cmus.enable = true;
+ };
+ };
+ };
+}