zenix: fixes to cosmic exp hm module and git bclone opt passthru

This commit is contained in:
tristan 2024-10-06 22:36:53 +01:00
parent cdd2897470
commit 9c6e2ac6bf
4 changed files with 39 additions and 31 deletions

16
flake.lock generated
View file

@ -304,18 +304,14 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1728079598,
"narHash": "sha256-RUOZKSntxbTN7seIzq9oGNgh3LP00CDtspEDVyuD1hM=",
"owner": "tristanbeedell",
"repo": "home-manager",
"rev": "faf69fb8d9690429cc1d55ae39c5c40cdded71ff",
"type": "github"
"lastModified": 1728249206,
"narHash": "sha256-p/ntQwqm0zA/HnitCL8UrzMuC8mjUDr7LEu/f3XiWsU=",
"path": "/home/tristan/Documents/code/home-manager/cosmic",
"type": "path"
},
"original": {
"owner": "tristanbeedell",
"ref": "cosmic",
"repo": "home-manager",
"type": "github"
"path": "/home/tristan/Documents/code/home-manager/cosmic",
"type": "path"
}
},
"home-manager_2": {

View file

@ -6,7 +6,7 @@
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-cosmic.url = "github:tristanbeedell/home-manager/cosmic";
home-manager-cosmic.url = "path:///home/tristan/Documents/code/home-manager/cosmic";
stylix.url = "github:danth/stylix";
sops-nix.url = "github:Mic92/sops-nix";
nixos-cosmic = {

View file

@ -3,7 +3,7 @@
in {
programs.cosmic = {
enable = true;
input.defaultKeybindings = false;
input.asDefaults = true;
input.binds = {
# Navigation
Super. "h" = (Actions.Focus "Left");
@ -34,7 +34,7 @@ in {
Super. "d" = (Actions.Spawn config.programs.menu.drunCommand);
Super. "Return" = (Actions.Spawn pkgs.alacritty);
Super. "o" = (Actions.System "HomeFolder");
Super.Shift. "s" = (Actions.Spawn "cosmic-screenshot");
Super.Shift. "s" = (Actions.System "Screenshot");
};
background = {
displays = {
@ -43,21 +43,26 @@ in {
};
};
};
# panels = {
# Panel = {
# applets = {
# start = [ "com.system76.CosmicAppletWorkspaces" ];
# center = [ "com.system76.CosmicAppList" ];
# end = [
# "com.system76.CosmicAppletTime"
# "com.system76.CosmicAppletAudio"
# "com.system76.CosmicAppletNotifications"
# "com.system76.CosmicAppletMinimize"
# "com.system76.CosmicAppletPower"
# ];
# };
# };
# };
panels = {
"Bar" = {
applets = {
start = [ "com.system76.CosmicAppletWorkspaces" ];
center = [ "com.system76.CosmicAppList" ];
end = [
"com.system76.CosmicAppletTime"
"com.system76.CosmicAppletTiling"
"com.system76.CosmicAppletAudio"
"com.system76.CosmicAppletNotifications"
"com.system76.CosmicAppletMinimize"
"com.system76.CosmicAppletPower"
];
};
options = {
size = "XS";
border_radius = 0;
};
};
};
settings = {
"com.system76.CosmicComp".options = {
autotile = true;

View file

@ -9,11 +9,18 @@
bclone = "!sh ${pkgs.writeShellScriptBin "bare-clone" ''
url=$1
basename=''${url##*/}
if [[ $2 == -* ]]
then
opts=''${@:2}
name=''${basename%.*}
else
opts=''${@:3}
name=''${2:-''${basename%.*}}
fi
mkdir "$name"
git clone --bare "$url" "$name/.bare" || {
git clone --bare "$url" "$name/.bare" $opts || {
rm -r "$name"
exit 1
}
@ -23,7 +30,7 @@
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git fetch origin $opts
''}/bin/bare-clone";
};
delta = {