62 lines
1.5 KiB
Nix
62 lines
1.5 KiB
Nix
{ config, lib, inputs, outputs, pkgs, userName, hostName, desktop, timeZone, gaming, system, ... }:
|
|
|
|
let
|
|
supportedDesktops = [ "sway" "kde" ];
|
|
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
|
in
|
|
{
|
|
assertions = [
|
|
{
|
|
assertion = builtins.elem desktop supportedDesktops;
|
|
message = "Unsupported desktop environment: ${desktop}\nSupported DE's: ${supportedDesktopsStr}";
|
|
}
|
|
];
|
|
|
|
nixpkgs.overlays = [
|
|
inputs.nur.overlay
|
|
];
|
|
|
|
imports = [ # Include the results of the hardware scan.
|
|
./hardware-configuration.nix
|
|
../modules/user/main_user.nix
|
|
../modules/sway/sway_conf.nix
|
|
# inputs.nur.hmModules.nur
|
|
];
|
|
|
|
# Enable flakes feature
|
|
nix.settings.experimental-features = [
|
|
"nix-command" "flakes"
|
|
];
|
|
|
|
# programs.nix-ld.dev.enable = true;
|
|
|
|
# nixpkgs.config.allowUnfree = true;
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
networking.hostName = hostName; # Define your hostname.
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
time.timeZone = timeZone;
|
|
|
|
main_user = {
|
|
enable = true;
|
|
userName = userName;
|
|
isDesktopUser = true;
|
|
};
|
|
|
|
swaywm = {
|
|
enable = desktop == "sway";
|
|
useNonFree = true;
|
|
installGaming = gaming;
|
|
systemPackages = with pkgs; [
|
|
libreoffice
|
|
];
|
|
};
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
}
|
|
|