2024-01-15 22:07:47 -07:00
|
|
|
{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }:
|
|
|
|
let
|
|
|
|
supportedDesktops = [ "kde" ];
|
|
|
|
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
|
|
|
deskCfg = config.deskCfg;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.deskCfg = {
|
|
|
|
de = lib.mkOption {
|
|
|
|
default = "kde";
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Desktop Environment";
|
|
|
|
};
|
|
|
|
userName = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Main username for system";
|
|
|
|
};
|
|
|
|
hostName = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Hostname for system";
|
|
|
|
};
|
|
|
|
installGaming = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = true;
|
|
|
|
description = "Whether to install gaming software or not";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
modules/user/main_user.nix
|
2024-01-20 11:52:14 -07:00
|
|
|
modules/labwc/labwc_conf.nix
|
2024-01-15 22:07:47 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
assertions = [
|
|
|
|
{
|
|
|
|
assertion = builtins.elem deskCfg.de supportedDesktops;
|
|
|
|
message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
inputs.nur.overlay
|
|
|
|
];
|
|
|
|
|
|
|
|
# Enable flakes feature
|
|
|
|
nix.settings.experimental-features = [
|
|
|
|
"nix-command" "flakes"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2024-01-20 11:52:14 -07:00
|
|
|
# boot.plymouth.enable = true;
|
2024-01-15 22:07:47 -07:00
|
|
|
|
|
|
|
networking.hostName = deskCfg.hostName; # Define your hostname.
|
|
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
|
|
|
|
time.timeZone = timeZone;
|
|
|
|
|
|
|
|
|
|
|
|
users.users.${deskCfg.userName} = {
|
|
|
|
isNormalUser = true;
|
|
|
|
initialPassword = "password";
|
|
|
|
description = "main user";
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"networkmanager"
|
|
|
|
"corectrl"
|
|
|
|
deskCfg.userName
|
|
|
|
"video"
|
|
|
|
"audio"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# main_user = {
|
|
|
|
# enable = true;
|
|
|
|
# userName = deskCfg.userName;
|
|
|
|
# isDesktopUser = true;
|
|
|
|
# };
|
|
|
|
|
2024-01-20 11:52:14 -07:00
|
|
|
labwc = {
|
2024-01-15 22:07:47 -07:00
|
|
|
enable = true;
|
|
|
|
useNonFree = true;
|
|
|
|
installGaming = deskCfg.installGaming;
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
libreoffice
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|