From 8b6f8474a45166d8a9d2b10b903836fab5701c5b Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 10 Oct 2024 02:31:33 +0200 Subject: [PATCH] nixos/cosmic: provide configuration defaults --- .../v1/enable_drag_source | 1 + .../com.system76.CosmicAppList/v1/favorites | 11 ++++++++++ .../v1/filter_top_levels | 1 + .../v1/military_time | 1 + .../v1/show_seconds | 1 + .../com.system76.CosmicBackground/v1/all | 9 ++++++++ .../v1/same-on-all | 1 + .../com.system76.CosmicComp/v1/autotile | 1 + .../v1/autotile_behavior | 1 + .../v1/focus_follows_cursor | 1 + .../v1/focus_follows_cursor_delay | 1 + .../com.system76.CosmicComp/v1/workspaces | 4 ++++ .../com.system76.CosmicPanel.Dock/v1/anchor | 1 + .../v1/anchor_gap | 1 + .../com.system76.CosmicPanel.Dock/v1/autohide | 5 +++++ .../v1/border_radius | 1 + .../v1/exclusive_zone | 1 + .../com.system76.CosmicPanel.Dock/v1/layer | 1 + .../v1/plugins_center | 5 +++++ .../v1/plugins_wings | 1 + .../com.system76.CosmicPanel.Panel/v1/anchor | 1 + .../v1/anchor_gap | 1 + .../com.system76.CosmicPanel.Panel/v1/layer | 1 + .../v1/plugins_center | 3 +++ .../v1/plugins_wings | 14 ++++++++++++ .../v1/custom | 22 +++++++++++++++++++ .../v1/corner_radii | 8 +++++++ .../v1/corner_radii | 8 +++++++ .../com.system76.CosmicTheme.Mode/v1/is_dark | 1 + .../com.system76.CosmicTk/v1/show_maximize | 1 + .../com.system76.CosmicTk/v1/show_minimize | 1 + nix-os/desktopManagers/cosmic.nix | 18 +++++++++++++++ 32 files changed, 128 insertions(+) create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/enable_drag_source create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/favorites create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/filter_top_levels create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/military_time create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/show_seconds create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/all create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/same-on-all create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile_behavior create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor_delay create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/workspaces create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor_gap create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/autohide create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/border_radius create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/exclusive_zone create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/layer create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_center create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_wings create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor_gap create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/layer create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_center create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_wings create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicSettings.Shortcuts/v1/custom create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Dark/v1/corner_radii create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Light/v1/corner_radii create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Mode/v1/is_dark create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_maximize create mode 100644 nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_minimize diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/enable_drag_source b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/enable_drag_source new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/enable_drag_source @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/favorites b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/favorites new file mode 100644 index 0000000..088deb1 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/favorites @@ -0,0 +1,11 @@ +[ + "kitty", + "vivaldi-stable", + "pcmanfm", + "code", + "steam", + "vesktop", + "org.telegram.desktop", + "jitsi-meet-electron", + "pavucontrol", +] diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/filter_top_levels b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/filter_top_levels new file mode 100644 index 0000000..4af1832 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppList/v1/filter_top_levels @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/military_time b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/military_time new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/military_time @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/show_seconds b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/show_seconds new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicAppletTime/v1/show_seconds @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/all b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/all new file mode 100644 index 0000000..c817dfe --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/all @@ -0,0 +1,9 @@ +( + output: "all", + source: Path("@wallpaper@"), + filter_by_theme: true, + rotation_frequency: 300, + filter_method: Lanczos, + scaling_mode: Zoom, + sampling_method: Alphanumeric, +) diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/same-on-all b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/same-on-all new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicBackground/v1/same-on-all @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile_behavior b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile_behavior new file mode 100644 index 0000000..bca87fc --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/autotile_behavior @@ -0,0 +1 @@ +PerWorkspace \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor_delay b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor_delay new file mode 100644 index 0000000..8a32cf7 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/focus_follows_cursor_delay @@ -0,0 +1 @@ +250 \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/workspaces b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/workspaces new file mode 100644 index 0000000..9518393 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicComp/v1/workspaces @@ -0,0 +1,4 @@ +( + workspace_mode: OutputBound, + workspace_layout: Horizontal, +) \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor new file mode 100644 index 0000000..752ed40 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor @@ -0,0 +1 @@ +Bottom \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor_gap b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor_gap new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/anchor_gap @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/autohide b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/autohide new file mode 100644 index 0000000..cd1a18b --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/autohide @@ -0,0 +1,5 @@ +Some(( + wait_time: 1000, + transition_time: 200, + handle_size: 4, +)) \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/border_radius b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/border_radius new file mode 100644 index 0000000..1568d2c --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/border_radius @@ -0,0 +1 @@ +@corner_radii_panel@ diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/exclusive_zone b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/exclusive_zone new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/exclusive_zone @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/layer b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/layer new file mode 100644 index 0000000..b095f04 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/layer @@ -0,0 +1 @@ +Top \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_center b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_center new file mode 100644 index 0000000..2d2d39c --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_center @@ -0,0 +1,5 @@ +Some([ + "com.system76.CosmicAppList", + "com.system76.CosmicAppletMinimize", + "com.system76.CosmicPanelAppButton", +]) \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_wings b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_wings new file mode 100644 index 0000000..4af1832 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Dock/v1/plugins_wings @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor new file mode 100644 index 0000000..b095f04 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor @@ -0,0 +1 @@ +Top \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor_gap b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor_gap new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/anchor_gap @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/layer b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/layer new file mode 100644 index 0000000..b095f04 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/layer @@ -0,0 +1 @@ +Top \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_center b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_center new file mode 100644 index 0000000..2434167 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_center @@ -0,0 +1,3 @@ +Some([ + "com.system76.CosmicAppletTime", +]) \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_wings b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_wings new file mode 100644 index 0000000..3d44247 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicPanel.Panel/v1/plugins_wings @@ -0,0 +1,14 @@ +Some(([ + "com.system76.CosmicPanelAppButton", + "com.system76.CosmicAppletWorkspaces", +], [ + "com.system76.CosmicAppletInputSources", + "com.system76.CosmicAppletStatusArea", + "com.system76.CosmicAppletTiling", + "com.system76.CosmicAppletAudio", + "com.system76.CosmicAppletNetwork", + "com.system76.CosmicAppletBattery", + "com.system76.CosmicAppletNotifications", + "com.system76.CosmicAppletBluetooth", + "com.system76.CosmicAppletPower", +])) \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicSettings.Shortcuts/v1/custom b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicSettings.Shortcuts/v1/custom new file mode 100644 index 0000000..650da7e --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicSettings.Shortcuts/v1/custom @@ -0,0 +1,22 @@ +{ + ( + modifiers: [ + Ctrl, + Alt, + ], + key: "t", + description: Some("Open terminal"), + ): Spawn("kitty"), + ( + modifiers: [ + Super, + Ctrl, + ], + key: "l", + ): System(LockScreen), + ( + modifiers: [ + Super, + ], + ): System(Launcher), +} \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Dark/v1/corner_radii b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Dark/v1/corner_radii new file mode 100644 index 0000000..00aa3ff --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Dark/v1/corner_radii @@ -0,0 +1,8 @@ +( + radius_0: (0.0, 0.0, 0.0, 0.0), + radius_xs: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_s: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_m: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_l: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_xl: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), +) diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Light/v1/corner_radii b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Light/v1/corner_radii new file mode 100644 index 0000000..00aa3ff --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Light/v1/corner_radii @@ -0,0 +1,8 @@ +( + radius_0: (0.0, 0.0, 0.0, 0.0), + radius_xs: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_s: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_m: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_l: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), + radius_xl: (@corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@, @corner_radii_theme@), +) diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Mode/v1/is_dark b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Mode/v1/is_dark new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTheme.Mode/v1/is_dark @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_maximize b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_maximize new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_maximize @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_minimize b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_minimize new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/nix-os/desktopManagers/cosmic-config/com.system76.CosmicTk/v1/show_minimize @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/nix-os/desktopManagers/cosmic.nix b/nix-os/desktopManagers/cosmic.nix index c863b27..0e48b72 100644 --- a/nix-os/desktopManagers/cosmic.nix +++ b/nix-os/desktopManagers/cosmic.nix @@ -1,5 +1,22 @@ { inputs, lib, pkgs, ... }: +let + cosmic-configuration = pkgs.substituteAllFiles { + name = "cosmic-configuration"; + src = ./cosmic-config; + files = [ "." ]; # All files + postInstall = '' + mkdir -p $share/share/cosmic + cp -rt $share/share/cosmic $out/* + ''; + outputs = [ "out" "share" ]; + + wallpaper = ../../media/wallpaper.png; + corner_radii_theme = "2.0"; + corner_radii_panel = "2"; + }; +in + { imports = [ "${inputs.cosmic-modules}/nixos/cosmic/module.nix" @@ -13,6 +30,7 @@ ]; environment.systemPackages = with pkgs; [ pavucontrol + (lib.hiPrio cosmic-configuration.share) ]; services.gnome.gnome-keyring.enable = true; };