Compare commits
4 commits
53d61c4f01
...
ba1aff1f79
Author | SHA1 | Date | |
---|---|---|---|
ba1aff1f79 | |||
38d26f81f4 | |||
764eba8a83 | |||
4724e334bd |
6 changed files with 57 additions and 22 deletions
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"editor.tabSize": 2,
|
||||
}
|
|
@ -31,6 +31,8 @@
|
|||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGLHqRBcN584SXXa7snrOs89Wy5Jjvsq+GlFXTTBYfp ash@ash-pc"
|
||||
"sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBKx0GvYviMXBGtGN/V3t0uPkT6tmpQhtGbd1GzDoNe75K9ZorsrZaBbJBjg39yCVMkWnWjWYGd7R7GcV3fKeLGoAAAAEc3NoOg== ash@fern"
|
||||
"sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGnb4PwF+hL21JY0ytFpkk/WaYM19Xv9efYQGdeba5a2RcElFKoEtklU4SUh+uhwaOz4TP3lWJUMEnfDDpFnmlwAAAAEc3NoOg== ash@alex"
|
||||
];
|
||||
hashedPassword = "$y$j9T$YZw49GYsZi6pm5MH3W2gX1$BKPBL3g4jAWUJP0WY0lRrBLorxzcENVqGTG0dAly3v7";
|
||||
extraGroups = [ "wheel" "audio" "dialout" "adbusers" ];
|
||||
|
|
11
hosts/amy/configuration.nix
Normal file
11
hosts/amy/configuration.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
networking.hostName = "amy";
|
||||
networking.domain = "serv.ashhhleyyy.dev";
|
||||
services.openssh.enable = true;
|
||||
system.stateVersion = "23.11";
|
||||
}
|
11
hosts/amy/hardware-configuration.nix
Normal file
11
hosts/amy/hardware-configuration.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
|
@ -14,6 +14,8 @@
|
|||
boot.loader.grub.device = "/dev/sdb";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
services.smartd.enable = true;
|
||||
|
||||
networking.hostName = "lea";
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
@ -22,18 +24,6 @@
|
|||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
|
@ -43,17 +33,13 @@
|
|||
|
||||
nix.settings.trusted-users = [ "@wheel" ];
|
||||
|
||||
users.users.ash = {
|
||||
isNormalUser = true;
|
||||
description = "Ashley";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
users.users.ash.extraGroups = [ "networkmanager" ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
smartmontools
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
|
|
@ -1,16 +1,38 @@
|
|||
{ config, pkgs, ... }: {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_14;
|
||||
settings = {
|
||||
max_connections = 200;
|
||||
shared_buffers = "768MB";
|
||||
effective_cache_size = "2304MB";
|
||||
maintenance_work_mem = "192MB";
|
||||
checkpoint_completion_target = 0.9;
|
||||
wal_buffers = "16MB";
|
||||
default_statistics_target = 100;
|
||||
random_page_cost = 4;
|
||||
effective_io_concurrency = 2;
|
||||
work_mem = "1966kB";
|
||||
huge_pages = false;
|
||||
min_wal_size = "1GB";
|
||||
max_wal_size = "4GB";
|
||||
max_worker_processes = 4;
|
||||
max_parallel_workers_per_gather = 2;
|
||||
max_parallel_workers = 4;
|
||||
max_parallel_maintenance_workers = 2;
|
||||
};
|
||||
ensureDatabases = [ "shorks-gay" ];
|
||||
enableTCPIP = true;
|
||||
dataDir = "/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
authentication = pkgs.lib.mkOverride 10 ''
|
||||
#type database DBuser origin-address auth-method
|
||||
#type database DBuser auth-method
|
||||
local all all peer
|
||||
#type database DBuser origin-address auth-method
|
||||
# ipv4
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all 100.64.0.0/10 trust
|
||||
host all all 127.0.0.1/32 scram-sha-256
|
||||
host all all 100.64.0.0/10 scram-sha-256
|
||||
# ipv6
|
||||
host all all ::1/128 trust
|
||||
host all all ::1/128 scram-sha-256
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue