nix/modules/system.nix

82 lines
1.6 KiB
Nix
Raw Normal View History

2024-09-17 20:01:58 +02:00
{ lib, pkgs, config, ... } @ args: let
2024-08-01 21:22:47 +02:00
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-09-14 19:50:47 +02:00
services.pipewire.enable = false;
2024-10-16 11:40:24 +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-09-14 20:08:05 +02:00
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
2024-08-01 21:22:47 +02:00
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
}