Prepare to upload encrypted secrets file
This commit is contained in:
parent
ba5d5260b3
commit
f61fa33b7e
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
nixos/modules/secrets.nix filter=git-crypt diff=git-crypt
|
|
@ -44,8 +44,8 @@
|
|||
auth = import ./common/auth.nix;
|
||||
in {
|
||||
nixdate = ''
|
||||
${auth.method} nixos-rebuild switch --flake /etc/nixos/.#JimNixDesktop;
|
||||
home-manager switch --flake /etc/nixos/.#jimbo@JimNixDesktop;
|
||||
${auth.method} nixos-rebuild switch --flake /etc/nixos/NixOS-Config/.#JimNixDesktop;
|
||||
home-manager switch --flake /etc/nixos/NixOS-Config/.#jimbo@JimNixDesktop;
|
||||
notify-send "NixOS switch finished."
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
auth = import ./common/auth.nix;
|
||||
in {
|
||||
nixdate = ''
|
||||
${auth.method} nixos-rebuild switch --flake /etc/nixos/.#JimNixServer;
|
||||
home-manager switch --flake /etc/nixos/.#jimbo@JimNixServer;
|
||||
${auth.method} nixos-rebuild switch --flake /etc/nixos/NixOS-Config/.#JimNixServer;
|
||||
home-manager switch --flake /etc/nixos/NixOS-Config/.#jimbo@JimNixServer;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
# Enable git and config
|
||||
programs.git = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../../nixos/modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
userName = secrets.jimUsername;
|
||||
userEmail = secrets.jimEmail;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
# Modules
|
||||
./modules/security.nix
|
||||
./modules/networking.nix
|
||||
|
||||
# Hardware
|
||||
./hardware/machines/desktop.nix
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# My modules
|
||||
./networking.nix
|
||||
./gpg.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
@ -60,7 +61,7 @@
|
|||
|
||||
# Set timezone
|
||||
time.timeZone = let
|
||||
secrets = import ../common/secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in secrets.timeZone;
|
||||
|
||||
# Select internationalisation properties.
|
||||
|
|
6
nixos/modules/gpg.nix
Normal file
6
nixos/modules/gpg.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
# Set hostnames
|
||||
hosts = let
|
||||
ips = import ../common/ips.nix;
|
||||
ips = import ../modules/ips.nix;
|
||||
in {
|
||||
"${ips.server}" = ["server"];
|
||||
"${ips.pc}" = ["pc"];
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
# Modules
|
||||
./modules/security.nix
|
||||
./modules/networking.nix
|
||||
|
||||
# Hardware
|
||||
./hardware/machines/server.nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
security.acme = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
acceptTerms = true;
|
||||
defaults.email = secrets.jimEmail;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
# DDClient for Dynamic IPs
|
||||
services.ddclient = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
protocol = "cloudflare";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
# Configure the Element web server
|
||||
nixpkgs.config.element-web.conf = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Configure firewall
|
||||
networking = let
|
||||
ips = import ../modules/ips.nix;
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
firewall = {
|
||||
allowPing = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
services.gitea = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
services.lemmy = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
nginx.enable = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in rec {
|
||||
# Mail server
|
||||
mailserver = rec {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
services.mastodon = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
localDomain = "social.${secrets.jimDomain}";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
services.nginx = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
package = (pkgs.nginx.override {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, lib, ...}: {
|
||||
services.pufferpanel = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
environment = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, config, ...}: {
|
||||
services = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
# Synapse Matrix server
|
||||
matrix-synapse = with config.services.coturn; {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
services.vaultwarden = let
|
||||
secrets = import ../../../secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
enable = true;
|
||||
config = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
users.users = {
|
||||
jimbo = let
|
||||
secrets = import ../common/secrets.nix;
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
description = "Jimbo";
|
||||
hashedPassword = secrets.jimboAccPass;
|
||||
|
|
Loading…
Reference in a new issue