Nix fmt rfc style (more or less)

This commit is contained in:
Filippo Berto 2024-08-13 12:22:23 +02:00
parent e7496c447a
commit 515f098644
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
146 changed files with 2607 additions and 906 deletions

View file

@ -2,10 +2,8 @@
let
inherit (builtins) mapAttrs attrValues;
inherit (lib) filterAttrs unique;
btrfsFileSystems =
filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems;
btrfsDevices =
unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems));
btrfsFileSystems = filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems;
btrfsDevices = unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems));
in
{
services.btrfs.autoScrub = {

View file

@ -3,7 +3,10 @@
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-users = [ "root" "@wheel" ];
trusted-users = [
"root"
"@wheel"
];
trusted-public-keys = [
"thor:yRx3HglIxjUYocp4/jAP9dPWxWBEpgP6hqj1ofEfn1A="

View file

@ -1,3 +1 @@
{
services.fstrim.enable = true;
}
{ services.fstrim.enable = true; }

View file

@ -1,3 +1 @@
{
services.fwupd.enable = true;
}
{ services.fwupd.enable = true; }

View file

@ -1,4 +1,5 @@
{ lib, ... }: {
{ lib, ... }:
{
services.openssh = {
enable = true;
openFirewall = true;

View file

@ -1,7 +1,11 @@
{ lib, ... }:
let
hosts = import ../../../hosts.nix;
tailscale_hosts = lib.attrsets.mapAttrs' (k: v: lib.attrsets.nameValuePair v [ k ]) hosts.tailscale.ipv4;
tailscale_hosts = lib.attrsets.mapAttrs'
(
k: v: lib.attrsets.nameValuePair v [ k ]
)
hosts.tailscale.ipv4;
in
{
services.tailscale = {

View file

@ -1,7 +1,11 @@
{ lib, ... }:
let
hosts = import ../../../hosts.nix;
zerotier_hosts = lib.attrsets.mapAttrs' (k: v: lib.attrsets.nameValuePair v [ k ]) hosts.zerotier.ipv4;
zerotier_hosts = lib.attrsets.mapAttrs'
(
k: v: lib.attrsets.nameValuePair v [ k ]
)
hosts.zerotier.ipv4;
in
{
services.zerotierone = {