Nixfmt: Enable strict formatting.

This commit is contained in:
Dmitry Voronin 2024-10-14 04:51:19 +03:00
parent 5dab0401f2
commit 8047d13b59
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
42 changed files with 51 additions and 168 deletions

View file

@ -12,4 +12,5 @@
[formatter.nixfmt-rfc-style]
command = "nixfmt"
options = [ "-s" ]
includes = [ "*.nix" ]

View file

@ -32,9 +32,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.change = container.mkContainer cfg {
bindMounts = {

View file

@ -36,9 +36,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.cloud = container.mkContainer cfg {
bindMounts = {

View file

@ -24,9 +24,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.ddns = container.mkContainer cfg {
bindMounts = {

View file

@ -30,9 +30,7 @@ in
config =
{ ... }:
container.mkContainerConfig cfg {
environment.systemPackages = [
pkgs.cloudflared
];
environment.systemPackages = [ pkgs.cloudflared ];
systemd.services.cloudflared = {
description = "Cloudflare DoH server.";
@ -96,9 +94,7 @@ in
"https://raw.githubusercontent.com/AssoEchap/stalkerware-indicators/master/generated/hosts"
"https://urlhaus.abuse.ch/downloads/hostfile/"
];
other = [
"https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser"
];
other = [ "https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser" ];
};
# whiteLists = {
# other = [

View file

@ -36,9 +36,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.download = container.mkContainer cfg {
enableTun = true;

View file

@ -40,9 +40,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.frkn = container.mkContainer cfg {
bindMounts = {

View file

@ -37,9 +37,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.git = container.mkContainer cfg {
bindMounts = {

View file

@ -34,9 +34,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.hdd = container.mkContainer cfg {
# bindMounts = let

View file

@ -33,9 +33,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.iot = container.mkContainer cfg {
bindMounts = {

View file

@ -31,9 +31,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.jobber = container.mkContainer cfg {
bindMounts = {
@ -58,11 +56,7 @@ in
]);
in
container.mkContainerConfig cfg {
networking = lib.mkForce {
nameservers = [
"10.30.218.2"
];
};
networking = lib.mkForce { nameservers = [ "10.30.218.2" ]; };
systemd.services.jobber = {
description = "My job is pushing the button.";

View file

@ -193,9 +193,7 @@ in
ru
];
hostName = cfg.domain;
plugins = [
"managesieve"
];
plugins = [ "managesieve" ];
extraConfig = ''
# starttls needed for authentication, so the fqdn required to match
# the certificate

View file

@ -38,9 +38,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.office = container.mkContainer cfg {
bindMounts = {

View file

@ -34,9 +34,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.paper = container.mkContainer cfg {
bindMounts = {

View file

@ -32,9 +32,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.pass = container.mkContainer cfg {
bindMounts = {

View file

@ -29,9 +29,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.postgres = container.mkContainer cfg {
bindMounts = {

View file

@ -40,9 +40,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.print = container.mkContainer cfg {
bindMounts = {

View file

@ -30,9 +30,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.rabbitmq = container.mkContainer cfg {
bindMounts = {

View file

@ -33,9 +33,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.read = container.mkContainer cfg {
bindMounts = {

View file

@ -32,9 +32,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.status = container.mkContainer cfg {
bindMounts = {
@ -48,9 +46,7 @@ in
{ lib, ... }:
container.mkContainerConfig cfg {
networking = {
nameservers = mkForce [
config.container.module.dns.address
];
nameservers = mkForce [ config.container.module.dns.address ];
};
services.uptime-kuma = {

View file

@ -32,9 +32,7 @@ in
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.stock = container.mkContainer cfg {
bindMounts = {

View file

@ -1,8 +1,4 @@
{
config,
container,
...
}:
{ config, container, ... }:
let
domain = "camera.${config.container.domain}";
address = "192.168.2.249";

View file

@ -1,8 +1,4 @@
{
container,
config,
...
}:
{ container, config, ... }:
let
cfg = config.container.module.hdd;
name = "hdd";

View file

@ -1,8 +1,4 @@
{
config,
container,
...
}:
{ config, container, ... }:
let
cfg = config.container.module.home;
name = "home";

View file

@ -1,8 +1,4 @@
{
container,
config,
...
}:
{ container, config, ... }:
let
cfg = config.container.module.iot;
name = "iot";

View file

@ -1,8 +1,4 @@
{
container,
config,
...
}:
{ container, config, ... }:
let
cfg = config.container.module.search;
name = "search";

View file

@ -231,11 +231,7 @@
};
};
mkSystem = system: hostname: {
"${hostname}" = mkHost {
inherit system hostname;
};
};
mkSystem = system: hostname: { "${hostname}" = mkHost { inherit system hostname; }; };
in
nixpkgs.lib.foldl' (acc: h: acc // h) { } (
map (

View file

@ -50,9 +50,7 @@
{
devShells.${system} = {
default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
tex
];
nativeBuildInputs = with pkgs; [ tex ];
buildInputs = with pkgs; [ ];
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};

View file

@ -24,9 +24,7 @@ in
"sway/scratchpad"
"mpris"
];
modules-center = [
"sway/workspaces"
];
modules-center = [ "sway/workspaces" ];
modules-right = [
"sway/language"
"pulseaudio"

View file

@ -1,8 +1,4 @@
{
lib,
config,
...
}:
{ lib, config, ... }:
with lib;
let
cfg = config.user.dasha;

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
fprintd
];
environment.systemPackages = with pkgs; [ fprintd ];
services.fprintd = {
enable = true;

View file

@ -10,9 +10,7 @@
cfg: extra:
lib.recursiveUpdate {
# Allow nested containers.
additionalCapabilities = [
''all" --system-call-filter="add_key keyctl bpf" --capability="all''
];
additionalCapabilities = [ ''all" --system-call-filter="add_key keyctl bpf" --capability="all'' ];
enableTun = true;
# Start containers with the system by default.
@ -71,11 +69,7 @@
mkContainerDir = cfg: dirs: map (path: "d '${cfg.storage}/${path}' 1777 root root - -") dirs;
# Common configuration for Nginx server.
mkServer =
cfg:
lib.recursiveUpdate {
forceSSL = false;
} cfg;
mkServer = cfg: lib.recursiveUpdate { forceSSL = false; } cfg;
# Attach the host media directory to container.
# They will be added to /type/{0..9}

View file

@ -15,11 +15,7 @@ in
config = mkIf cfg.enable {
nixpkgs.config.rocmSupport = true;
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
hardware.graphics.extraPackages = with pkgs; [
rocmPackages.clr.icd
];
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
};
}

View file

@ -8,7 +8,5 @@ in
module.desktop.brightness.enable = mkEnableOption "Brightness.";
};
config = mkIf cfg.enable {
programs.light.enable = true;
};
config = mkIf cfg.enable { programs.light.enable = true; };
}

View file

@ -22,9 +22,7 @@ in
};
config = mkIf cfg.enable (mkMerge [
{
boot.kernelModules = [ "kvm-intel" ];
}
{ boot.kernelModules = [ "kvm-intel" ]; }
(mkIf cfg.powersave {
module.powersave = {
enable = true;

View file

@ -85,12 +85,8 @@ in
};
})
(mkIf cfg.hotspotTtlBypass {
boot.kernel.sysctl."net.ipv4.ip_default_ttl" = 65;
})
(mkIf cfg.hotspotTtlBypass { boot.kernel.sysctl."net.ipv4.ip_default_ttl" = 65; })
(mkIf cfg.latest {
boot.kernelPackages = pkgs.linuxPackages_latest;
})
(mkIf cfg.latest { boot.kernelPackages = pkgs.linuxPackages_latest; })
]);
}

View file

@ -60,9 +60,7 @@ in
})
# Desktop apps.
(mkIf cfg.desktop.enable {
environment.systemPackages = package.desktop;
})
(mkIf cfg.desktop.enable { environment.systemPackages = package.desktop; })
# Gaming.
(mkIf cfg.gaming.enable {
@ -86,18 +84,12 @@ in
})
# Creative.
(mkIf cfg.creative.enable {
environment.systemPackages = package.creative;
})
(mkIf cfg.creative.enable { environment.systemPackages = package.creative; })
# Development.
(mkIf cfg.dev.enable {
environment.systemPackages = package.dev;
})
(mkIf cfg.dev.enable { environment.systemPackages = package.dev; })
# Extras.
(mkIf cfg.extra.enable {
environment.systemPackages = package.extra;
})
(mkIf cfg.extra.enable { environment.systemPackages = package.extra; })
];
}

View file

@ -17,9 +17,7 @@ in
config = mkIf cfg.enable {
security.polkit.enable = true;
systemd = {
packages = with pkgs; [
polkit-kde-agent
];
packages = with pkgs; [ polkit-kde-agent ];
user = {
services.plasma-polkit-agent = {
serviceConfig = {

View file

@ -17,9 +17,7 @@ in
config = mkIf cfg.enable {
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
config = {
common = {
default = [

View file

@ -41,9 +41,7 @@ in
base = true;
gtk = true;
};
extraPackages = with pkgs; [
swaykbdd
];
extraPackages = with pkgs; [ swaykbdd ];
};
};
}

View file

@ -15,7 +15,5 @@ in
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ waybar ];
};
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ waybar ]; };
}

View file

@ -47,9 +47,7 @@ let
dark = colors;
};
links = [
(mkLink "Status" "fa-heartbeat" "https://${config.container.module.status.domain}")
];
links = [ (mkLink "Status" "fa-heartbeat" "https://${config.container.module.status.domain}") ];
services = [
(mkGroup "App" "fa-server" [