mirror of
https://github.com/callumio/nixfiles.git
synced 2025-12-17 03:29:20 +00:00
overhaul hypr, waybar, add trayscale, etc
This commit is contained in:
parent
af5a73e5df
commit
9bb638131b
12 changed files with 189 additions and 47 deletions
|
|
@ -73,7 +73,7 @@
|
|||
with mods.nixosModules;
|
||||
utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
inherit (mods) nixosModules;
|
||||
inherit (mods) homeManagerModules nixosModules;
|
||||
inherit (hosts) hosts;
|
||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
||||
channelsConfig.allowUnfree = true;
|
||||
|
|
|
|||
|
|
@ -7,20 +7,26 @@
|
|||
imports = [./programs ./services];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
services.trayscale.enable = true;
|
||||
|
||||
home = {
|
||||
username = "c";
|
||||
homeDirectory = "/home/c";
|
||||
};
|
||||
gtk.enable = true;
|
||||
gtk.iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnome.adwaita-icon-theme
|
||||
networkmanagerapplet
|
||||
libsecret
|
||||
bitwarden
|
||||
betterbird
|
||||
wl-clipboard
|
||||
(discord.override {
|
||||
withOpenASAR = true;
|
||||
})
|
||||
discord
|
||||
brightnessctl
|
||||
playerctl
|
||||
pwvucontrol
|
||||
|
|
|
|||
|
|
@ -4,6 +4,67 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
blueman-applet.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
udiskie = {
|
||||
enable = true;
|
||||
tray = "auto";
|
||||
};
|
||||
};
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
text_align = "center";
|
||||
color = "rgba(200, 200, 200, 1.0)";
|
||||
font_size = 40;
|
||||
font_family = "Noto Sans";
|
||||
rotate = 0;
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "Hi there, $USER";
|
||||
text_align = "center";
|
||||
color = "rgba(200, 200, 200, 1.0)";
|
||||
font_size = 25;
|
||||
font_family = "Noto Sans";
|
||||
rotate = 0;
|
||||
position = "0, 80";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
|
@ -117,18 +178,17 @@
|
|||
"$mainMod SHIFT, j, movewindow, d"
|
||||
''SHIFT, Print, exec, grim -g "$(slurp)" - | wl-copy''
|
||||
", Print, exec, grim - | wl-copy"
|
||||
"$mainMod, 0, exec, hyprlock"
|
||||
]
|
||||
++ (builtins.concatLists (builtins.genList (x: let
|
||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||
ws = x + 1;
|
||||
in [
|
||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
"$mainMod CTRL, ${ws}, moveworkspacetomonitor, ${
|
||||
toString (x + 1)
|
||||
} current"
|
||||
"$mainMod CTRL, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mainMod, ${toString ws}, workspace, ${toString ws}"
|
||||
"$mainMod SHIFT, ${toString ws}, movetoworkspace, ${toString ws}"
|
||||
"$mainMod CTRL, ${toString ws}, moveworkspacetomonitor, ${toString ws} current"
|
||||
"$mainMod CTRL, ${toString ws}, workspace, ${toString ws}"
|
||||
])
|
||||
10));
|
||||
9));
|
||||
|
||||
workspace = [
|
||||
"name:web, on-created-empty: firefox"
|
||||
|
|
@ -156,12 +216,12 @@
|
|||
];
|
||||
|
||||
exec = [
|
||||
"pkill wpaperd & sleep 0.5 && wpaperd"
|
||||
"pkill waybar & sleep 0.5 && waybar"
|
||||
"pkill mako & sleep 0.5 && mako"
|
||||
#"pkill wpaperd & sleep 0.5 && wpaperd"
|
||||
#"pkill waybar & sleep 0.5 && waybar"
|
||||
#"pkill mako & sleep 0.5 && mako"
|
||||
];
|
||||
|
||||
exec-once = ["blueman-tray" "mullvad-gui" "udiskie -t"];
|
||||
exec-once = ["mullvad-gui"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
hyprlandSupport = true;
|
||||
swaySupport = false;
|
||||
};
|
||||
systemd.enable = false;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
tooltip = false;
|
||||
};
|
||||
temperature = {
|
||||
thermal-zone = 0;
|
||||
thermal-zone = 5;
|
||||
format = "{icon} {temperatureC}°C";
|
||||
format-icons = [""];
|
||||
interval = 30;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ in {
|
|||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
gnome.adwaita-icon-theme
|
||||
wget
|
||||
fzf
|
||||
nil
|
||||
|
|
@ -45,9 +46,9 @@ in {
|
|||
|
||||
shells = with pkgs; [fish];
|
||||
|
||||
etc."greetd/environments".text = ''
|
||||
hyprland
|
||||
'';
|
||||
# etc."greetd/environments".text = ''
|
||||
# hyprland
|
||||
# '';
|
||||
};
|
||||
fonts.packages = with pkgs; [nerdfonts meslo-lgs-nf];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{inputs, ...}: {
|
||||
programs.hyprlock.enable = true;
|
||||
security.pam.services.hyprlock = {};
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
{
|
||||
|
|
@ -6,6 +8,7 @@
|
|||
fish.enable = false;
|
||||
};
|
||||
}
|
||||
inputs.self.homeManagerModules.trayscale
|
||||
];
|
||||
users.c = import ../../home;
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,29 @@
|
|||
seahorse.enable = true;
|
||||
nix-ld.enable = true;
|
||||
virt-manager.enable = true;
|
||||
nm-applet.enable = true;
|
||||
#nm-applet.enable = true;
|
||||
hyprland.enable = true;
|
||||
|
||||
regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
path = pkgs.fetchurl {
|
||||
url = "https://i.redd.it/jd1nuwsl0d121.jpg";
|
||||
sha256 = "sha256-ff3ajGVsay2dtHiHmO2MYlqCvexUQjGifMs/ofzuyvI=";
|
||||
};
|
||||
fit = "Contain";
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "Adwaita";
|
||||
font_name = "Cantarell 16";
|
||||
icon_theme_name = "Adwaita";
|
||||
theme_name = "Adwaita";
|
||||
};
|
||||
};
|
||||
cageArgs = ["-s" "-m" "last"];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
mullvad-vpn = {
|
||||
|
|
@ -29,17 +50,7 @@
|
|||
};
|
||||
|
||||
thermald.enable = true;
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session.command = ''
|
||||
${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||
--time \
|
||||
--asterisks \
|
||||
--user-menu \
|
||||
--cmd Hyprland
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
greetd.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,11 +67,7 @@ in {
|
|||
reverse_proxy /lidarr/* 127.0.0.1:8686
|
||||
reverse_proxy /bazarr/* 127.0.0.1:6767
|
||||
reverse_proxy /prowlarr/* 127.0.0.1:9696
|
||||
reverse_proxy /tdarr/* http://127.0.0.1:8265 {
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote}
|
||||
header_up X-Forwarded-For {remote}
|
||||
}
|
||||
reverse_proxy /tdarr/* 127.0.0.1:8265
|
||||
route /deluge/* {
|
||||
uri strip_prefix deluge
|
||||
reverse_proxy 127.0.0.1:8112 {
|
||||
|
|
@ -90,10 +86,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
homepage-dashboard = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
package = pkgs.jellyfin;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,21 @@
|
|||
{...}: {
|
||||
boot.loader = {
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
plymouth.enable = false;
|
||||
# consoleLogLevel = 0;
|
||||
# initrd.verbose = false;
|
||||
# kernelParams = [
|
||||
# "quiet"
|
||||
# "splash"
|
||||
# "boot.shell_on_fail"
|
||||
# "loglevel=3"
|
||||
# "rd.systemd.show_status=false"
|
||||
# "rd.udev.log_level=3"
|
||||
# "udev.log_priority=3"
|
||||
# ];
|
||||
};
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{utils}: let
|
||||
nixosModules = utils.lib.exportModules [
|
||||
./nix.nix
|
||||
./pinentry-fix.nix
|
||||
./hm.nix
|
||||
./boot.nix
|
||||
./deploy.nix
|
||||
|
|
@ -8,7 +9,11 @@
|
|||
./secret.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
homeManagerModules = utils.lib.exportModules [
|
||||
./trayscale.nix
|
||||
];
|
||||
sharedModules = with nixosModules; [
|
||||
pinentry-fix
|
||||
nix
|
||||
hm
|
||||
boot
|
||||
|
|
@ -16,4 +21,6 @@
|
|||
tailscale
|
||||
secret
|
||||
];
|
||||
in {inherit nixosModules sharedModules;}
|
||||
in {
|
||||
inherit nixosModules homeManagerModules sharedModules;
|
||||
}
|
||||
|
|
|
|||
8
modules/pinentry-fix.nix
Normal file
8
modules/pinentry-fix.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.dbus.packages = [pkgs.gcr];
|
||||
}
|
||||
40
modules/trayscale.nix
Normal file
40
modules/trayscale.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.trayscale;
|
||||
in {
|
||||
options.services.trayscale = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
"An unofficial GUI wrapper around the Tailscale CLI client.";
|
||||
package = mkPackageOption pkgs "trayscale" {};
|
||||
hideWindow = mkOption {
|
||||
description = "Whether to hide the trayscale window on startup.";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "services.trayscale" pkgs platforms.linux)
|
||||
];
|
||||
|
||||
systemd.user.services.trayscale = {
|
||||
Unit = {
|
||||
Description = "An unofficial GUI wrapper around the Tailscale CLI client";
|
||||
Requires = ["tray.target"];
|
||||
After = ["graphical-session-pre.target" "tray.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {WantedBy = ["graphical-session.target"];};
|
||||
Service.ExecStart =
|
||||
toString (["${cfg.package}/bin/trayscale"]
|
||||
++ optional cfg.hideWindow "--hide-window");
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue