Start restyling waybar, rename laptop to compact

This commit is contained in:
Evie Litherland-Smith 2023-07-12 16:43:18 +01:00
parent 9301993582
commit 9362212790
11 changed files with 271 additions and 189 deletions

View file

@ -7,7 +7,7 @@ build:
sudo nixos-rebuild build --flake . sudo nixos-rebuild build --flake .
debug: debug:
sudo nixos-rebuild build --flake . --show-trace sudo nixos-rebuild build --flake . --show-trace --refresh
switch: switch:
sudo nixos-rebuild switch --flake . sudo nixos-rebuild switch --flake .

View file

@ -15,19 +15,13 @@
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = { outputs = inputs: let
nixpkgs,
home-manager,
wallpapers,
neovim-nightly-overlay,
hyprland,
...
}: let
home-manager-config = { home-manager-config = {
imports = [home-manager.nixosModules.home-manager]; imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = false; useUserPackages = false;
extraSpecialArgs = {inputs = inputs;};
users.root = { users.root = {
imports = [./home/env/bash.nix ./home/env/starship.nix]; imports = [./home/env/bash.nix ./home/env/starship.nix];
home = { home = {
@ -88,8 +82,8 @@
}; };
in { in {
nixosConfigurations = { nixosConfigurations = {
Legion = nixpkgs.lib.nixosSystem { Legion = inputs.nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs { pkgs = import inputs.nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
}; };
@ -109,20 +103,20 @@
} }
]; ];
}; };
Vanguard = nixpkgs.lib.nixosSystem { Vanguard = inputs.nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs { pkgs = import inputs.nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ overlays = [
waybar-experimental-overlay waybar-experimental-overlay
neovim-nightly-overlay.overlay inputs.neovim-nightly-overlay.overlay
]; ];
}; };
modules = [ modules = [
home-manager-config home-manager-config
services services
chromium chromium
hyprland.nixosModules.default inputs.hyprland.nixosModules.default
./hosts/Vanguard ./hosts/Vanguard
./services/sshd ./services/sshd
./services/syncthing/Vanguard.nix ./services/syncthing/Vanguard.nix
@ -143,7 +137,7 @@
}; };
home-manager.users.xenia = { home-manager.users.xenia = {
imports = [ imports = [
hyprland.homeManagerModules.default inputs.hyprland.homeManagerModules.default
./home/personal.nix ./home/personal.nix
./home/desktop/hyprland ./home/desktop/hyprland
./home/desktop/waybar/main.nix ./home/desktop/waybar/main.nix
@ -156,76 +150,44 @@
}; };
programs.neovim.package = pkgs.neovim-nightly; programs.neovim.package = pkgs.neovim-nightly;
xdg.configFile."hypr/hyprpaper.conf".text = '' xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default} preload = ${inputs.wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default} wallpaper = ,${inputs.wallpapers.outputs.default}
''; '';
xdg.configFile."hypr/display.conf".text = '' xdg.configFile."hypr/display.conf".text = ''
monitor=DP-1,highrr,auto,1 monitor=DP-1,highrr,auto,1
monitor=DP-2,highrr,auto,1 monitor=DP-2,highrr,auto,1
monitor=HDMI-1,highres,auto,2 monitor=HDMI-1,highres,auto,2
monitor=HDMI-2,highres,auto,2 monitor=HDMI-2,highres,auto,2
monitor=,preferred,auto,auto '';
xdg.configFile."hypr/autostart.conf".text = ''
exec-once=gamescope -w 1920 -h 1080 -W 3840 -H 2160 -U -f --hdr-enabled -e -- steam -gamepadui exec-once=gamescope -w 1920 -h 1080 -W 3840 -H 2160 -U -f --hdr-enabled -e -- steam -gamepadui
''; '';
}; };
}) })
]; ];
}; };
Ronin = nixpkgs.lib.nixosSystem { Ronin = inputs.nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs { pkgs = import inputs.nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ overlays = [
waybar-experimental-overlay waybar-experimental-overlay
neovim-nightly-overlay.overlay inputs.neovim-nightly-overlay.overlay
]; ];
}; };
modules = [ modules = [
home-manager-config home-manager-config
services services
chromium chromium
hyprland.nixosModules.default inputs.hyprland.nixosModules.default
./hosts/Ronin ./hosts/Ronin
./services/syncthing/Ronin.nix ./services/syncthing/Ronin.nix
({pkgs, ...}: {
programs.hyprland.enable = true;
home-manager.users.elitherl = {
imports = [
hyprland.homeManagerModules.default
./home/work.nix
./home/desktop/hyprland
./home/desktop/waybar/main.nix
./home/desktop/waybar/laptop.nix
./home/gui
];
home = {
username = "elitherl";
homeDirectory = "/home/elitherl";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
programs.waybar.settings = {
main."output" = "DP-5";
compact."output" = ["eDP-1" "DP-3"];
};
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
xdg.configFile."hypr/display.conf".text = ''
monitor=desc:Iiyama North America PLB2403WS 0574281251316,1920x1200@60,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,1920x1080@60,1920x0,1,transform,1
monitor=eDP-1,1920x1080@60,640x1385,1.5
monitor=,preferred,auto,auto
'';
};
})
]; ];
}; };
}; };
homeConfigurations = { homeConfigurations = {
"tux@Monarch" = home-manager.lib.homeManagerConfiguration { "tux@Monarch" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."aarch64-darwin"; pkgs = inputs.nixpkgs.legacyPackages."aarch64-darwin";
modules = [ modules = [
({pkgs, ...}: { ({pkgs, ...}: {
imports = [./home/personal.nix ./home/gui/wezterm.nix]; imports = [./home/personal.nix ./home/gui/wezterm.nix];
@ -248,8 +210,8 @@
}) })
]; ];
}; };
"xenia@Northstar" = home-manager.lib.homeManagerConfiguration { "xenia@Northstar" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."aarch64-linux"; pkgs = inputs.nixpkgs.legacyPackages."aarch64-linux";
modules = [ modules = [
{ {
imports = [./home/personal.nix]; imports = [./home/personal.nix];

View file

@ -1,4 +1,5 @@
{ {
inputs,
pkgs, pkgs,
lib, lib,
config, config,
@ -24,7 +25,7 @@
}; };
in { in {
imports = [ imports = [
../eww # ../eww
../waybar ../waybar
../rofi ../rofi
../swaylock.nix ../swaylock.nix
@ -54,8 +55,11 @@ in {
}; };
extraConfig = builtins.readFile ./hyprland.conf; extraConfig = builtins.readFile ./hyprland.conf;
}; };
xdg.configFile."hypr/display.conf".text = lib.mkDefault '' xdg.configFile."hypr/hyprpaper.conf".text = lib.mkDefault ''
monitor=,preferred,auto,auto preload = ${inputs.wallpapers.outputs.default}
wallpaper = ,${inputs.wallpapers.outputs.default}
''; '';
xdg.configFile."hypr/macchiato.conf".source = ./macchiato.conf; xdg.configFile."hypr/macchiato.conf".source = ./macchiato.conf;
xdg.configFile."hypr/display.conf".text = lib.mkDefault '''';
xdg.configFile."hypr/autostart.conf".text = lib.mkDefault '''';
} }

View file

@ -1,8 +1,12 @@
source = ./macchiato.conf
source = ./display.conf
source = ./autostart.conf
exec-once = dunst exec-once = dunst
exec-once = hyprpaper exec-once = hyprpaper
exec-once = waybar exec-once = waybar
source = ./macchiato.conf
source = ./display.conf monitor=,preferred,auto,auto
env = XDG_CURRENT_DESKTOP=Hyprland env = XDG_CURRENT_DESKTOP=Hyprland
env = XDG_SESSION_TYPE=wayland env = XDG_SESSION_TYPE=wayland
@ -26,11 +30,12 @@ input {
general { general {
gaps_in = 5 gaps_in = 5
gaps_out = 20 gaps_out = 20
border_size = 2 border_size = 3
col.active_border = $mauve col.active_border = $mauve
col.group_border_active = $mauve col.group_border_active = $mauve
col.inactive_border = $surface2 col.inactive_border = $surface2
col.group_border = $surface2 col.group_border = $surface2
cursor_inactive_timeout = 5
layout = dwindle layout = dwindle
} }
@ -49,7 +54,6 @@ decoration {
drop_shadow = yes drop_shadow = yes
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = $base
} }
animations { animations {

View file

@ -3,11 +3,6 @@
programs.waybar.settings.compact = { programs.waybar.settings.compact = {
layer = "top"; layer = "top";
position = "top"; position = "top";
spacing = 10;
margin-top = 10;
margin-left = 20;
margin-right = 20;
margin-bottom = 5;
"modules-left" = [ "modules-left" = [
"wlr/workspaces" "wlr/workspaces"
"cpu" "cpu"

View file

@ -3,11 +3,6 @@
programs.waybar.settings.main = { programs.waybar.settings.main = {
layer = "top"; layer = "top";
position = "top"; position = "top";
spacing = 10;
margin-top = 10;
margin-left = 20;
margin-right = 20;
margin-bottom = 5;
"modules-left" = [ "modules-left" = [
"wlr/workspaces" "wlr/workspaces"
"cpu" "cpu"

View file

@ -32,120 +32,24 @@
* { * {
border: none; border: none;
border-radius: 10px; border-radius: 10px;
background: transparent;
color: @text;
font-family: "FiraCode Nerd Font"; font-family: "FiraCode Nerd Font";
font-size: 18px; font-size: 18px;
} }
window#waybar { .modules-left,
background: transparent; .modules-center,
} .modules-right {
window#waybar.hidden { background: @base;
opacity: 0.2; border: 3px solid @mauve;
} color: @text;
#window {
margin-top: 6px;
padding-left: 10px;
padding-right: 10px;
border-radius: 10px;
transition: none;
color: transparent;
background: transparent;
} }
#workspaces button { tooltip {
transition: none; background: rgba(43, 48, 59, 0.5);
color: @overlay0; border: 3px solid rgba(100, 114, 125, 0.5);
box-shadow: inset 0 -3px transparent;
border-radius: 2px;
} }
#workspaces button.active, tooltip label {
#workspaces button.focused { color: white;
color: @base;
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: @base;
border-color: #e8a2af;
color: @base;
}
#workspaces button.focused:hover {
color: @base;
}
/* left section */
#workspaces,
#cpu,
#memory,
#temperature,
/* centre section */
#clock,
/* right section */
#pulseaudio,
#bluetooth,
#network,
#backlight,
#battery,
#tray {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding-left: 10px;
padding-right: 10px;
transition: none;
color: @crust;
background: @lavender;
}
#workspaces {
background: @lavender;
}
#cpu {
background: @pink;
}
#memory {
background: @mauve;
}
#temperature {
background: @red;
}
#clock {
background: @yellow;
}
#pulseaudio {
background: @green;
}
#bluetooth {
background: @teal;
}
#network {
background: @sky;
}
#backlight {
background: @sapphire;
}
#battery {
background: @blue;
}
#battery.charging,
#battery.plugged {
background-color: @blue;
}
#battery.critical:not(.charging) {
background-color: @blue;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
to {
color: @red;
}
}
#tray {
color: @base;
} }

View file

@ -0,0 +1,151 @@
@define-color base #24273a;
@define-color mantle #1e2030;
@define-color crust #181926;
@define-color text #cad3f5;
@define-color subtext0 #a5adcb;
@define-color subtext1 #b8c0e0;
@define-color surface0 #363a4f;
@define-color surface1 #494d64;
@define-color surface2 #5b6078;
@define-color overlay0 #6e738d;
@define-color overlay1 #8087a2;
@define-color overlay2 #939ab7;
@define-color blue #8aadf4;
@define-color lavender #b7bdf8;
@define-color sapphire #7dc4e4;
@define-color sky #91d7e3;
@define-color teal #8bd5ca;
@define-color green #a6da95;
@define-color yellow #eed49f;
@define-color peach #f5a97f;
@define-color maroon #ee99a0;
@define-color red #ed8796;
@define-color mauve #c6a0f6;
@define-color pink #f5bde6;
@define-color flamingo #f0c6c6;
@define-color rosewater #f4dbd6;
* {
border: none;
border-radius: 10px;
font-family: "FiraCode Nerd Font";
font-size: 18px;
}
window#waybar {
background: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
#window {
margin-top: 6px;
padding-left: 10px;
padding-right: 10px;
border-radius: 10px;
transition: none;
color: transparent;
background: transparent;
}
#workspaces button {
transition: none;
color: @overlay0;
box-shadow: inset 0 -3px transparent;
border-radius: 2px;
}
#workspaces button.active,
#workspaces button.focused {
color: @base;
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: @base;
border-color: #e8a2af;
color: @base;
}
#workspaces button.focused:hover {
color: @base;
}
/* left section */
#workspaces,
#cpu,
#memory,
#temperature,
/* centre section */
#clock,
/* right section */
#pulseaudio,
#bluetooth,
#network,
#backlight,
#battery,
#tray {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding-left: 10px;
padding-right: 10px;
transition: none;
color: @crust;
background: @lavender;
}
#workspaces {
background: @lavender;
}
#cpu {
background: @pink;
}
#memory {
background: @mauve;
}
#temperature {
background: @red;
}
#clock {
background: @yellow;
}
#pulseaudio {
background: @green;
}
#bluetooth {
background: @teal;
}
#network {
background: @sky;
}
#backlight {
background: @sapphire;
}
#battery {
background: @blue;
}
#battery.charging,
#battery.plugged {
background-color: @blue;
}
#battery.critical:not(.charging) {
background-color: @blue;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
to {
color: @red;
}
}
#tray {
color: @base;
}

View file

@ -38,6 +38,8 @@ in {
extraGroups = ["networkmanager" "wheel"]; extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish; shell = pkgs.fish;
}; };
home-manager.users.elitherl = import ./home.nix;
programs.hyprland.enable = true;
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = { settings = {

34
hosts/Ronin/home.nix Normal file
View file

@ -0,0 +1,34 @@
{
pkgs,
inputs,
...
}: {
imports = [
inputs.hyprland.homeManagerModules.default
# ../../pkgs/eww-hyprland
../../home/work.nix
../../home/desktop/hyprland
../../home/desktop/waybar/main.nix
../../home/desktop/waybar/compact.nix
../../home/gui
];
home = {
username = "elitherl";
homeDirectory = "/home/elitherl";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
# programs.eww-hyprland = {
# enable = true;
# package = pkgs.eww-wayland;
# };
programs.waybar.settings = {
main."output" = "DP-5";
compact."output" = ["eDP-1" "DP-3"];
};
xdg.configFile."hypr/display.conf".text = ''
monitor=desc:Iiyama North America PLB2403WS 0574281251316,1920x1200@60,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,1920x1080@60,1920x0,1,transform,1
monitor=eDP-1,1920x1080@60,640x1385,1.5
'';
}

View file

@ -1,4 +1,4 @@
{...}: { {pkgs, ...}: {
nix = { nix = {
settings.experimental-features = ["nix-command" "flakes"]; settings.experimental-features = ["nix-command" "flakes"];
gc = { gc = {
@ -24,7 +24,38 @@
fish.enable = true; fish.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
fonts.fontconfig.enable = true; fonts = {
fonts = with pkgs; [
# icon fonts
material-symbols
# normal fonts
jost
lexend
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
# nerdfonts
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
];
# use fonts specified by user rather than default ones
enableDefaultFonts = false;
fontconfig = {
enable = true;
# user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
defaultFonts = {
serif = ["Noto Serif" "Noto Color Emoji"];
sansSerif = ["Noto Sans" "Noto Color Emoji"];
monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
};
environment = { environment = {
localBinInPath = true; localBinInPath = true;
shellAliases = { shellAliases = {