Skip to content

Commit

Permalink
feat: vertical bar
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Dec 8, 2023
1 parent 569e9b0 commit 8c9eeb0
Show file tree
Hide file tree
Showing 13 changed files with 163 additions and 335 deletions.
252 changes: 20 additions & 232 deletions flake.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
shadower = {
url = "github:n3oney/shadower";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
53 changes: 24 additions & 29 deletions home/cli/helix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@
}: {
programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.hostPlatform.system}.default.overrideAttrs (self: {
makeWrapperArgs = with pkgs;
self.makeWrapperArgs
or []
++ [
"--suffix"
"PATH"
":"
(lib.makeBinPath [
clang-tools
nil
luajitPackages.lua-lsp
typst-lsp
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
nodePackages.prettier
black
alejandra
shellcheck
])
];
});
# package = inputs.helix.packages.${pkgs.hostPlatform.system}.default.overrideAttrs (self: {
# makeWrapperArgs = with pkgs;
# self.makeWrapperArgs
# or []
# ++ [
# "--suffix"
# "PATH"
# ":"
# (lib.makeBinPath [
# clang-tools
# nil
# luajitPackages.lua-lsp
# typst-lsp
# nodePackages.bash-language-server
# nodePackages.vscode-css-languageserver-bin
# nodePackages.vscode-langservers-extracted
# nodePackages.prettier
# black
# alejandra
# shellcheck
# ])
# ];
# });

settings = {
theme = "catppuccin_mocha_transparent";
Expand Down Expand Up @@ -57,20 +57,15 @@
idle-timeout = 1;
line-number = "relative";
scrolloff = 5;
rainbow-brackets = true;
# rainbow-brackets = true;
completion-replace = true;
cursor-word = true;
bufferline = "always";
true-color = true;
rulers = [80];
soft-wrap.enable = true;
indent-guides = {
render = true;
};
sticky-context = {
enable = false;
indicator = false;
};
lsp = {
display-messages = true;
display-inlay-hints = true;
Expand Down
2 changes: 1 addition & 1 deletion home/rice/foot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
title = "foot";
locked-title = "no";
term = "xterm-256color";
font = "monospace:size=13.5";
font = "monospace:size=10.5";
vertical-letter-offset = "-0.75";
pad = "32x32";
notify = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
Expand Down
28 changes: 10 additions & 18 deletions home/rice/waybar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ in {
settings = {
mainBar = {
layer = "top";
position = "left";
width = 55;
position = "top";
height= 38;
spacing = 7;
fixed-center = false;
margin-left = null;
Expand All @@ -31,16 +31,11 @@ in {
"custom/search"
"hyprland/workspaces"
"custom/lock"
"custom/crypto"
"backlight"
"battery"
# "custom/eth"
];
modules-center = [
"custom/weather"
"clock"
];
modules-right = ["pulseaudio" "network" "custom/swallow" "custom/power"];
modules-right = ["custom/weather" "pulseaudio" "network" "clock" "custom/power"];
"hyprland/workspaces" = {
on-click = "activate";
format = "{icon}";
Expand Down Expand Up @@ -146,15 +141,13 @@ in {
format = "󰐥";
};
clock = {
format = ''
{:%H
%M}'';
format = "{:%H:%M}";
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
};
backlight = {
format = "{icon}";
format = "{icon} {percent}%";
format-icons = ["" "" "" "" "" "" "" "" ""];
};
cpu = {
Expand All @@ -167,15 +160,14 @@ in {
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = "";
format-plugged = "";
format-charging = "󰂄";
format-alt = "{icon} {capacity}%";
format-icons = ["" "" "" "" "" "" "" "" "" "" "" ""];
format-icons = [ "󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
};
network = let
nm-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
in {
format-wifi = "󰤨";
format-wifi = "󰤨 {signalStrength}%";
format-ethernet = "󰈀";
format-alt = "󱛇";
format-disconnected = "󰤭";
Expand All @@ -185,9 +177,9 @@ in {
pulseaudio = {
scroll-step = 5;
tooltip = true;
tooltip-format = "{volume}";
tooltip-format = "{volume}%";
on-click = "${pkgs.killall}/bin/killall pavucontrol || ${pkgs.pavucontrol}/bin/pavucontrol";
format = "{icon}";
format = "{icon} {volume}%";
format-muted = "󰝟 ";
format-icons = {
default = ["" "" " "];
Expand Down
39 changes: 8 additions & 31 deletions home/rice/waybar/style.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ in ''
window#waybar {
background-color: rgba(24, 24, 37, 0.65);
border-radius: 0px;
margin: 32px 16px;
/* margin: 32px 16px; */
color: #cdd6f4;
box-shadow: 2px 3px 2px 2px #151515;
font-size: 16px;
font-size: 13px;
/* transition-property: background-color; */
transition-property: background-color;
transition-duration: 0.5s;
Expand All @@ -28,13 +28,6 @@ in ''
#pulseaudio {
color: #a6d189;
padding: 5px 0px 5px 0px;
}
#pulseaudio.source-muted,
#pulseaudio.muted {
padding: 16px 0px 16px 0px;
font-size: 15;
}
#custom-vpn,
Expand All @@ -48,9 +41,8 @@ in ''
#clock {
font-weight: 700;
font-size: 20px;
font-family: "Iosevka Term";
padding: 5px 0px 5px 0px;
padding: 0px 5px 0px 5px;
}
#workspaces button {
Expand All @@ -70,9 +62,8 @@ in ''
#custom-power {
color: #f38ba8;
padding: 14px 0px 14px 0px;
padding: 0px 14px 0px 14px;
margin-bottom: 20px;
font-size: 24px;
}
#workspaces button.active {
Expand All @@ -98,22 +89,15 @@ in ''
#custom-crypto,
#volume,
#pulseaudio {
border-radius: 15px;
border-radius: 8px;
background-color: rgba(49, 50, 68, 0.35);
padding: 14px 0px 14px 0px;
margin: 0px 7px 0px 7px;
padding: 0px 14px 0px 14px;
margin: 3px 0px 3px 0px;
}
#custom-swallow {
color: #94e2d5;
}
#custom-weather {
padding-left: 6px;
}
#workspaces {
font-size: 18px;
}
#custom-crypto {
color: #89b4fa;
Expand All @@ -123,18 +107,11 @@ in ''
color: #89b4fa;
}
#custom-todo {
color: #bac2de;
padding-left: 2px;
}
#custom-search {
background-image: url("${snowflake}");
background-size: 65%;
margin-top: 35px;
padding-top: 15px;
margin: 5px;
background-position: center;
padding: 0 13px;
background-repeat: no-repeat;
}
#backlight {
Expand Down
2 changes: 1 addition & 1 deletion home/rice/waybar/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

# print waybar module data
out_data = {
"text": f"{icon}\n{temp}",
"text": f"{icon} {temp}",
"alt": status,
"tooltip": tooltip_text,
"class": status_code,
Expand Down
15 changes: 15 additions & 0 deletions hosts/calypso/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ ... }:

{
imports = [./hardware-configuration.nix];
services.tlp.enable = true;
services.tlp.extraConfig = ''
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
START_CHARGE_THRESH_BAT0=85
STOP_CHARGE_THRESH_BAT0=90
CPU_SCALING_GOVERNOR_ON_BAT=powersave
ENERGY_PERF_POLICY_ON_BAT=powersave
'';
services.fprintd.enable = true;
security.pam.services.login.fprintAuth = true;
}
69 changes: 69 additions & 0 deletions hosts/calypso/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];

fileSystems."/etc/ssh" = {
depends = ["/persist"];
neededForBoot = true;
};

boot.initrd.luks.devices.luksroot = {
device = "/dev/disk/by-label/NIXCRYPT";
preLVM = true;
allowDiscards = true;
};

boot.tmp.useTmpfs = true;

boot.initrd.availableKernelModules =
[
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
"dm_mod"
"dm_crypt"
"cryptd"
"input_leds"
]
++ config.boot.initrd.luks.cryptoModules;
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = ["size=8G" "mode=755"];
};

fileSystems."/persist" = {
neededForBoot = true;
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["noatime" "discard" "subvol=@persist" "compress=zstd"];
};

fileSystems."/nix" = {
neededForBoot = true;
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["noatime" "discard" "subvol=@nix" "compress=zstd"];
};

fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = ["noatime" "discard"];
};

swapDevices = [{device = "/dev/disk/by-label/swap";}];

hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}
5 changes: 4 additions & 1 deletion hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ in {
++ shared;
specialArgs = {inherit inputs;};
};

# thinkpad
calypso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
{networking.hostName = "calypso";}
./calypso/hardware-configuration.nix
./calypso
bootloader
nvidia
wayland
hmModule
hw.lenovo-thinkpad-x1-7th-gen
{inherit home-manager;}
]
++ shared;
Expand Down
Loading

0 comments on commit 8c9eeb0

Please sign in to comment.