Compare commits

..

11 Commits

7 changed files with 162 additions and 93 deletions

42
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753592768, "lastModified": 1756679287,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", "narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fc3add429f21450359369af74c2375cb34a2d204", "rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741303672, "lastModified": 1756852730,
"narHash": "sha256-eRKbKccBu3PK/oJpmUuLo+0v45d0SEjosE8tVsHbpeA=", "narHash": "sha256-qPere4RBHoZxiEGl8zXU8gjroZg4gkYGEwaAbKmL4vE=",
"owner": "musnix", "owner": "musnix",
"repo": "musnix", "repo": "musnix",
"rev": "d56a15f30329f304151e4e05fa82264d127da934", "rev": "7ccc92050e43dc92309396c6f2fe1f542214a242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -43,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1755593991, "lastModified": 1756754095,
"narHash": "sha256-BA9MuPjBDx/WnpTJ0EGhStyfE7hug8g85Y3Ju9oTsM4=", "narHash": "sha256-9Rsn9XEWINExosFkKEqdp8EI6Mujr1gmQiyrEcts2ls=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a58390ab6f1aa810eb8e0f0fc74230e7cc06de03", "rev": "7c815e513adbf03c9098b2bd230c1e0525c8a7f9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -59,11 +59,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1755615617, "lastModified": 1756787288,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4", "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,7 +79,8 @@
"musnix": "musnix", "musnix": "musnix",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix",
"wrapper-manager": "wrapper-manager"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -101,6 +102,21 @@
"repo": "sops-nix", "repo": "sops-nix",
"type": "github" "type": "github"
} }
},
"wrapper-manager": {
"locked": {
"lastModified": 1751998186,
"narHash": "sha256-np2RxS8tRz/jGfUSYKxzg7cCi4dS8PL8gutLZfPMbIY=",
"owner": "viperML",
"repo": "wrapper-manager",
"rev": "8ad2484b485acad0632cb0af15b5eb704e3c1d0a",
"type": "github"
},
"original": {
"owner": "viperML",
"repo": "wrapper-manager",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -13,6 +13,8 @@
musnix.url = "github:musnix/musnix"; musnix.url = "github:musnix/musnix";
musnix.inputs.nixpkgs.follows = "nixpkgs"; musnix.inputs.nixpkgs.follows = "nixpkgs";
wrapper-manager.url = "github:viperML/wrapper-manager";
}; };
outputs = { outputs = {

View File

@@ -2,6 +2,7 @@
lib, lib,
config, config,
pkgs, pkgs,
inputs,
... ...
}: let }: let
cfg = config.myConfig.programs; cfg = config.myConfig.programs;
@@ -22,6 +23,18 @@ in {
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
(inputs.wrapper-manager.lib.wrapWith pkgs {
basePackage = element-desktop;
prependFlags = ["--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" "--ozone-platform=wayland"];
})
(inputs.wrapper-manager.lib.wrapWith pkgs {
basePackage = discord;
prependFlags = ["--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" "--ozone-platform=wayland"];
})
(inputs.wrapper-manager.lib.wrapWith pkgs {
basePackage = obsidian;
prependFlags = ["--enable-features=UseOzonePlatform" "--ozone-platform=wayland"];
})
unzip unzip
firefox firefox
xournalpp xournalpp
@@ -37,7 +50,6 @@ in {
sops sops
pwvucontrol pwvucontrol
qpwgraph qpwgraph
discord
libreoffice-fresh libreoffice-fresh
mate.caja mate.caja
mate.atril mate.atril
@@ -47,15 +59,14 @@ in {
wine wine
prusa-slicer prusa-slicer
kicad kicad
element-desktop
chromium chromium
wl-clipboard wl-clipboard
gimp gimp
godot_4 godot_4
ripgrep-all ripgrep-all
flatpak flatpak
obsidian
marksman marksman
alejandra
]; ];
}; };
} }

View File

@@ -23,7 +23,6 @@ return {
cargo = { cargo = {
buildScripts = { enable = true }, buildScripts = { enable = true },
allFeatures = false, allFeatures = false,
extraArgs = { "--release" },
}, },
installCargo = false, installCargo = false,
installRustc = false, installRustc = false,

View File

@@ -9,20 +9,20 @@
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" '' rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
# PREV_ORIENTATION and ORIENTATION are given by rot8 # PREV_ORIENTATION and ORIENTATION are given by rot8
LISGD_INPUT=/dev/input/event14 LISGD_INPUT=/dev/input/by-path/platform-AMDI0010:02-event
# open nwggrid by swiping up from the bottom edge # open nwggrid by swiping down with 3 fingers
LISGD_ACTIONS=("1,DU,B,*,R,${pkgs.sway}/bin/swaymsg exec ${pkgs.nwg-launchers}/bin/nwggrid -client") LISGD_ACTIONS=("3,UD,*,*,R,${pkgs.nwg-launchers}/bin/nwggrid -client")
# close window by swiping down with 3 fingers # close window by swiping up with 3 fingers
LISGD_ACTIONS+=("3,UD,*,L,R,${pkgs.sway}/bin/swaymsg kill") LISGD_ACTIONS+=("3,DU,*,M,R,${pkgs.sway}/bin/swaymsg kill")
# move window left by swiping left with 2 fingers # move window left by swiping left with 2 fingers
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move left") LISGD_ACTIONS+=("2,RL,*,*,R,${pkgs.sway}/bin/swaymsg move left")
# move window down by swiping down with 2 fingers # move window down by swiping down with 2 fingers
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move down") LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move down")
# move window up by swiping up with 2 fingers # move window up by swiping up with 2 fingers
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move up") LISGD_ACTIONS+=("2,DU,*,*,R,${pkgs.sway}/bin/swaymsg move up")
# move window right by swiping right with 2 fingers # move window right by swiping right with 2 fingers
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move right") LISGD_ACTIONS+=("2,LR,*,*,R,${pkgs.sway}/bin/swaymsg move right")
LISGD_ACTION_OPTIONS=() LISGD_ACTION_OPTIONS=()
for str in "''${LISGD_ACTIONS[@]}"; do for str in "''${LISGD_ACTIONS[@]}"; do
@@ -93,31 +93,11 @@ in {
output = let output = let
bgdir = ../../../assets; bgdir = ../../../assets;
bg1080 = bgdir + "/bg1080.png"; bg1080 = bgdir + "/bg1080.png";
bg1080vert = bgdir + "/bg1080vert.png";
bg4k = bgdir + "/bg4k.png";
in in
lib.mkIf cfg.laptop { lib.mkIf cfg.laptop {
eDP-1 = { eDP-1 = {
bg = "'${bg1080}' fit"; bg = "'${bg1080}' fit";
}; };
HDMI-A-1 = {
bg = "'${bg4k}' fit";
};
DP-3 = {
bg = "'${bg1080}' fit";
};
DP-4 = {
bg = "'${bg1080}' fit";
};
DP-5 = {
bg = "'${bg1080vert}' fit";
};
DP-6 = {
bg = "'${bg1080}' fit";
};
DP-7 = {
bg = "'${bg1080vert}' fit";
};
}; };
input = { input = {
@@ -185,6 +165,7 @@ in {
{app_id = "thunderbird";} {app_id = "thunderbird";}
{app_id = "discord";} {app_id = "discord";}
{app_id = "Element";} {app_id = "Element";}
{class = "Element";}
]; ];
"music" = [{app_id = "org.rncbc.qpwgraph";}]; "music" = [{app_id = "org.rncbc.qpwgraph";}];
"obsidian" = [{app_id = "obsidian";} {class = "obsidian";}]; "obsidian" = [{app_id = "obsidian";} {class = "obsidian";}];
@@ -228,27 +209,21 @@ in {
workspaceOutputAssign = lib.mkIf cfg.laptop [ workspaceOutputAssign = lib.mkIf cfg.laptop [
{ {
workspace = "main"; workspace = "main";
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
} }
{ {
workspace = "term"; workspace = "term";
output = ["DP-5" "DP-4" "DP-7" "eDP-1"];
} }
{ {
workspace = "msg"; workspace = "msg";
output = ["eDP-1"];
} }
{ {
workspace = "music"; workspace = "music";
output = ["eDP-1"];
} }
{ {
workspace = "5"; workspace = "5";
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
} }
{ {
workspace = "obsidian"; workspace = "obsidian";
output = ["eDP-1"];
} }
]; ];

View File

@@ -17,33 +17,52 @@ in {
bg1080 = bgdir + "/bg1080.png"; bg1080 = bgdir + "/bg1080.png";
bg1080vert = bgdir + "/bg1080vert.png"; bg1080vert = bgdir + "/bg1080vert.png";
bg4k = bgdir + "/bg4k.png"; bg4k = bgdir + "/bg4k.png";
sway_commands = commands: "${pkgs.sway}/bin/swaymsg '${lib.strings.concatStringsSep ", " commands}'";
workspace = workspace: monitor: [
''workspace "${workspace}" output "${monitor}"''
''workspace --no-auto-back-and-forth ${workspace}''
''move workspace to "${monitor}"''
];
luhbots_workstation = settings: { luhbots_workstation = settings: {
profile.outputs = [ profile.outputs = [
{ {
criteria = "eDP-1"; criteria = "eDP-1";
position = if settings.vertical.left then "1080,1080" else "0,1080"; position =
} if settings.vertical.left
{ then "1080,1080"
criteria = settings.horizontal.name; else "0,1080";
position = if settings.vertical.left then "1080,0" else "0,0"; }
} {
{ criteria = settings.horizontal.name;
criteria = settings.vertical.name; position =
transform = settings.vertical.orientation; if settings.vertical.left
position = if settings.vertical.left then "0,0" else "1920,0"; then "1080,0"
} else "0,0";
]; }
profile.exec = [ {
"${pkgs.sway}/bin/swaymsg 'workspace \"main\" output \"${settings.horizontal.name}\", workspace --no-auto-back-and-forth main, move workspace to \"${settings.horizontal.name}\", workspace back_and_forth'" criteria = settings.vertical.name;
"${pkgs.sway}/bin/swaymsg 'workspace \"term\" output \"${settings.vertical.name}\", workspace --no-auto-back-and-forth term, move workspace to \"${settings.vertical.name}\", workspace back_and_forth'" transform = settings.vertical.orientation;
"${pkgs.sway}/bin/swaymsg 'workspace \"msg\" output eDP-1, workspace --no-auto-back-and-forth msg, move workspace to eDP-1, workspace back_and_forth'" position =
"${pkgs.sway}/bin/swaymsg 'workspace \"msg\" output eDP-1, workspace --no-auto-back-and-forth music, move workspace to eDP-1, workspace back_and_forth'" if settings.vertical.left
"${pkgs.sway}/bin/swaymsg 'workspace \"5\" output \"${settings.horizontal.name}\", workspace --no-auto-back-and-forth 5, move workspace to \"${settings.horizontal.name}\", workspace back_and_forth'" then "0,0"
"${pkgs.sway}/bin/swaymsg 'output \"eDP-1\" bg ${bg1080} fit'" else "1920,0";
"${pkgs.sway}/bin/swaymsg 'output \"${settings.horizontal.name}\" bg ${bg4k} fit'" }
"${pkgs.sway}/bin/swaymsg 'output \"${settings.vertical.name}\" bg ${bg1080vert} fit'" ];
"${pkgs.sway}/bin/swaymsg 'workspace --no-auto-back-and-forth msg, workspace --no-auto-back-and-forth term, workspace --no-auto-back-and-forth main'" profile.exec = [
]; (sway_commands (
[
"output eDP-1 bg ${bg1080} fit"
"output \"${settings.horizontal.name}\" bg ${bg4k} fit"
"output \"${settings.vertical.name}\" bg ${bg1080vert} fit"
]
++ (workspace "obsidian" settings.horizontal.name)
++ (workspace "5" settings.horizontal.name)
++ (workspace "music" "eDP-1")
++ (workspace "msg" "eDP-1")
++ (workspace "term" settings.vertical.name)
++ (workspace "main" settings.horizontal.name)
))
];
}; };
in { in {
enable = true; enable = true;
@@ -121,6 +140,14 @@ in {
orientation = "270"; orientation = "270";
}; };
}) })
(luhbots_workstation {
horizontal.name = "Dell Inc. DELL P2422HE 4BXL9M3";
vertical = {
name = "NEC Corporation E243WMi 75309334NB";
left = true;
orientation = "90";
};
})
{ {
profile.name = "docked-4k"; profile.name = "docked-4k";
profile.outputs = [ profile.outputs = [
@@ -136,11 +163,15 @@ in {
} }
]; ];
profile.exec = [ profile.exec = [
"${pkgs.sway}/bin/swaymsg workspace main; move workspace to HDMI-A-1; workspace back_and_forth" (sway_commands
"${pkgs.sway}/bin/swaymsg workspace term; move workspace to eDP-1; workspace back_and_forth" (
"${pkgs.sway}/bin/swaymsg workspace msg; move workspace to eDP-1; workspace back_and_forth" (workspace "obsidian" "HDMI-A-1")
"${pkgs.sway}/bin/swaymsg workspace music; move workspace to eDP-1; workspace back_and_forth" ++ (workspace "5" "HDMI-A-1")
"${pkgs.sway}/bin/swaymsg workspace 5; move workspace to HDMI-A-1; workspace back_and_forth" ++ (workspace "music" "eDP-1")
++ (workspace "msg" "eDP-1")
++ (workspace "term" "eDP-1")
++ (workspace "main" "HDMI-A-1")
))
]; ];
} }
{ {
@@ -155,12 +186,17 @@ in {
} }
]; ];
profile.exec = [ profile.exec = [
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth main; move workspace to eDP-1; workspace back_and_forth" (sway_commands
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth term; move workspace to eDP-1; workspace back_and_forth" (
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth msg; move workspace to eDP-1; workspace back_and_forth" (workspace "mirror" "HDMI-A-1")
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth music; move workspace to eDP-1; workspace back_and_forth" ++ ["exec ${pkgs.wl-mirror}/bin/wl-present mirror eDP-1 --fullscreen-output HDMI-A-1 --fullscreen"]
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth 5; move workspace to eDP-1; workspace back_and_forth" ++ (workspace "obsidian" "eDP-1")
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth mirror; move workspace to HDMI-A-1; exec ${pkgs.wl-mirror}/bin/wl-mirror eDP-1; workspace back_and_forth" ++ (workspace "5" "eDP-1")
++ (workspace "music" "eDP-1")
++ (workspace "msg" "eDP-1")
++ (workspace "term" "eDP-1")
++ (workspace "main" "eDP-1")
))
]; ];
} }
{ {
@@ -175,11 +211,37 @@ in {
} }
]; ];
profile.exec = [ profile.exec = [
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth main; move workspace to '\"ViewSonic Corporation VG2448 V5E201864188\"'; workspace back_and_forth" (sway_commands
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth term; move workspace to eDP-1; workspace back_and_forth" (
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth msg; move workspace to eDP-1; workspace back_and_forth" (workspace "obsidian" "ViewSonic Corporation VG2448 V5E201864188")
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth music; move workspace to eDP-1; workspace back_and_forth" ++ (workspace "5" "ViewSonic Corporation VG2448 V5E201864188")
"${pkgs.sway}/bin/swaymsg workspace --no-auto-back-and-forth 5; move workspace to '\"ViewSonic Corporation VG2448 V5E201864188\"'; workspace back_and_forth" ++ (workspace "music" "eDP-1")
++ (workspace "msg" "eDP-1")
++ (workspace "term" "eDP-1")
++ (workspace "main" "ViewSonic Corporation VG2448 V5E201864188")
))
];
}
{
profile.outputs = [
{
criteria = "eDP-1";
position = "1920,0";
}
{
criteria = "ASUSTek COMPUTER INC ASUS MB16AH R4LMTF099783";
position = "0,0";
}
];
profile.exec = [
(sway_commands (
(workspace "obsidian" "eDP-1")
++ (workspace "5" "eDP-1")
++ (workspace "music" "ASUSTek COMPUTER INC ASUS MB16AH R4LMTF099783")
++ (workspace "msg" "ASUSTek COMPUTER INC ASUS MB16AH R4LMTF099783")
++ (workspace "term" "ASUSTek COMPUTER INC ASUS MB16AH R4LMTF099783")
++ (workspace "main" "eDP-1")
))
]; ];
} }
]; ];

View File

@@ -144,5 +144,9 @@ in {
}; };
style = ./waybar.css; style = ./waybar.css;
}; };
home.packages = with pkgs;
lib.mkIf cfg.squeekboard [
glib
];
}; };
} }