fix: fix the 10 billion mistakes made in refactoring
This commit is contained in:
1 parent
5c6888a352
commit
f3415cbdf7
7 files changed
+74
-64
No files matched your search
@@ -1,5 +1,12 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../options.nix
|
||||||
|
|
||||||
./git.nix
|
./git.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
@@ -15,4 +22,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
|
nix-leonhard = lib.mkIf (osConfig != null) (lib.mkDefault osConfig.nix-leonhard);
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
home.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
+5
-3
@@ -14,17 +14,19 @@ let
|
|||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = modules ++ [
|
modules = modules ++ [
|
||||||
../system
|
../system
|
||||||
../options.nix
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.leonhard = ../home/default.nix;
|
home-manager.users.leonhard = ../home;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
desktop = mkNixosSystem [ ./desktop ];
|
desktop = mkNixosSystem [ ./desktop ];
|
||||||
server = mkNixosSystem [ ./server ];
|
server = mkNixosSystem [
|
||||||
|
./server
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
}
|
}
|
||||||
+53
-51
@@ -26,67 +26,69 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-leonhard.graphical = false;
|
config = {
|
||||||
|
nix-leonhard.graphical = false;
|
||||||
|
|
||||||
# Intentional antipattern for information that is not
|
# Intentional antipattern for information that is not
|
||||||
# critical but should still not be in the config
|
# critical but should still not be in the config
|
||||||
nix-leonhard.domain = builtins.readFile config.sops.secrets.domain.path;
|
nix-leonhard.domain = builtins.readFile config.sops.secrets.domain.path;
|
||||||
nix-leonhard.publicKeys = builtins.readFile config.sops.secrets.domain.publicKeys;
|
nix-leonhard.publicKeys = builtins.readFile config.sops.secrets.domain.publicKeys.path;
|
||||||
|
|
||||||
users.users.leonhard = {
|
users.users.leonhard = {
|
||||||
initialPassword = "leonhard";
|
initialPassword = "leonhard";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
|
openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "server";
|
hostName = "server";
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
interfaces.eno1 = {
|
interfaces.eno1 = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = "192.168.178.210";
|
address = "192.168.178.210";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultGateway = {
|
||||||
|
address = "192.168.178.1";
|
||||||
|
interface = "eno1";
|
||||||
|
};
|
||||||
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
defaultGateway = {
|
|
||||||
address = "192.168.178.1";
|
services.openssh = {
|
||||||
interface = "eno1";
|
enable = true;
|
||||||
|
ports = [ 5432 ];
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nameservers = [
|
|
||||||
"1.1.1.1"
|
|
||||||
"8.8.8.8"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
security.acme = {
|
||||||
enable = true;
|
acceptTerms = true;
|
||||||
ports = [ 5432 ];
|
defaults.email = "admin@${config.nix-leonhard.domain}";
|
||||||
settings = {
|
defaults.webroot = "/var/lib/acme/acme-challenge/";
|
||||||
PasswordAuthentication = false;
|
certs.${config.nix-leonhard.domain} = {
|
||||||
KbdInteractiveAuthentication = false;
|
group = config.services.nginx.group;
|
||||||
PermitRootLogin = "no";
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
security.acme = {
|
services.nginx = {
|
||||||
acceptTerms = true;
|
enable = true;
|
||||||
defaults.email = "admin@${config.nix-leonhard.domain}";
|
|
||||||
defaults.webroot = "/var/lib/acme/acme-challenge/";
|
|
||||||
certs.${config.nix-leonhard.domain} = {
|
|
||||||
group = config.services.nginx.group;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
virtualHosts.${config.nix-leonhard.domain} = {
|
||||||
enable = true;
|
forceSSL = true;
|
||||||
|
useACMEHost = config.nix-leonhard.domain;
|
||||||
virtualHosts.${config.nix-leonhard.domain} = {
|
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
||||||
forceSSL = true;
|
};
|
||||||
useACMEHost = config.nix-leonhard.domain;
|
|
||||||
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./secret-config.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.secrets.dyndns = {
|
sops.secrets.dyndns = {
|
||||||
format = "dotenv";
|
format = "dotenv";
|
||||||
sopsFile = ./dyndns.env;
|
sopsFile = ./dyndns.env;
|
||||||
@@ -20,11 +16,11 @@
|
|||||||
sops.secrets.domain = {
|
sops.secrets.domain = {
|
||||||
format = "json";
|
format = "json";
|
||||||
sopsFile = ./secret-config.json;
|
sopsFile = ./secret-config.json;
|
||||||
mode = 0444;
|
mode = "0444";
|
||||||
};
|
};
|
||||||
sops.secrets.publicKeys = {
|
sops.secrets.publicKeys = {
|
||||||
format = "json";
|
format = "json";
|
||||||
sopsFile = ./secret-config.json;
|
sopsFile = ./secret-config.json;
|
||||||
mode = 0444;
|
mode = "0444";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,4 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,6 @@ homeManagerConfiguration {
|
|||||||
modules = [
|
modules = [
|
||||||
./base.nix
|
./base.nix
|
||||||
../home
|
../home
|
||||||
../options.nix
|
|
||||||
{
|
{
|
||||||
nix-leonhard.graphical = false;
|
nix-leonhard.graphical = false;
|
||||||
nix-leonhard.neovim.enable = true;
|
nix-leonhard.neovim.enable = true;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../options.nix
|
||||||
|
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./ly.nix
|
./ly.nix
|
||||||
|
|||||||
Reference in new issue
Block a user