restructure nixos modules
This commit is contained in:
parent
ace5df1b43
commit
1f5d121fd0
10 changed files with 7 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, config, lib, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./modules/custom
|
||||
./modules
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
device = "/dev/nvme0n1";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "500M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
end = "-4G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
swap = { size = "100%"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,7 +3,8 @@ let
|
|||
cfg = config.custom.ssh;
|
||||
hostCert = builtins.toFile "host_ed25519-cert.pub" cfg.hostCert;
|
||||
userCert = builtins.toFile "user_ed25519-cert.pub" cfg.userCert;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
custom = {
|
||||
ssh = {
|
||||
|
@ -31,7 +32,7 @@ in {
|
|||
|
||||
hostKey = lib.mkOption {
|
||||
default =
|
||||
../../secrets/${config.networking.hostName}_host_ed25519.age;
|
||||
../secrets/${config.networking.hostName}_host_ed25519.age;
|
||||
type = lib.types.path;
|
||||
description = ''
|
||||
SSH host key
|
||||
|
@ -40,7 +41,7 @@ in {
|
|||
|
||||
userKey = lib.mkOption {
|
||||
default =
|
||||
../../secrets/${config.networking.hostName}_user_ed25519.age;
|
||||
../secrets/${config.networking.hostName}_user_ed25519.age;
|
||||
type = lib.types.path;
|
||||
description = ''
|
||||
SSH user key
|
|
@ -30,7 +30,7 @@ in {
|
|||
settings =
|
||||
let
|
||||
serverCert = builtins.toFile "postgresql_server.crt"
|
||||
(builtins.readFile ../../postgresql_server.crt);
|
||||
(builtins.readFile ../postgresql_server.crt);
|
||||
in
|
||||
{
|
||||
ssl = true;
|
||||
|
@ -48,7 +48,7 @@ in {
|
|||
networking.firewall.allowedTCPPorts = [ 5432 ];
|
||||
|
||||
age.secrets."postgresql_server.key" = {
|
||||
file = ../../secrets/postgresql_server.key.age;
|
||||
file = ../secrets/postgresql_server.key.age;
|
||||
mode = "400";
|
||||
owner = builtins.toString config.ids.uids.postgres;
|
||||
group = builtins.toString config.ids.gids.postgres;
|
Loading…
Reference in a new issue