diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-12-11 21:30:28 +0100 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-12-11 21:30:28 +0100 |
commit | 1d517e4ce6fa91f67d713128c0a52c59e1235db7 (patch) | |
tree | 8783331e2adfdc55b45caf86135ed93a0dc48db2 | |
parent | Initial commit (diff) | |
download | Rory-Open-Architecture-1d517e4ce6fa91f67d713128c0a52c59e1235db7.tar.xz |
Deduplicate some configuration
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
-rw-r--r-- | host/Rory-discordbots/configuration.nix | 19 | ||||
-rw-r--r-- | modules/base-server.nix | 45 | ||||
-rw-r--r-- | modules/base.nix | 54 |
3 files changed, 63 insertions, 55 deletions
diff --git a/host/Rory-discordbots/configuration.nix b/host/Rory-discordbots/configuration.nix index 7252a9e..46576f5 100644 --- a/host/Rory-discordbots/configuration.nix +++ b/host/Rory-discordbots/configuration.nix @@ -3,23 +3,10 @@ { imports = [ - ../../../modules/packages/vim.nix + ../../../modules/packages/vim.nix + ../../../modules/base-server.nix ]; - boot = { - loader = { - grub = { - enable = true; - version = 2; - device = "/dev/sda"; # nodev for EFI only - - # EFI - efiSupport = false; - efiInstallAsRemovable = false; - }; - }; - }; - networking = { hostName = "RoryNix"; networkmanager.enable = true; @@ -32,7 +19,7 @@ }; }; - time.timeZone = "Europe/Brussels"; + #time.timeZone = "Europe/Brussels"; i18n.defaultLocale = "en_US.UTF-8"; services = { diff --git a/modules/base-server.nix b/modules/base-server.nix new file mode 100644 index 0000000..0e060e1 --- /dev/null +++ b/modules/base-server.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./base.nix + ]; + + boot = { + loader = { + grub = { + enable = true; + version = 2; + device = "/dev/sda"; # nodev for EFI only + + # EFI + efiSupport = false; + efiInstallAsRemovable = false; + }; + }; + }; + + networking = { + hostName = lib.mkDefault "Rory-nix-base-server"; + firewall = { + enable = false; + # allowedTCPPorts = [ ... ]; + # allowedUDPPorts = [ ... ]; + }; + }; + + services = { + openssh = { + enable = true; + #allow more logins in cases where i have many ssh keys on a system + extraConfig = '' + MaxAuthTries 32 + ''; + }; + }; + + + system.stateVersion = "22.11"; # DO NOT EDIT! +} + diff --git a/modules/base.nix b/modules/base.nix index 8f2102b..69cb20e 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -3,46 +3,30 @@ { imports = [ - ./hardware-configuration.nix - ./packages/vim.nix - ./users.nix + ./packages/vim.nix + ./users.nix ]; - boot = { - loader = { - grub = { - enable = true; - version = 2; - device = "/dev/sda"; # nodev for EFI only - - # EFI - efiSupport = false; - efiInstallAsRemovable = false; - }; - }; - }; - networking = { - hostName = lib.mkDefault "Rory-nix-base"; - - firewall = { - enable = false; - # allowedTCPPorts = [ ... ]; - # allowedUDPPorts = [ ... ]; - }; + hostName = lib.mkDefault "Rory-nix-base"; + firewall = { + enable = false; + # allowedTCPPorts = [ ... ]; + # allowedUDPPorts = [ ... ]; + }; }; #time.timeZone = "Europe/Brussels"; i18n.defaultLocale = "en_US.UTF-8"; services = { - openssh = { - enable = true; - #allow more logins in cases where i have many ssh keys on a system - extraConfig = '' - MaxAuthTries 32 - ''; - }; + openssh = { + enable = true; + #allow more logins in cases where i have many ssh keys on a system + extraConfig = '' + MaxAuthTries 32 + ''; + }; }; security.sudo.wheelNeedsPassword = false; @@ -51,14 +35,6 @@ sound.enable = true; hardware.pulseaudio.enable = true; - users.users.Rory = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - packages = with pkgs; [ - ]; - initialPassword = "password"; - }; - environment.systemPackages = with pkgs; [ wget neofetch |