Format everything with alejandra

This commit is contained in:
Toast 2024-03-20 12:54:25 +01:00
parent 82bbd7ce87
commit 7888103b1e
100 changed files with 2827 additions and 2756 deletions

View file

@ -1,12 +1,10 @@
{ ... }:
{
imports = [
./ssh-agent.nix
./flatpak.nix
./syncthing.nix
./pipewire.nix
./printing.nix
./networkmanager.nix
];
{...}: {
imports = [
./ssh-agent.nix
./flatpak.nix
./syncthing.nix
./pipewire.nix
./printing.nix
./networkmanager.nix
];
}

View file

@ -1,19 +1,22 @@
{ config, pkgs, flakeSelf, ... }:
{
services.flatpak.enable = true;
config,
pkgs,
flakeSelf,
...
}: {
services.flatpak.enable = true;
home-manager = {
sharedModules = [{ imports = [ flakeSelf.inputs.nix-flatpak.homeManagerModules.nix-flatpak ]; }];
users.toast = {
services.flatpak = {
packages = [ "tv.plex.PlexDesktop" ];
uninstallUnmanagedPackages = true;
update.auto = {
enable = true;
onCalendar = "weekly";
};
};
};
};
home-manager = {
sharedModules = [{imports = [flakeSelf.inputs.nix-flatpak.homeManagerModules.nix-flatpak];}];
users.toast = {
services.flatpak = {
packages = ["tv.plex.PlexDesktop"];
uninstallUnmanagedPackages = true;
update.auto = {
enable = true;
onCalendar = "weekly";
};
};
};
};
}

View file

@ -1,10 +1,6 @@
{ config, ... }:
let
{config, ...}: let
tailscaleName = config.services.tailscale.interfaceName;
in
{
in {
networking.networkmanager = {
enable = true;
unmanaged = [

View file

@ -1,11 +1,9 @@
{ config, ... }:
{config, ...}: {
services.pipewire = {
enable = true;
pulse.enable = true;
};
{
services.pipewire = {
enable = true;
pulse.enable = true;
};
# This allows pipewire to get realtime priority, which (hopefully) gets rid of stutters
security.rtkit.enable = true;
# This allows pipewire to get realtime priority, which (hopefully) gets rid of stutters
security.rtkit.enable = true;
}

View file

@ -1,9 +1,7 @@
{ config, ... }:
{
services.printing = {
enable = true;
startWhenNeeded = true;
stateless = true;
};
{config, ...}: {
services.printing = {
enable = true;
startWhenNeeded = true;
stateless = true;
};
}

View file

@ -1,21 +1,23 @@
{ config, pkgs, ... }:
{
programs.ssh.startAgent = true;
/*
Home assistant added an option that does this
https://github.com/nix-community/home-manager/commit/2d9210f25ed18d5d4e11e6b886de4027c0c51a94
but since I still need to fix home-manager's envvars not applying I'll stick to the NixOS one
*/
/*
TODO: fix SSH_AUTH_SOCK not being set in Plasma
Turns out the NixOS module also has issues :3
The env is set but only in bash, not in the DE, so
keepass can't pick it up. For now I'll just set it manually
*/
home-manager.users.toast.xdg.configFile."plasma-workspace/env/ssh-agent.sh".text = ''
if [[ -z "$SSH_AUTH_SOCK" ]]; then
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent
fi
'';
config,
pkgs,
...
}: {
programs.ssh.startAgent = true;
/*
Home assistant added an option that does this
https://github.com/nix-community/home-manager/commit/2d9210f25ed18d5d4e11e6b886de4027c0c51a94
but since I still need to fix home-manager's envvars not applying I'll stick to the NixOS one
*/
/*
TODO: fix SSH_AUTH_SOCK not being set in Plasma
Turns out the NixOS module also has issues :3
The env is set but only in bash, not in the DE, so
keepass can't pick it up. For now I'll just set it manually
*/
home-manager.users.toast.xdg.configFile."plasma-workspace/env/ssh-agent.sh".text = ''
if [[ -z "$SSH_AUTH_SOCK" ]]; then
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent
fi
'';
}

View file

@ -1,25 +1,23 @@
{ config, ... }:
{
services.syncthing = {
enable = true;
user = "toast";
group = "users";
dataDir = config.users.users.toast.home;
settings.folders."passwords".path = "~/Documents/Passwords";
};
# Allow regular users to stop syncthing
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "syncthing.service" &&
subject.user == "${config.services.syncthing.user}"
)
{
return polkit.Result.YES;
}
})
'';
{config, ...}: {
services.syncthing = {
enable = true;
user = "toast";
group = "users";
dataDir = config.users.users.toast.home;
settings.folders."passwords".path = "~/Documents/Passwords";
};
# Allow regular users to stop syncthing
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "syncthing.service" &&
subject.user == "${config.services.syncthing.user}"
)
{
return polkit.Result.YES;
}
})
'';
}