208 lines
4.7 KiB
Nix
208 lines
4.7 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
inputs,
|
|
outputs,
|
|
pkgs,
|
|
timeZone,
|
|
system,
|
|
...
|
|
}:
|
|
let
|
|
supportedDesktops = [
|
|
"sway"
|
|
"hyprland"
|
|
"niri"
|
|
];
|
|
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
|
deskCfg = config.deskCfg;
|
|
in
|
|
{
|
|
options.deskCfg = {
|
|
de = lib.mkOption {
|
|
default = "niri";
|
|
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";
|
|
};
|
|
fullName = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "User";
|
|
description = "Full display name for the user";
|
|
};
|
|
installGaming = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Whether to install gaming software or not";
|
|
};
|
|
flakePath = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Absolute path to the NixOS flake configuration directory";
|
|
};
|
|
};
|
|
|
|
imports = [
|
|
../shared/modules/user/main_user.nix
|
|
modules/sway/sway_conf.nix
|
|
modules/hypr/hyprland.nix
|
|
modules/niri/niri_conf.nix
|
|
../shared/modules/system/power_manager.nix
|
|
../shared/modules/system/noctalia-system.nix
|
|
../shared/modules/services/motu-m4-combined.nix
|
|
# ../shared/modules/services/theme_switcher/default.nix
|
|
# inputs.nur.hmModules.nur
|
|
];
|
|
|
|
config = {
|
|
assertions = [
|
|
{
|
|
assertion = builtins.elem deskCfg.de supportedDesktops;
|
|
message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}";
|
|
}
|
|
];
|
|
|
|
# Stylix theming - auto-generate color scheme from wallpaper
|
|
stylix = {
|
|
enable = true;
|
|
image = ./bot-wallpaper.jpg;
|
|
|
|
# Check with `nix build nixpkgs#base16-schemes && ls result/share/themes`
|
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/kimber.yaml";
|
|
polarity = "dark";
|
|
|
|
# System-wide cursor
|
|
cursor = {
|
|
package = pkgs.bibata-cursors;
|
|
name = "Bibata-Modern-Classic";
|
|
size = 32;
|
|
};
|
|
|
|
# Fonts
|
|
fonts = {
|
|
serif = {
|
|
package = pkgs.lato;
|
|
name = "Lato";
|
|
};
|
|
sansSerif = {
|
|
package = pkgs.lato;
|
|
name = "Lato";
|
|
};
|
|
monospace = {
|
|
package = pkgs.maple-mono.NF;
|
|
name = "Maple Mono NF";
|
|
};
|
|
emoji = {
|
|
package = pkgs.noto-fonts-color-emoji;
|
|
name = "Noto Color Emoji";
|
|
};
|
|
sizes = {
|
|
applications = 14;
|
|
desktop = 16;
|
|
popups = 14;
|
|
terminal = 14;
|
|
};
|
|
};
|
|
|
|
iconTheme = {
|
|
enable = true;
|
|
package = pkgs.papirus-icon-theme;
|
|
light = "Papirus-Light";
|
|
dark = "Papirus-Dark";
|
|
};
|
|
|
|
targets = {
|
|
# Let plymouth use its own theme
|
|
plymouth.enable = false;
|
|
};
|
|
};
|
|
|
|
nixpkgs.overlays = [
|
|
inputs.nur.overlays.default
|
|
];
|
|
|
|
# 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;
|
|
# boot.plymouth.enable = true;
|
|
|
|
networking.hostName = deskCfg.hostName; # Define your hostname.
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
time.timeZone = timeZone;
|
|
|
|
hardware.sane = {
|
|
enable = true;
|
|
brscan5.enable = true;
|
|
};
|
|
|
|
power_manager = {
|
|
enable = true;
|
|
backend = "power-profiles-daemon"; # Required for Noctalia power profile widget
|
|
};
|
|
|
|
# Enable Noctalia shell system services
|
|
noctaliaSystem.enable = true;
|
|
|
|
main_user = {
|
|
enable = true;
|
|
userName = deskCfg.userName;
|
|
fullName = deskCfg.fullName;
|
|
isDesktopUser = true;
|
|
extraGroups = [
|
|
"dialout"
|
|
"docker"
|
|
"i2c"
|
|
"lp"
|
|
"scanner"
|
|
"syncthing"
|
|
];
|
|
};
|
|
|
|
swaywm = {
|
|
enable = false;
|
|
useNonFree = true;
|
|
installGaming = deskCfg.installGaming;
|
|
systemPackages = with pkgs; [
|
|
libreoffice
|
|
];
|
|
};
|
|
|
|
hypr = {
|
|
enable = false;
|
|
user = deskCfg.userName;
|
|
systemPackages = with pkgs; [
|
|
libreoffice
|
|
];
|
|
};
|
|
|
|
niriwm = {
|
|
enable = true;
|
|
useNonFree = true;
|
|
user = deskCfg.userName;
|
|
systemPackages = with pkgs; [
|
|
libreoffice
|
|
];
|
|
};
|
|
|
|
services.motu-m4-combined = {
|
|
enable = true;
|
|
user = deskCfg.userName;
|
|
};
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
};
|
|
}
|