Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Force-override cosmic configs with global defaults

+48 -18
+48 -18
modules/desktop/niri-cosmic.nix
··· 43 43 cosmic-wallpapers 44 44 ]; 45 45 46 + cosmic-configs = { 47 + "com.system76.CosmicComp/v1/workspaces" = '' 48 + ( 49 + workspace_mode: OutputBound, 50 + workspace_layout: Horizontal, 51 + ) 52 + ''; 53 + "com.system76.CosmicComp/v1/autotile_behavior" = '' 54 + PerWorkspace 55 + ''; 56 + "com.system76.CosmicPanel/v1/entries" = '' 57 + [ 58 + "Panel", 59 + ] 60 + ''; 61 + "com.system76.CosmicTk/v1/interface_font" = let 62 + defaultFont = head config.fonts.fontconfig.defaultFonts.sansSerif; 63 + in '' 64 + ( 65 + family: "${defaultFont}", 66 + weight: Normal, 67 + stretch: Normal, 68 + style: Normal, 69 + ) 70 + ''; 71 + "com.system76.CosmicTk/v1/monospace_font" = let 72 + defaultFont = head config.fonts.fontconfig.defaultFonts.monospace; 73 + in '' 74 + ( 75 + family: "${defaultFont}", 76 + weight: Normal, 77 + stretch: Normal, 78 + style: Normal, 79 + ) 80 + ''; 81 + }; 82 + 46 83 cosmic-base-config = let 47 - configs = { 48 - "com.system76.CosmicComp/v1/workspaces" = '' 49 - ( 50 - workspace_mode: OutputBound, 51 - workspace_layout: Horizontal, 52 - ) 53 - ''; 54 - "com.system76.CosmicComp/v1/autotile_behavior" = '' 55 - PerWorkspace 56 - ''; 57 - "com.system76.CosmicPanel/v1/entries" = '' 58 - [ 59 - "Panel", 60 - ] 61 - ''; 62 - }; 63 84 fileDrvs = 64 85 attrsets.mapAttrsToList 65 86 (name: text: pkgs.writeTextDir "share/cosmic/${name}" text) 66 - configs; 87 + cosmic-configs; 67 88 in pkgs.buildEnv { 68 89 name = "cosmic-base-config"; 69 90 paths = fileDrvs; ··· 74 95 startCosmicExtNiri = pkgs.writeShellApplication { 75 96 name = "start-cosmic-ext-niri"; 76 97 runtimeInputs = with pkgs; [ systemd coreutils ]; 77 - text = with pkgs; /*sh*/'' 98 + text = with pkgs; let 99 + cleanupCosmicConfigs = 100 + concatMapAttrsStringSep "\n" 101 + (name: _value: ''rm -f "$XDG_CONFIG_HOME/cosmic/${name}"'') 102 + cosmic-configs; 103 + in /*sh*/'' 78 104 set -e 79 105 80 106 if systemctl --user -q is-active cosmic-niri-session.service; then ··· 90 116 fi 91 117 done 92 118 done 119 + 120 + XDG_CONFIG_HOME="''${XDG_CONFIG_HOME:-$HOME/.config}" 121 + touch "$XDG_CONFIG_HOME/cosmic-initial-setup-done" 122 + ${cleanupCosmicConfigs} 93 123 94 124 export XDG_CURRENT_DESKTOP="''${XDG_CURRENT_DESKTOP:=niri}" 95 125 export XDG_SESSION_TYPE="''${XDG_SESSION_TYPE:=wayland}"