mirror of
https://github.com/michaelthomson0797/nixos-server.git
synced 2025-12-19 11:28:48 +00:00
initial commit
This commit is contained in:
56
modules/base.nix
Normal file
56
modules/base.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
pkgs,
|
||||
meta,
|
||||
...
|
||||
}: {
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
time.timeZone = "America/Toronto";
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = meta.hostname;
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
vim
|
||||
git
|
||||
];
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
mthomson = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
password = "pw123";
|
||||
openssh.authorizedKeys.keys = [meta.publicKey];
|
||||
};
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = [meta.publicKey];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
Reference in New Issue
Block a user