Compare commits
No commits in common. "007093abe2ff2f8ae1c2581e7a30b7e5129b66cf" and "fb82c20260ba666d11fed5b5bd7eac26dc8d7569" have entirely different histories.
007093abe2
...
fb82c20260
3 changed files with 5 additions and 20 deletions
|
@ -29,14 +29,8 @@
|
||||||
locate.enable = true;
|
locate.enable = true;
|
||||||
};
|
};
|
||||||
system = {
|
system = {
|
||||||
boot = {
|
boot.grub.enable = true;
|
||||||
grub.enable = true;
|
services.forgejo.enable = true;
|
||||||
timeout = 30;
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
forgejo.enable = true;
|
|
||||||
grafana.enable = true;
|
|
||||||
};
|
|
||||||
programs = {
|
programs = {
|
||||||
editors = {
|
editors = {
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs) fetchurl;
|
inherit (pkgs) fetchurl;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
|
||||||
inherit (config.services.forgejo) customDir user group;
|
inherit (config.services.forgejo) customDir user group;
|
||||||
|
|
||||||
cfg = config.modules.system.services.forgejo;
|
cfg = config.modules.system.services.forgejo;
|
||||||
|
@ -17,7 +16,7 @@
|
||||||
acmeRoot = "/var/lib/acme/challenges-forgejo";
|
acmeRoot = "/var/lib/acme/challenges-forgejo";
|
||||||
dataDir = "/srv/data/forgejo";
|
dataDir = "/srv/data/forgejo";
|
||||||
in {
|
in {
|
||||||
options.modules.system.services.forgejo.enable = mkEnableOption "forgejo";
|
options.modules.system.services.forgejo.enable = lib.mkEnableOption "forgejo";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
modules.system.services = {
|
modules.system.services = {
|
||||||
|
|
|
@ -5,21 +5,13 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkForce;
|
inherit (lib.modules) mkForce;
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
inherit (lib.types) int;
|
|
||||||
|
|
||||||
cfg = config.modules.system.boot;
|
cfg = config.modules.system.boot;
|
||||||
in {
|
in {
|
||||||
options.modules.system.boot = {
|
options.modules.system.boot = {
|
||||||
grub.enable = mkEnableOption "Grub, a bloated boot loader";
|
grub.enable = mkEnableOption "Grub, a bloated boot loader";
|
||||||
systemd-boot.enable = mkEnableOption "Poetteringboot";
|
systemd-boot.enable = mkEnableOption "Poetteringboot";
|
||||||
timeout = mkOption {
|
|
||||||
description = ''
|
|
||||||
Set the boot loader's timeout. This is 0 by default, but preferably longer on remote servers to make switching to previous generations easier.
|
|
||||||
'';
|
|
||||||
type = int;
|
|
||||||
default = 0;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
@ -41,7 +33,7 @@ in {
|
||||||
loader = {
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
# I love spamming space
|
# I love spamming space
|
||||||
timeout = cfg.timeout;
|
timeout = 0;
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = cfg.systemd-boot.enable;
|
enable = cfg.systemd-boot.enable;
|
||||||
editor = mkForce false;
|
editor = mkForce false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue