Added logic to support both the laptop and desktop configurations for waybar

This commit is contained in:
pagedmov
2024-10-21 10:57:15 -04:00
parent e13e037e9a
commit 7f6bd833d4
4 changed files with 18 additions and 16 deletions

View File

@@ -83,11 +83,12 @@
mercury = nixpkgs.lib.nixosSystem {
specialArgs = {
host = "mercury";
inherit self inputs username;
inherit self inputs scheme wallpaper username;
};
modules = [
./hosts/laptop
stylix.nixosModules.stylix
nixvim.nixosModules.nixvim
nur.nixosModules.nur
];
};
@@ -99,6 +100,7 @@
};
modules = [
./hosts/installer
nixvim.nixosModules.nixvim
];
};
};

View File

@@ -23,7 +23,6 @@
in {
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
../../modules/sys/software/nixvim
];
nixpkgs.hostPlatform = "x86_64-linux";
system.stateVersion = "24.05";

View File

@@ -1,4 +1,5 @@
{
host,
...
}:
# Grocery list:
@@ -20,17 +21,25 @@ let
"5" = "";
"6" = "";
};
persistent-workspaces = {
persistent-workspaces = if (host == "oganesson") then {
"HDMI-A-1" = [ 1 2 3 ];
"DP-1" = [ 4 5 6 ];
} else {
"eDP-1" = [ 1 2 3 4 ];
};
};
monitors = if (host == "oganesson") then [
"DP-1"
"HDMI-A-1"
] else [
"eDP-1"
];
in
{
programs.waybar.settings.mainBar = {
layer = "bottom";
output = "DP-1";
output = builtins.elemAt monitors 0;
position = "top";
name = "mainBar";
margin-left = 8;
@@ -149,6 +158,7 @@ in
clock = {
format = "{:%I:%M %p}";
tooltip = false;
};
@@ -158,7 +168,7 @@ in
programs.waybar.settings.sideBar = {
layer = "bottom";
output = "HDMI-A-1";
output = if (host == "oganesson") then builtins.elemAt monitors 1 else "";
position = "right";
margin-top = 8;
margin-right = 5;

View File

@@ -11,15 +11,6 @@
hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM=";
};
})
(pkgs.vimUtils.buildVimPlugin {
name = "vim-markdown";
src = pkgs.fetchFromGitHub {
owner = "preservim";
repo = "vim-markdown";
rev = "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51";
hash = "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM=";
};
})
(pkgs.vimUtils.buildVimPlugin {
name = "vim-sneak";
src = pkgs.fetchFromGitHub {