Format the entire project.

This commit is contained in:
Kevin Baensch 2023-09-11 20:23:04 +02:00
parent 1dc50ae17d
commit 6f9db5e3a4
Signed by: derped
GPG key ID: C0F1D326C7626543
115 changed files with 3451 additions and 2901 deletions

View file

@ -1,9 +1,11 @@
{ config, lib, fn, ... }:
{
config,
lib,
fn,
...
}:
with builtins;
with lib;
let
with lib; let
cfg = config.machine;
pkgsetList = fn.makeOptionTypeList (toString ../pkgsets);
serviceList = fn.makeOptionTypeList (toString ../services);
@ -11,8 +13,8 @@ let
name = pname;
value = rec {
pkgwrap = mkOption {
type = with types; oneOf [ package (listOf package) ];
default = (fn.pkgFilter cfg.pkgsets."${pname}".pkgs);
type = with types; oneOf [package (listOf package)];
default = fn.pkgFilter cfg.pkgsets."${pname}".pkgs;
description = ''
Package Wrapper for packages using a wrapper function (like python, emacs, haskell, ...)
'';
@ -29,8 +31,8 @@ let
in {
options.machine = {
pkgs = mkOption {
type = (types.listOf (types.enum pkgsetList));
default = [ "base" ];
type = types.listOf (types.enum pkgsetList);
default = ["base"];
description = ''
The list of metapackages to be installed.
'';
@ -38,7 +40,7 @@ in {
# Package names containing '::' are sub packages and should not have their own pkgset.
pkgsets = listToAttrs (map pkgOption (lists.filter (v: !(strings.hasInfix "::" v)) pkgsetList));
services = mkOption {
type = (types.listOf (types.enum serviceList));
type = types.listOf (types.enum serviceList);
default = [];
description = ''
List of services to be enabled.
@ -46,7 +48,7 @@ in {
};
conffiles = mkOption {
type = types.listOf types.str;
default = [ "zsh" ];
default = ["zsh"];
description = ''
List of configuration files to be enabled.
'';
@ -116,7 +118,7 @@ in {
};
};
imports = [
(mkAliasOptionModule [ "machine" "firewall" ] [ "networking" "firewall" ])
(mkAliasOptionModule [ "machine" "allowUnfree" ] [ "nixpkgs" "config" "allowUnfree" ])
(mkAliasOptionModule ["machine" "firewall"] ["networking" "firewall"])
(mkAliasOptionModule ["machine" "allowUnfree"] ["nixpkgs" "config" "allowUnfree"])
];
}