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
|
|
@ -1,7 +1,21 @@
|
|||
{...}: {
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
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