Nixfmt: Enable strict formatting.
This commit is contained in:
parent
5dab0401f2
commit
8047d13b59
|
@ -12,4 +12,5 @@
|
|||
|
||||
[formatter.nixfmt-rfc-style]
|
||||
command = "nixfmt"
|
||||
options = [ "-s" ]
|
||||
includes = [ "*.nix" ]
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
config,
|
||||
container,
|
||||
...
|
||||
}:
|
||||
{ config, container, ... }:
|
||||
let
|
||||
domain = "camera.${config.container.domain}";
|
||||
address = "192.168.2.249";
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
container,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ container, config, ... }:
|
||||
let
|
||||
cfg = config.container.module.hdd;
|
||||
name = "hdd";
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
config,
|
||||
container,
|
||||
...
|
||||
}:
|
||||
{ config, container, ... }:
|
||||
let
|
||||
cfg = config.container.module.home;
|
||||
name = "home";
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
container,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ container, config, ... }:
|
||||
let
|
||||
cfg = config.container.module.iot;
|
||||
name = "iot";
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
container,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ container, config, ... }:
|
||||
let
|
||||
cfg = config.container.module.search;
|
||||
name = "search";
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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}";
|
||||
};
|
||||
|
|
|
@ -24,9 +24,7 @@ in
|
|||
"sway/scratchpad"
|
||||
"mpris"
|
||||
];
|
||||
modules-center = [
|
||||
"sway/workspaces"
|
||||
];
|
||||
modules-center = [ "sway/workspaces" ];
|
||||
modules-right = [
|
||||
"sway/language"
|
||||
"pulseaudio"
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.user.dasha;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
fprintd
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ fprintd ];
|
||||
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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; };
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; })
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -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; })
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -41,9 +41,7 @@ in
|
|||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
swaykbdd
|
||||
];
|
||||
extraPackages = with pkgs; [ swaykbdd ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,5 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ waybar ];
|
||||
};
|
||||
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ waybar ]; };
|
||||
}
|
||||
|
|
|
@ -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" [
|
||||
|
|
Loading…
Reference in a new issue