Format flake with nixfmt

This commit is contained in:
Andreas Zweili 2024-03-11 15:39:08 +01:00
parent a46df5d3ff
commit 3bb02349a3
1 changed files with 51 additions and 46 deletions

View File

@ -10,28 +10,32 @@
extra-substituters = "https://devenv.cachix.org";
};
outputs = { self, nixpkgs, devenv, systems }@inputs:
outputs =
{
self,
nixpkgs,
devenv,
systems,
}@inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
devShells = forEachSystem
(system:
devShells = forEachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.devShells.${system}.default.config;
in
{
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
{
packages = [
(pkgs.writeScriptBin "dev" "${builtins.readFile ./dev.sh}")
config = self.devShells.${system}.default.config;
enterShell = ''
ln -sf ${config.process-managers.process-compose.configFile} ${config.env.DEVENV_ROOT}/process-compose.yml
'';
];
packages = [ (pkgs.writeScriptBin "dev" "${builtins.readFile ./dev.sh}") ];
env = {
DJANGO_SETTINGS_MODULE = "network_inventory.settings.local";
PYTHON_KEYRING_BACKEND = "keyring.backends.fail.Keyring";
@ -60,12 +64,13 @@
};
services.postgres = {
enable = true;
initialDatabases = [{ name = "django"; }];
initialDatabases = [ { name = "django"; } ];
package = pkgs.postgresql_15;
};
}
];
};
});
}
);
};
}