2024-08-01 21:22:47 +02:00
|
|
|
{ lib, pkgs, config, ...} @ args: let
|
|
|
|
inherit (lib) mkOption types;
|
|
|
|
cfg = config.chuj.system;
|
|
|
|
in {
|
|
|
|
options.chuj.system = {
|
|
|
|
user = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
host = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
platform = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
groups = mkOption {
|
|
|
|
type = types.listOf types.str;
|
|
|
|
default = [];
|
|
|
|
};
|
|
|
|
stateVersion = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "23.11";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
networking.hostName = cfg.host;
|
|
|
|
users.users.${cfg.user} = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ] ++ cfg.groups;
|
|
|
|
};
|
|
|
|
nixpkgs.hostPlatform = cfg.platform;
|
|
|
|
system.stateVersion = cfg.stateVersion;
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Warsaw";
|
|
|
|
hardware.pulseaudio.enable = true;
|
2024-08-04 00:16:29 +02:00
|
|
|
|
2024-08-04 15:11:52 +02:00
|
|
|
networking = {
|
|
|
|
nameservers = [ "9.9.9.9" ];
|
|
|
|
networkmanager = {
|
|
|
|
enable = true;
|
|
|
|
insertNameservers = [ "9.9.9.9" ];
|
|
|
|
};
|
2024-08-04 00:16:29 +02:00
|
|
|
};
|
|
|
|
|
2024-08-01 21:22:47 +02:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
nixpkgs.overlays = import ../pkgs args;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
security.sudo = {
|
|
|
|
package = pkgs.sudo.override { withInsults = true; };
|
|
|
|
extraConfig = ''
|
|
|
|
Defaults pwfeedback
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
ed # is the standard text editor.
|
|
|
|
|
|
|
|
ripgrep
|
|
|
|
file
|
|
|
|
tree
|
|
|
|
btop
|
|
|
|
wget
|
|
|
|
|
|
|
|
zip
|
|
|
|
unzip
|
2024-08-10 01:03:29 +02:00
|
|
|
# rar
|
2024-08-01 21:22:47 +02:00
|
|
|
unrar
|
|
|
|
p7zip
|
|
|
|
p7zip-rar
|
|
|
|
|
|
|
|
gcc
|
|
|
|
gnumake
|
|
|
|
python311
|
|
|
|
];
|
|
|
|
};
|
2024-08-04 00:16:29 +02:00
|
|
|
}
|