feat: try rework
This commit is contained in:
parent
1ddbd3b8b6
commit
ecf10628c3
51 changed files with 1941 additions and 445 deletions
9
system/default.nix
Normal file
9
system/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./sops.nix
|
||||
./static-ip.nix
|
||||
./users.nix
|
||||
];
|
||||
}
|
||||
14
system/sops.nix
Normal file
14
system/sops.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
secretData = import ../intermediate/secrets.nix;
|
||||
in
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
secrets = secretData.byName;
|
||||
};
|
||||
|
||||
warnings = lib.optional (secretData.missing != [])
|
||||
"Some SOPS source files are missing or not yet encrypted; no runtime secrets will be provisioned for: ${builtins.concatStringsSep ", " (map (item: builtins.concatStringsSep "_" item.path) secretData.missing)}";
|
||||
}
|
||||
15
system/static-ip.nix
Normal file
15
system/static-ip.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
net = import ../config/network.nix;
|
||||
in
|
||||
{
|
||||
networking.interfaces.eth0.ipv4.addresses = [{
|
||||
address = net.devices.self.ip;
|
||||
prefixLength = net.network.cidr;
|
||||
}];
|
||||
|
||||
networking.defaultGateway = net.network.gateway;
|
||||
|
||||
networking.nameservers = net.fallback_dns_servers;
|
||||
}
|
||||
8
system/users.nix
Normal file
8
system/users.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
users.users.nudelerde = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "docker"];
|
||||
hashedPassword = "$y$j9T$NiaiVxQKs0C1V4VdCFKBO.$P6RfBDTyJfPJJzKyHf9PJEy9Ku5M6AU57U98nVD6wP6";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue