parent
467968eb4f
commit
42ca2912c7
31 changed files with 230 additions and 243 deletions
modules
|
@ -11,7 +11,7 @@ This directory contains every modules for NixOS exposed by this flake.
|
|||
| `borgbackup` | Sets up a wrapper around `services.borgbackup` to setup default behaviour and make configuration of backups easier. |
|
||||
| `caddy-plus` | Extends the caddy options to allow declaring subdirectory routes and reverse proxy directives through nix code. |
|
||||
| `desktop` | Sets up a Display Manager, a Desktop Environment and themes for any graphical apps to use the Dracula Theme. This module uses Hyprland as window manager and AGS / Astal for the UI. |
|
||||
| `docker` | Imports my [Khepri fork](https://github.com/matt1432/khepri), sets default options such as BTRFS filesystem and adds an update script for images. |
|
||||
| `docker` | Imports [nixos-docker-compose](https://github.com/matt1432/nixos-docker-compose), sets default options such as BTRFS filesystem and adds an update script for images. |
|
||||
| `esphome-plus` | Fixes a bug with compilation of m5-atom-stack firmware and allows declaring firmware configurations in nix code. |
|
||||
| `ha-plus` | Extends the home-assistant options to allow declaring the content of specific configuration files in the home-assistant configuration directory such as custom sentences through nix code. |
|
||||
| `kmscon` | Extends the kmscon options to add more descriptive ones. |
|
||||
|
|
|
@ -50,10 +50,10 @@ in {
|
|||
|
||||
docker =
|
||||
module
|
||||
(import ./docker self.inputs.khepri)
|
||||
(import ./docker self)
|
||||
''
|
||||
Imports my [Khepri fork](https://github.com/matt1432/khepri), sets default
|
||||
options such as BTRFS filesystem and adds an update script for images.
|
||||
Imports [nixos-docker-compose](https://github.com/matt1432/nixos-docker-compose),
|
||||
sets default options such as BTRFS filesystem and adds an update script for images.
|
||||
'';
|
||||
|
||||
esphome-plus =
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{config, ...}: let
|
||||
rwDataDir: {config, ...}: let
|
||||
inherit (config.sops) secrets;
|
||||
inherit (config.khepri) rwDataDir;
|
||||
|
||||
rwPath = rwDataDir + "/projectName";
|
||||
in {
|
||||
khepri.compositions."projectName" = {
|
||||
virtualisation.docker.compose."projectName" = {
|
||||
services = {};
|
||||
};
|
||||
|
||||
# For accurate stack trace
|
||||
_file = ./default.nix;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
khepri: {
|
||||
self: {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
|
@ -6,11 +6,11 @@ khepri: {
|
|||
}: let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
|
||||
cfg = config.khepri;
|
||||
cfg = config.roles.docker;
|
||||
in {
|
||||
imports = [khepri.nixosModules.default];
|
||||
imports = [self.inputs.docker-compose.nixosModules.default];
|
||||
|
||||
options.khepri = {
|
||||
options.roles.docker = {
|
||||
enable = mkOption {
|
||||
default = cfg.compositions != {};
|
||||
type = types.bool;
|
||||
|
@ -19,14 +19,6 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
rwDataDir = mkOption {
|
||||
default = "/var/lib/docker";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Directory to place persistent data in.
|
||||
'';
|
||||
};
|
||||
|
||||
storageDriver = mkOption {
|
||||
default = "btrfs"; # I use BTRFS on all my servers
|
||||
type = types.str;
|
||||
|
@ -41,12 +33,9 @@ in {
|
|||
|
||||
daemon.settings.dns = ["8.8.8.8" "1.1.1.1"];
|
||||
};
|
||||
|
||||
# khepri uses oci-containers under the hood and it must be set to docker to work
|
||||
oci-containers.backend = "docker";
|
||||
};
|
||||
|
||||
# Script for updating the images of all images of a compose.nix file
|
||||
# Script for updating the images of a compose.nix file
|
||||
environment.systemPackages = [
|
||||
(pkgs.callPackage ./updateImage.nix {})
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue