switch to nixpkgs-fmt

This commit is contained in:
Tim Schubert 2022-08-04 21:13:54 +02:00
parent 8cd6ed1502
commit c43341a8b2
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
69 changed files with 664 additions and 665 deletions

View file

@ -1,14 +1,16 @@
{
self,
nixpkgs,
home-manager,
} @ inputs: let
hmConfiguration = {
homeDirectory ? "/home/dadada",
extraModules ? [],
system ? "x86_64-linux",
username ? "dadada",
stateVersion,
{ self
, nixpkgs
, home-manager
,
} @ inputs:
let
hmConfiguration =
{ homeDirectory ? "/home/dadada"
, extraModules ? [ ]
, system ? "x86_64-linux"
, username ? "dadada"
, stateVersion
,
}: (home-manager.lib.homeManagerConfiguration {
configuration = { ... }: {
imports = (nixpkgs.lib.attrValues self.hmModules) ++ extraModules;
@ -21,7 +23,8 @@
};
inherit system homeDirectory username stateVersion;
});
in {
in
{
home = hmConfiguration {
extraModules = [ ./home ];
stateVersion = "20.09";

View file

@ -1,9 +1,9 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
useFeatures = [
"alacritty"
#"emacs"
@ -18,7 +18,8 @@
"xdg"
"zsh"
];
in {
in
{
programs.git = {
signing = {
key = "D68C84695C087E0F733A28D0EEB8D1CE62C4DFEA";

View file

@ -1,12 +1,12 @@
{
pkgs,
lib,
config,
...
{ pkgs
, lib
, config
, ...
}:
with lib; let
cfg = config.dadada.home.alacritty;
in {
in
{
options.dadada.home.alacritty = {
enable = mkEnableOption "Enable alacritty config";
};

View file

@ -1,7 +1,6 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; {
options.dadada.home.colors = mkOption {

View file

@ -1,7 +1,6 @@
{
self,
nix-doom-emacs,
...
{ self
, nix-doom-emacs
, ...
} @ inputs: {
alacritty = import ./alacritty;
colors = import ./colors.nix;

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.direnv;
in {
in
{
options.dadada.home.direnv = {
enable = mkEnableOption "Enable direnv config";
};

View file

@ -1,12 +1,12 @@
{nix-doom-emacs, ...}: {
config,
pkgs,
lib,
...
{ nix-doom-emacs, ... }: { config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.emacs;
in {
in
{
imports = [ nix-doom-emacs.hmModule ];
options.dadada.home.emacs = {
enable = mkEnableOption "Enable dadada emacs config";
@ -17,7 +17,8 @@ in {
doomPrivateDir = ./doom.d;
emacsPackagesOverlay = self: super:
with pkgs; {
tsc = super.tsc.overrideAttrs (old: let
tsc = super.tsc.overrideAttrs (old:
let
libtsc_dyn = rustPlatform.buildRustPackage rec {
pname = "emacs-tree-sitter";
version = "0.15.1";
@ -42,7 +43,8 @@ in {
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
cargoHash = "sha256-HB5tFR1slY2D6jb2mt4KrGrGBUUVrxiBjmVycO+qfYY=";
};
in {
in
{
inherit (libtsc_dyn) src;
preBuild = ''
ext=${stdenv.hostPlatform.extensions.sharedLibrary}

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.fish;
in {
in
{
options.dadada.home.fish = {
enable = mkEnableOption "Enable fish config";
};

View file

@ -1,12 +1,12 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}:
with lib; let
cfg = config.dadada.home.git;
in {
in
{
options.dadada.home.git = {
enable = mkEnableOption "Enable git config";
};

View file

@ -1,11 +1,11 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.gpg;
in {
in
{
options.dadada.home.gpg = {
enable = mkEnableOption "Enable GnuPG config";
};

View file

@ -1,12 +1,12 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}:
with lib; let
cfg = config.dadada.home.gtk;
in {
in
{
options.dadada.home.gtk = {
enable = mkEnableOption "Enable GTK config";
};

View file

@ -1,11 +1,11 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.keyring;
in {
in
{
options.dadada.home.keyring = {
enable = mkEnableOption "Enable keyring config";
};

View file

@ -1,12 +1,12 @@
{
pkgs,
lib,
config,
...
{ pkgs
, lib
, config
, ...
}:
with lib; let
cfg = config.dadada.home.kitty;
in {
in
{
options.dadada.home.kitty = {
enable = mkEnableOption "Enable kitty config";
};

View file

@ -1,13 +1,13 @@
{
config,
lib,
pkgs,
colors,
...
{ config
, lib
, pkgs
, colors
, ...
}:
with lib; let
cfg = config.dadada.home.mako;
in {
in
{
options.dadada.home.mako = {
enable = mkEnableOption "Enable mako config";
};

View file

@ -1,11 +1,11 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.session;
in {
in
{
options.dadada.home.session = {
enable = mkEnableOption "Enable session variable management";
sessionVars = mkOption {

View file

@ -1,11 +1,11 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.ssh;
in {
in
{
options.dadada.home.ssh = {
enable = mkEnableOption "Enable SSH config";
};

View file

@ -1,13 +1,13 @@
{
config,
pkgs,
lib,
colors,
...
{ config
, pkgs
, lib
, colors
, ...
}:
with lib; let
cfg = config.dadada.home.sway;
in {
in
{
options.dadada.home.sway = {
enable = mkEnableOption "Enable Sway config";
};

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.syncthing;
in {
in
{
options.dadada.home.syncthing = {
enable = mkEnableOption "Enable Syncthing config";
};

View file

@ -1,13 +1,13 @@
{
config,
lib,
pkgs,
colors ? ../../lib/colors.nix,
...
{ config
, lib
, pkgs
, colors ? ../../lib/colors.nix
, ...
}:
with lib; let
cfg = config.dadada.home.termite;
in {
in
{
options.dadada.home.termite = {
enable = mkEnableOption "Enable termite config";
};

View file

@ -1,11 +1,11 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.tmux;
in {
in
{
options.dadada.home.tmux = {
enable = mkEnableOption "Enable tmux config";
};

View file

@ -1,13 +1,13 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.vim;
vimPlugins = pkgs.callPackage ../../../pkgs/vimPlugins { };
in {
in
{
options.dadada.home.vim = {
enable = mkEnableOption "Enable VIM config";
};

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
apps = {
@ -23,7 +22,8 @@ with lib; let
"application/pdf" = "org.pwmt.zathura.desktop";
};
cfg = config.dadada.home.xdg;
in {
in
{
options.dadada.home.xdg = {
enable = mkEnableOption "Enable XDG config";
};

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.zsh;
in {
in
{
options.dadada.home.zsh = {
enable = mkEnableOption "Enable ZSH config";
};

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}: {
imports = [
./hardware-configuration.nix

View file

@ -1,12 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")

View file

@ -1,15 +1,16 @@
{
self,
admins,
nixpkgs,
nixosSystem,
home-manager,
homePage,
nixos-hardware,
nvd,
scripts,
recipemd,
}: let
{ self
, admins
, nixpkgs
, nixosSystem
, home-manager
, homePage
, nixos-hardware
, nvd
, scripts
, recipemd
,
}:
let
adapterModule = system: {
nixpkgs.config.allowUnfreePredicate = pkg: true;
nixpkgs.overlays =
@ -25,7 +26,8 @@
adminConfig = users: {
dadada.admin.users = lib.getAttrs users admins;
};
in {
in
{
gorgon = nixosSystem rec {
system = "x86_64-linux";
modules =

View file

@ -1,9 +1,9 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
signHook =
pkgs.writeShellScript "/etc/nix/sign-cache.sh"
''
@ -14,7 +14,8 @@
echo "Signing paths" $OUT_PATHS
nix store sign --key-file /etc/nix/key.private $OUT_PATHS
'';
in {
in
{
imports = [
./hardware-configuration.nix
];

View file

@ -1,12 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")

View file

@ -1,16 +1,17 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
hostAliases = [
"ifrit.dadada.li"
"media.dadada.li"
"backup0.dadada.li"
];
backups = "/mnt/storage/backup";
in {
in
{
imports = [
./hardware-configuration.nix
];

View file

@ -1,12 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.admin;
@ -16,10 +15,10 @@ with lib; let
shellNames = builtins.attrNames shells;
adminOpts = {
name,
config,
...
adminOpts =
{ name
, config
, ...
}: {
options = {
keys = mkOption {
@ -42,7 +41,8 @@ with lib; let
};
};
};
in {
in
{
options = {
dadada.admin = {
enable = mkEnableOption "Enable admin access";

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
backupExcludes = [
@ -24,7 +23,8 @@ with lib; let
"/var/tmp"
];
cfg = config.dadada.backupClient;
in {
in
{
options = {
dadada.backupClient = {
gs = {

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.ddns;
@ -35,7 +34,8 @@ with lib; let
'';
}));
};
in {
in
{
options = {
dadada.ddns.domains = mkOption {
type = types.listOf types.str;

View file

@ -1,11 +1,12 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
cfg = config.dadada.element;
in {
in
{
options.dadada.element = {
enable = lib.mkEnableOption "Enable element webapp";
};

View file

@ -1,13 +1,13 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
luks = config.dadada.luks;
fido2 = config.dadada.fido2;
in {
in
{
options = {
dadada.luks = {
uuid = mkOption {

View file

@ -1,14 +1,14 @@
{
config,
lib,
...
{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.fileShare;
sharePath = "/mnt/storage/share";
ipv6 = "fd42:dead:beef::/48";
ipv4 = "192.168.42.0/24";
in {
in
{
options.dadada.fileShare = {
enable = mkEnableOption "Enable file share server";
};

View file

@ -1,12 +1,13 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
redisSocket = "127.0.0.1:6379";
cfg = config.dadada.gitea;
in {
in
{
options.dadada.gitea = {
enable = lib.mkEnableOption "Enable gitea";
};

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.headphones;
in {
in
{
options = {
dadada.headphones = {
enable = mkEnableOption "Enable bluetooth headphones with more audio codecs.";

View file

@ -1,9 +1,9 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
cfg = config.dadada.homePage;
in
with lib; {

View file

@ -1,12 +1,13 @@
# Source https://github.com/NixOS/nixpkgs/issues/113384
{
config,
lib,
pkgs,
...
}: let
{ config
, lib
, pkgs
, ...
}:
let
cfg = config.dadada.kanboard;
in {
in
{
options = {
dadada.kanboard.enable = lib.mkEnableOption "Enable Kanboard";
};

View file

@ -1,13 +1,13 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.networking;
vpnPubKey = "x/y6I59buVzv9Lfzl+b17mGWbzxU+3Ke9mQNa1DLsDI=";
in {
in
{
options = {
dadada.networking = {
localResolver = {

View file

@ -1,13 +1,11 @@
{
self,
home-manager,
nixpkgs,
...
}: {
config,
pkgs,
lib,
...
{ self
, home-manager
, nixpkgs
, ...
}: { config
, pkgs
, lib
, ...
}:
# Global settings for nix daemon
{

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; {
networking.domain = mkDefault "dadada.li";

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; {
networking.domain = mkDefault "dadada.li";

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.share;
in {
in
{
options.dadada.share = {
enable = mkEnableOption "Enable file share";
};

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.steam;
in {
in
{
options = {
dadada.steam = {
enable = mkEnableOption "Enable Steam config";

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.autoUpgrade;
in {
in
{
options.dadada.autoUpgrade = {
enable = mkEnableOption "Enable automatic upgrades";
};

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.vpnServer;
@ -24,7 +23,8 @@ with lib; let
};
};
};
in {
in
{
options.dadada.vpnServer = {
enable = mkEnableOption "Enable wireguard gateway";
peers = mkOption {

View file

@ -1,12 +1,12 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.weechat;
in {
in
{
options.dadada.weechat = {
enable = mkEnableOption "Enable weechat relay";
};

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}: {
programs.zsh = {
enable = true;

View file

@ -1,8 +1,7 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; {
imports = [ ./hardware-configuration.nix ];

View file

@ -1,12 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")

View file

@ -1,11 +1,12 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
hostName = "surgat";
in {
in
{
imports = [
./hardware-configuration.nix
];

View file

@ -1,12 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")

View file

@ -1,22 +1,23 @@
# Adapted from Mic92/dotfiles
{
self,
flake-utils,
homePage,
nixpkgs,
home-manager,
nix-doom-emacs,
nixos-hardware,
nvd,
scripts,
recipemd,
...
{ self
, flake-utils
, homePage
, nixpkgs
, home-manager
, nix-doom-emacs
, nixos-hardware
, nvd
, scripts
, recipemd
, ...
} @ inputs:
(flake-utils.lib.eachDefaultSystem (system: let
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
selfPkgs = self.packages.${system};
formatter = self.formatter.${system};
in {
in
{
apps.nixos-switch = {
type = "app";
program = toString (pkgs.writeScript "deploy" ''
@ -51,9 +52,9 @@ in {
'');
};
devShell = pkgs.callPackage ./shell.nix { };
formatter = nixpkgs.legacyPackages."${system}".alejandra;
formatter = nixpkgs.legacyPackages."${system}".nixpkgs-fmt;
checks = {
format = pkgs.runCommand "check-format" {buildInputs = [formatter];} "${formatter}/bin/alejandra -c ${./.} && touch $out";
format = pkgs.runCommand "check-format" { buildInputs = [ formatter ]; } "${formatter}/bin/nixpkgs-fmt --check ${./.} && touch $out";
};
}))
// {

View file

@ -1,6 +1,7 @@
let
python3Packages = import ./python3-packages.nix;
in {
in
{
kanboard = final: prev: {
kanboard = prev.kanboard.overrideAttrs (oldAttrs: {
src = prev.fetchFromGitHub {

View file

@ -1,2 +1 @@
{callPackage}: {
}
{ callPackage }: { }

View file

@ -1,7 +1,7 @@
{
pkgs,
stdenv,
lib,
{ pkgs
, stdenv
, lib
,
}: (import
(pkgs.fetchgit {
url = "https://git.dadada.li/dadada/scripts.git";

View file

@ -1,7 +1,7 @@
{
stdenv,
fetchzip,
unzip,
{ stdenv
, fetchzip
, unzip
,
}:
stdenv.mkDerivation rec {
src = ./tubslatex_1.3.2.tds.zip;

View file

@ -1,8 +1,7 @@
{
pkgs,
lib,
fetchFromGitHub,
...
{ pkgs
, lib
, fetchFromGitHub
, ...
}:
with lib; {
filetype = pkgs.vimUtils.buildVimPluginFrom2Nix {

View file

@ -1,2 +1 @@
system: {
}
system: { }