Const: Move to module.

This commit is contained in:
Dmitry Voronin 2025-01-16 12:50:27 +03:00
parent 19d2b60de0
commit e5fa034eed
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
31 changed files with 33 additions and 33 deletions

View file

@ -39,7 +39,7 @@ in
script = ''
pushd /tmp
rm -rf ./nixos
git clone --depth=1 --single-branch --branch=main ${config.const.url} ./nixos
git clone --depth=1 --single-branch --branch=main ${config.module.const.url} ./nixos
pushd ./nixos
git verify-commit HEAD && git fsck || {
echo "Verification failed."

View file

@ -27,8 +27,8 @@ in
config = lib.mkIf cfg.enable {
environment.packages = package.core;
nix.extraOptions = "experimental-features = nix-command flakes pipe-operators";
system.stateVersion = config.const.droidStateVersion;
time.timeZone = config.const.timeZone;
system.stateVersion = config.module.const.droidStateVersion;
time.timeZone = config.module.const.timeZone;
terminal = { inherit (android) font colors; };
home-manager.config = stylix // {
programs = with programs; core;
@ -36,7 +36,7 @@ in
home = {
inherit (env) sessionVariables;
inherit file;
stateVersion = config.const.droidStateVersion;
stateVersion = config.module.const.droidStateVersion;
};
};
};

View file

@ -39,7 +39,7 @@ in
programs = with program; core // desktop;
xdg = import ./xdg { inherit (user) homeDirectory; };
home = {
inherit (config.const) stateVersion;
inherit (config.module.const) stateVersion;
inherit (env) sessionVariables;
inherit (user) username homeDirectory;
inherit file;

View file

@ -1,6 +1,6 @@
{ ... }:
{
config.const.host = {
config.module.const.host = {
nginx = {
domain = "voronind.com";
sslCertificate = "/etc/letsencrypt/live/voronind.com/fullchain.pem";

View file

@ -120,7 +120,7 @@ in
PoolOffset = 100;
PoolSize = 150;
ServerAddress = "${internal}/24";
Timezone = config.const.timeZone;
Timezone = config.module.const.timeZone;
UplinkInterface = wan;
};
};

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"camera.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"change.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"print.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"dav.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"download.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"git.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"iot.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"home.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"yt.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"watch.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"read.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"mail.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"paper.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"printer.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"paste.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"resume.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"router.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"search.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
root = "/storage/hot/share";
index = ''
autoindex on;

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"sync.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"craft.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"status.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ config, ... }:
let
cfg = config.const.host.nginx;
cfg = config.module.const.host.nginx;
in
{
"pass.${cfg.domain}" = {

View file

@ -1,6 +1,6 @@
{ lib, ... }:
{
options.const = {
options.module.const = {
droidStateVersion = lib.mkOption {
default = "24.05";
type = lib.types.str;

View file

@ -1,6 +1,6 @@
{ config, ... }:
{
time.timeZone = config.const.timeZone;
time.timeZone = config.module.const.timeZone;
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {

View file

@ -1,5 +1,5 @@
{ config, ... }:
{
# Specify current release version.
system.stateVersion = config.const.stateVersion;
system.stateVersion = config.module.const.stateVersion;
}