Created a central place for all common options to all hosts.
This commit is contained in:
+162
@@ -0,0 +1,162 @@
|
|||||||
|
# ---> Nix
|
||||||
|
# Ignore build outputs from performing a nix-build or `nix build` command
|
||||||
|
result
|
||||||
|
result-*
|
||||||
|
|
||||||
|
# Ignore automatically generated direnv output
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
# ---> Node
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# vitepress build output
|
||||||
|
**/.vitepress/dist
|
||||||
|
|
||||||
|
# vitepress cache directory
|
||||||
|
**/.vitepress/cache
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
# ---> VisualStudioCode
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
# Répertoire des secrets gérés par sops-nix
|
||||||
|
secrets/*
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"nixEnvSelector.nixFile": "${workspaceFolder}/default.nix",
|
||||||
|
"nixEnvSelector.useFlakes": false
|
||||||
|
}
|
||||||
@@ -8,14 +8,14 @@ in {
|
|||||||
# This file is imported by all host configurations (servers and workstations)
|
# This file is imported by all host configurations (servers and workstations)
|
||||||
|
|
||||||
# NTP servers for this environment
|
# NTP servers for this environment
|
||||||
services.ntp.servers = [
|
environment.ntpServers = [
|
||||||
"10.10.128.1" # IPv4 gateway
|
"10.10.128.1" # IPv4 gateway
|
||||||
"fd00::1" # IPv6 gateway
|
"fd00::1" # IPv6 gateway
|
||||||
];
|
];
|
||||||
|
|
||||||
# Time settings from network configuration
|
# Time settings from network configuration
|
||||||
time.timeZone = env.time.timeZone;
|
environment.timeZone = env.time.timeZone;
|
||||||
time.hardwareClock = env.time.hardwareClock;
|
environment.hardwareClock = env.time.hardwareClock;
|
||||||
|
|
||||||
# TODO: Move other common settings here later
|
# TODO: Move other common settings here later
|
||||||
# Examples:
|
# Examples:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ in {
|
|||||||
# This file is imported by all server configurations
|
# This file is imported by all server configurations
|
||||||
|
|
||||||
# Default DNS servers for this environment
|
# Default DNS servers for this environment
|
||||||
networking.nameServers = [ "10.40.128.10" "10.40.128.11" ];
|
environment.dnsServers = [ "10.40.128.10" "10.40.128.11" ];
|
||||||
|
|
||||||
# SMTP relay configuration
|
# SMTP relay configuration
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
|
|||||||
@@ -22,5 +22,4 @@
|
|||||||
listenAddresses = [ "10.0.0.10" "127.0.0.1" "::1" ];
|
listenAddresses = [ "10.0.0.10" "127.0.0.1" "::1" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ in {
|
|||||||
# This file is imported by all workstation configurations
|
# This file is imported by all workstation configurations
|
||||||
|
|
||||||
# Default DNS servers for this environment
|
# Default DNS servers for this environment
|
||||||
networking.nameServers = [ "10.40.128.10" "10.40.128.11" ];
|
environment.dnsServers = [ "10.40.128.10" "10.40.128.11" ];
|
||||||
|
|
||||||
# SMTP relay configuration
|
# SMTP relay configuration
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.environment;
|
||||||
|
in {
|
||||||
|
options.environment = {
|
||||||
|
ntpServers = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
example = [ "0.pool.ntp.org" "1.pool.ntp.org" ];
|
||||||
|
description = "NTP servers for this environment.";
|
||||||
|
};
|
||||||
|
|
||||||
|
dnsServers = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
example = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
|
description = "Authoritative DNS servers for this environment.";
|
||||||
|
};
|
||||||
|
|
||||||
|
domain = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
example = "example.org";
|
||||||
|
description = "DNS domain for this environment.";
|
||||||
|
};
|
||||||
|
|
||||||
|
timeZone = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "UTC";
|
||||||
|
example = "Europe/Paris";
|
||||||
|
description = "Timezone for this environment.";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardwareClock = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "UTC";
|
||||||
|
example = "UTC";
|
||||||
|
description = "Hardware clock setting for this environment.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# System state version — defined once here for all machine types
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
|
# NTP servers
|
||||||
|
services.ntp.servers = cfg.ntpServers;
|
||||||
|
|
||||||
|
# Time settings
|
||||||
|
time.timeZone = cfg.timeZone;
|
||||||
|
time.hardwareClock = cfg.hardwareClock;
|
||||||
|
|
||||||
|
# Domain and DNS servers
|
||||||
|
networking.domain = cfg.domain;
|
||||||
|
networking.nameServers = cfg.dnsServers;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./../common ];
|
||||||
|
|
||||||
# TODO: Add hypervisor-specific configuration
|
# TODO: Add hypervisor-specific configuration
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, modulesPath, pkgs, lib, ... }:
|
{ config, modulesPath, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ];
|
imports = [
|
||||||
|
./../common
|
||||||
|
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||||
|
];
|
||||||
nix.settings = { sandbox = false; };
|
nix.settings = { sandbox = false; };
|
||||||
proxmoxLXC = {
|
proxmoxLXC = {
|
||||||
manageNetwork = false;
|
manageNetwork = false;
|
||||||
@@ -43,6 +46,4 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./../common ];
|
||||||
|
|
||||||
# TODO: Add VM-specific configuration
|
# TODO: Add VM-specific configuration
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./../common ];
|
||||||
|
|
||||||
# TODO: Add workstation-specific configuration
|
# TODO: Add workstation-specific configuration
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user