86 lines
1.9 KiB
Nix
86 lines
1.9 KiB
Nix
{
|
|
system, pkgs, nixpkgs-flake, hostname,
|
|
}:
|
|
{
|
|
nixpkgs.config.allowUnfree = true; # lol
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "03:00";
|
|
};
|
|
|
|
nix.registry = {
|
|
templates = {
|
|
from = { type = "indirect"; id = "templates"; };
|
|
to = { type = "git"; url = "https://githug.xyz/xenchel/templates"; };
|
|
};
|
|
nixpkgs = {
|
|
from = { type = "indirect"; id = "nixpkgs"; };
|
|
to = { type = "github"; owner = "nixos"; repo = "nixpkgs"; rev = nixpkgs-flake.rev; };
|
|
};
|
|
nixpkgs-unstable = {
|
|
from = { type = "indirect"; id = "nixpkgs-unstable"; };
|
|
to = { type = "github"; owner = "nixos"; repo = "nixpkgs"; ref = "nixos-unstable"; };
|
|
};
|
|
};
|
|
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
|
|
|
|
networking.hostName = hostname;
|
|
|
|
time.timeZone = "Europe/Stockholm";
|
|
|
|
services.logind.lidSwitch = "ignore";
|
|
services.logind.lidSwitchDocked = "ignore";
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
ports = [ 24 ]; # TODO: Set up honeypot on port 22
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
PermitRootLogin = "no";
|
|
};
|
|
};
|
|
|
|
programs.mosh.enable = true;
|
|
|
|
# TODO: Options for more users
|
|
users.users.coral = { # hi # hi
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "docker" ];
|
|
shell = pkgs.zsh;
|
|
uid = 1000;
|
|
};
|
|
|
|
users.users.guest = {
|
|
isNormalUser = true;
|
|
extraGroups = [ ];
|
|
home = "/home/guest";
|
|
shell = pkgs.zsh;
|
|
uid = 1001;
|
|
};
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
binutils
|
|
coreutils
|
|
|
|
lsof file traceroute
|
|
|
|
home-manager
|
|
git # for home-manager
|
|
];
|
|
|
|
programs.zsh.enable = true;
|
|
programs.java = { enable = true; package = pkgs.jdk11; };
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
};
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
}
|