2023-10-21 12:56:02 +02:00
|
|
|
{
|
2024-03-30 21:49:03 +01:00
|
|
|
system, pkgs, nixpkgs-flake, hostname,
|
2023-10-21 12:56:02 +02:00
|
|
|
}:
|
|
|
|
{
|
|
|
|
nixpkgs.config.allowUnfree = true; # lol
|
|
|
|
|
2024-03-30 21:49:03 +01:00
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "03:00";
|
|
|
|
};
|
|
|
|
|
|
|
|
nix.registry = {
|
|
|
|
templates = {
|
|
|
|
from = { type = "indirect"; id = "templates"; };
|
2024-05-17 21:23:26 +02:00
|
|
|
to = { type = "git"; url = "https://githug.xyz/xenchel/templates"; };
|
2024-03-30 21:49:03 +01:00
|
|
|
};
|
2024-06-08 22:00:14 +02:00
|
|
|
nixpkgs = {
|
2024-05-17 21:23:39 +02:00
|
|
|
from = { type = "indirect"; id = "nixpkgs"; };
|
2024-06-08 22:00:14 +02:00
|
|
|
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"; };
|
2024-05-17 21:23:39 +02:00
|
|
|
};
|
2024-03-30 21:49:03 +01:00
|
|
|
};
|
|
|
|
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
|
|
|
|
|
2023-10-21 12:56:02 +02:00
|
|
|
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;
|
2024-07-03 18:59:55 +02:00
|
|
|
uid = 1000;
|
2023-10-21 12:56:02 +02:00
|
|
|
};
|
|
|
|
|
2024-06-09 20:09:45 +02:00
|
|
|
users.users.guest = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ ];
|
|
|
|
home = "/home/guest";
|
|
|
|
shell = pkgs.zsh;
|
2024-07-03 18:59:55 +02:00
|
|
|
uid = 1001;
|
2024-06-09 20:09:45 +02:00
|
|
|
};
|
|
|
|
|
2024-06-09 20:24:55 +02:00
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
2023-10-21 12:56:02 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
binutils
|
|
|
|
coreutils
|
|
|
|
|
|
|
|
home-manager
|
2023-10-27 23:57:55 +02:00
|
|
|
git # for home-manager
|
2023-10-21 12:56:02 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
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?
|
|
|
|
}
|