Added logic to support both the laptop and desktop configurations for waybar
This commit is contained in:
@@ -83,11 +83,12 @@
|
|||||||
mercury = nixpkgs.lib.nixosSystem {
|
mercury = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
host = "mercury";
|
host = "mercury";
|
||||||
inherit self inputs username;
|
inherit self inputs scheme wallpaper username;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop
|
./hosts/laptop
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
nur.nixosModules.nur
|
nur.nixosModules.nur
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/installer
|
./hosts/installer
|
||||||
|
nixvim.nixosModules.nixvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
extraFigletFonts = pkgs.fetchFromGitHub {
|
extraFigletFonts = pkgs.fetchFromGitHub {
|
||||||
owner = "xero";
|
owner = "xero";
|
||||||
repo = "figlet-fonts";
|
repo = "figlet-fonts";
|
||||||
rev = "master";
|
rev = "master";
|
||||||
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
|
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
|
||||||
};
|
};
|
||||||
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
|
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
|
||||||
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
|
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
../../modules/sys/software/nixvim
|
|
||||||
];
|
];
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
host,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# Grocery list:
|
# Grocery list:
|
||||||
@@ -20,17 +21,25 @@ let
|
|||||||
"5" = "五";
|
"5" = "五";
|
||||||
"6" = "六";
|
"6" = "六";
|
||||||
};
|
};
|
||||||
persistent-workspaces = {
|
persistent-workspaces = if (host == "oganesson") then {
|
||||||
"HDMI-A-1" = [ 1 2 3 ];
|
"HDMI-A-1" = [ 1 2 3 ];
|
||||||
"DP-1" = [ 4 5 6 ];
|
"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
|
in
|
||||||
{
|
{
|
||||||
programs.waybar.settings.mainBar = {
|
programs.waybar.settings.mainBar = {
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
output = "DP-1";
|
output = builtins.elemAt monitors 0;
|
||||||
position = "top";
|
position = "top";
|
||||||
name = "mainBar";
|
name = "mainBar";
|
||||||
margin-left = 8;
|
margin-left = 8;
|
||||||
@@ -149,6 +158,7 @@ in
|
|||||||
|
|
||||||
clock = {
|
clock = {
|
||||||
format = "{:%I:%M %p}";
|
format = "{:%I:%M %p}";
|
||||||
|
tooltip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -158,7 +168,7 @@ in
|
|||||||
|
|
||||||
programs.waybar.settings.sideBar = {
|
programs.waybar.settings.sideBar = {
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
output = "HDMI-A-1";
|
output = if (host == "oganesson") then builtins.elemAt monitors 1 else "";
|
||||||
position = "right";
|
position = "right";
|
||||||
margin-top = 8;
|
margin-top = 8;
|
||||||
margin-right = 5;
|
margin-right = 5;
|
||||||
|
|||||||
@@ -11,15 +11,6 @@
|
|||||||
hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM=";
|
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 {
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "vim-sneak";
|
name = "vim-sneak";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
|||||||
Reference in New Issue
Block a user