rewrite
This commit is contained in:
15
modules/common/networking.nix
Normal file
15
modules/common/networking.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/London";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console.keyMap = "uk";
|
||||
|
||||
networking = {
|
||||
firewall.enable = true;
|
||||
firewall.allowedTCPPorts = [ 22 ]; # SSH
|
||||
hostName = config.networking.hostName or "nixos";
|
||||
useDHCP = false;
|
||||
usePredictableInterfaceNames = false;
|
||||
};
|
||||
}
|
||||
18
modules/common/packages.nix
Normal file
18
modules/common/packages.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
nano
|
||||
vim
|
||||
git
|
||||
curl
|
||||
wget
|
||||
sops
|
||||
age
|
||||
inetutils
|
||||
mtr
|
||||
sysstat
|
||||
dig
|
||||
openssl
|
||||
];
|
||||
}
|
||||
6
modules/common/services.nix
Normal file
6
modules/common/services.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "no";
|
||||
}
|
||||
10
modules/common/system.nix
Normal file
10
modules/common/system.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.xserver.xkb.layout = "uk";
|
||||
}
|
||||
35
modules/common/users.nix
Normal file
35
modules/common/users.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.users.phoenix = {
|
||||
isNormalUser = true;
|
||||
description = "Phoenix";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.bash;
|
||||
home = "/home/phoenix";
|
||||
createHome = true;
|
||||
useDefaultShell = true;
|
||||
};
|
||||
|
||||
users.users.deploy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
home = "/home/deploy";
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "phoenix" ];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||
}
|
||||
Reference in New Issue
Block a user