module overhaul

module
This commit is contained in:
atagen 2025-01-24 16:59:48 +11:00
parent 8fe3ddc38e
commit ae78cb7026
12 changed files with 1127 additions and 164 deletions

View file

@ -1,20 +1,53 @@
{
inputs = {
ides.url = "git+https://git.atagen.co/atagen/ides";
};
outputs = {
nixpkgs,
ides,
...
}: let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
mkShell = ides.lib.use pkgs;
in {
devShells.x86_64-linux.default = mkShell {
noCC = true;
services = {
caddy = import ./caddy.nix;
outputs =
{
nixpkgs,
ides,
...
}:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# create an instance of ides to spawn shells from
mkIdes = import ides {
# ides needs a pkgs instance to work with in flake mode
inherit pkgs;
# all other args here are optional
# shell function to wrap -
# could also use pkgs.mkShellNoCC, but override demonstrates
# more clearly how to change any aspect of the shell
shell = pkgs.mkShell.override {
stdenv = pkgs.stdenvNoCC;
};
# input for extra modules that provide service options
# see modules/redis.nix in ides source for example
modules = [ ];
# if you want to include a premade service def,
# use `imports` in the shell instead
};
in
{
devShells.x86_64-linux.default = mkIdes {
# import a concrete service definition
imports = [ ./caddy.nix ];
# use the options provided by a module
services.redis = {
enable = true;
port = 6889;
logLevel = "verbose";
};
# use normal mkShell options
nativeBuildInputs = [ pkgs.hello ];
someEnv = "this";
};
};
};
}