style: reformat with nixfmt-rfc-style

This commit is contained in:
Felix Schröter 2024-05-26 16:45:38 +02:00
parent 5ad8bc1d56
commit 1c5d83d81e
Signed by: felschr
GPG key ID: 671E39E6744C807D
99 changed files with 2247 additions and 1334 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let common = import ./common.nix { inherit config lib pkgs; };
in common.mkModule {
let
common = import ./common.nix { inherit config lib pkgs; };
in
common.mkModule {
name = "firefox";
displayName = "Firefox";
dataConfigPath = ".mozilla/firefox";

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let common = import ./common.nix { inherit config lib pkgs; };
in common.mkModule {
let
common = import ./common.nix { inherit config lib pkgs; };
in
common.mkModule {
name = "mullvad-browser";
displayName = "Mullvad Browser";
dataConfigPath = ".mullvad/mullvadbrowser";

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let common = import ./common.nix { inherit config lib pkgs; };
in common.mkModule {
let
common = import ./common.nix { inherit config lib pkgs; };
in
common.mkModule {
name = "tor-browser";
displayName = "Tor Browser";
dataConfigPath = ".tor project/firefox";

View file

@ -1,36 +1,59 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
with lib;
let cfg = config.programs.git;
in {
let
cfg = config.programs.git;
in
{
options.programs.git = {
profiles = mkOption {
type = types.attrsOf (types.submodule ({ name, config, ... }: {
options = {
name = mkOption { type = types.str; };
email = mkOption { type = types.str; };
signingKey = mkOption { type = types.str; };
dirs = mkOption { type = types.listOf types.str; };
};
}));
type = types.attrsOf (
types.submodule (
{ name, config, ... }:
{
options = {
name = mkOption { type = types.str; };
email = mkOption { type = types.str; };
signingKey = mkOption { type = types.str; };
dirs = mkOption { type = types.listOf types.str; };
};
}
)
);
};
defaultProfile = mkOption { type = types.str; };
};
config = let inherit (cfg) profiles;
in {
programs.git = {
# fix/workaround for https://github.com/NixOS/nixpkgs/issues/169193
extraConfig.safe.directory = "/etc/nixos";
config =
let
inherit (cfg) profiles;
in
{
programs.git = {
# fix/workaround for https://github.com/NixOS/nixpkgs/issues/169193
extraConfig.safe.directory = "/etc/nixos";
userName = profiles."${cfg.defaultProfile}".name;
userEmail = profiles."${cfg.defaultProfile}".email;
signing = { key = profiles."${cfg.defaultProfile}".signingKey; };
includes = flatten (mapAttrsToList (name: profile:
map (dir: {
condition = "gitdir:${dir}";
contents.user = { inherit (profile) name email signingKey; };
}) profile.dirs) profiles);
userName = profiles."${cfg.defaultProfile}".name;
userEmail = profiles."${cfg.defaultProfile}".email;
signing = {
key = profiles."${cfg.defaultProfile}".signingKey;
};
includes = flatten (
mapAttrsToList (
name: profile:
map (dir: {
condition = "gitdir:${dir}";
contents.user = {
inherit (profile) name email signingKey;
};
}) profile.dirs
) profiles
);
};
};
};
}