🎨 nixpkgs-fmt

This commit is contained in:
James Walker 2022-05-06 20:01:04 -04:00
parent be14e0698c
commit ea5ba53e3c
Signed by: walkah
GPG Key ID: 3C127179D6086E93
9 changed files with 187 additions and 164 deletions

View File

@ -14,9 +14,18 @@
};
};
outputs = { self, nixpkgs, deploy-rs, flake-utils, home-manager, dotfiles, ... }@attrs:
outputs =
{ self
, nixpkgs
, deploy-rs
, flake-utils
, home-manager
, dotfiles
, ...
}@attrs:
let
mkSystem = hostName: system: modules:
nixpkgs.lib.nixosSystem {
system = system;
modules = [
@ -26,14 +35,12 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
})
]
++ modules;
] ++ modules;
};
in
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
let pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
@ -42,13 +49,19 @@
}) // {
nixosConfigurations = {
# Aristotle
agent = mkSystem "agent" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
form = mkSystem "form" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
matter = mkSystem "matter" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
purpose = mkSystem "purpose" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
agent = mkSystem "agent" "aarch64-linux"
[ ./hosts/aristotle/configuration.nix ];
form = mkSystem "form" "aarch64-linux"
[ ./hosts/aristotle/configuration.nix ];
matter = mkSystem "matter" "aarch64-linux"
[ ./hosts/aristotle/configuration.nix ];
purpose = mkSystem "purpose" "aarch64-linux"
[ ./hosts/aristotle/configuration.nix ];
plato = mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ];
socrates = mkSystem "socrates" "x86_64-linux" [ ./hosts/socrates/configuration.nix ];
plato =
mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ];
socrates = mkSystem "socrates" "x86_64-linux"
[ ./hosts/socrates/configuration.nix ];
};
deploy.nodes = {

View File

@ -2,7 +2,8 @@
with lib;
let cfg = config.walkah.coredns;
in {
in
{
options.walkah.coredns = {
enable = mkEnableOption "";
addr = mkOption {

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }:
let cfg = config.services.gitea;
in {
in
{
users.users.git = {
description = "Gitea Service";
home = cfg.stateDir;

View File

@ -22,7 +22,8 @@ let
}
];
in {
in
{
imports = [ ./default.nix ];
environment.systemPackages = with pkgs; [ ipfs-migrator ];

View File

@ -15,16 +15,19 @@
enableACME = true;
locations."= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "matrix.walkah.chat:443"; };
in ''
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON server}';
'';
locations."= /.well-known/matrix/client".extraConfig = let
locations."= /.well-known/matrix/client".extraConfig =
let
client = {
"m.homeserver" = { "base_url" = "https://matrix.walkah.chat"; };
};
in ''
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';

View File

@ -149,14 +149,17 @@ let
# Create the final "sources" from the config
mkSources = config:
mapAttrs (
mapAttrs
(
name: spec:
if builtins.hasAttr "outPath" spec
then abort
then
abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = replace name (fetch config.pkgs name spec); }
) config.sources;
)
config.sources;
# The "config" used by the fetchers
mkConfig =

View File

@ -10,7 +10,8 @@ let
(optionalString (cfg.initPeers != [ ]) "--peers")
(lib.strings.concatStringsSep "," cfg.initPeers)
];
in {
in
{
###### interface