mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-09 09:21:04 +00:00
activationScripts: rewrite /etc/nixos with configuration source
This commit is contained in:
parent
c63b6b808c
commit
3f573e3dc3
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./variables-module.nix
|
./variables-module.nix
|
||||||
./files.nix
|
|
||||||
./volumes.nix
|
./volumes.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./letsencrypt/acme.nix
|
./letsencrypt/acme.nix
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
nixos-config-source: { config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.selfprivacy;
|
cfg = config.selfprivacy;
|
||||||
dnsCredentialsTemplates = {
|
dnsCredentialsTemplates = {
|
||||||
|
@ -29,6 +29,10 @@ in
|
||||||
nixos-lustrate = ''
|
nixos-lustrate = ''
|
||||||
rm -rf /old-root
|
rm -rf /old-root
|
||||||
'';
|
'';
|
||||||
|
selfprivacy-nixos-configuration-source = ''
|
||||||
|
rm -rf /etc/nixos/{*,.[!.]*}
|
||||||
|
cp -r --no-preserve=all ${nixos-config-source}/ -T /etc/nixos/
|
||||||
|
'';
|
||||||
cloudflareCredentials = ''
|
cloudflareCredentials = ''
|
||||||
mkdir -p /var/lib/cloudflare
|
mkdir -p /var/lib/cloudflare
|
||||||
chmod 0440 /var/lib/cloudflare
|
chmod 0440 /var/lib/cloudflare
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
modules = [
|
modules = [
|
||||||
hardware-configuration
|
hardware-configuration
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
(import ./files.nix top-level-flake.outPath)
|
||||||
(import ./userdata-variables.nix userdata)
|
(import ./userdata-variables.nix userdata)
|
||||||
selfprivacy-api.nixosModules.default
|
selfprivacy-api.nixosModules.default
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue