mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-24 05:08:36 +01:00
140 lines
3.4 KiB
Nix
140 lines
3.4 KiB
Nix
{ inputs, config, pkgs, username,
|
|
hostname, gitUsername, theLocale,
|
|
theTimezone, wallpaperDir, wallpaperGit, ... }:
|
|
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan
|
|
./hardware-configuration.nix
|
|
];
|
|
|
|
# Bootloader
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
# This is for OBS Virtual Cam Support - v4l2loopback setup
|
|
boot.kernelModules = [ "v4l2loopback" ];
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
|
|
|
# Enable networking
|
|
networking.hostName = "${hostname}"; # Define your hostname
|
|
networking.networkmanager.enable = true;
|
|
|
|
# Set your time zone
|
|
time.timeZone = "${theTimezone}";
|
|
|
|
# Select internationalisation properties
|
|
i18n.defaultLocale = "${theLocale}";
|
|
i18n.extraLocaleSettings = {
|
|
LC_ADDRESS = "${theLocale}";
|
|
LC_IDENTIFICATION = "${theLocale}";
|
|
LC_MEASUREMENT = "${theLocale}";
|
|
LC_MONETARY = "${theLocale}";
|
|
LC_NAME = "${theLocale}";
|
|
LC_NUMERIC = "${theLocale}";
|
|
LC_PAPER = "${theLocale}";
|
|
LC_TELEPHONE = "${theLocale}";
|
|
LC_TIME = "${theLocale}";
|
|
};
|
|
|
|
# Define a user account.
|
|
users.users."${username}" = {
|
|
homeMode = "755";
|
|
isNormalUser = true;
|
|
description = "${gitUsername}";
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
|
packages = with pkgs; [];
|
|
};
|
|
|
|
# Allow unfree packages
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
# $ nix search wget
|
|
environment.systemPackages = with pkgs; [
|
|
vim wget curl
|
|
];
|
|
|
|
fonts.packages = with pkgs; [
|
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
|
];
|
|
|
|
# Steam Configuration
|
|
programs.steam = {
|
|
enable = true;
|
|
remotePlay.openFirewall = true;
|
|
dedicatedServer.openFirewall = true;
|
|
};
|
|
|
|
# OpenGL
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
};
|
|
|
|
programs.hyprland = {
|
|
enable = true;
|
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
|
};
|
|
|
|
system.activationScripts = {
|
|
installwallpapers.text = ''
|
|
if [ -d "${wallpaperDir}" ]; then
|
|
cd "${wallpaperDir}" && ${pkgs.git}/bin/git pull
|
|
else
|
|
${pkgs.git}/bin/git clone "${wallpaperGit}" "${wallpaperDir}"
|
|
fi
|
|
'';
|
|
};
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
# started in user sessions.
|
|
programs.mtr.enable = true;
|
|
programs.gnupg.agent = {
|
|
enable = true;
|
|
enableSSHSupport = true;
|
|
};
|
|
|
|
# List services that you want to enable:
|
|
services.openssh.enable = true;
|
|
services.fstrim.enable = true;
|
|
services.xserver = {
|
|
enable = true;
|
|
layout = "us";
|
|
xkbVariant = "";
|
|
libinput.enable = true;
|
|
videoDrivers = [ "amdgpu" ];
|
|
displayManager.gdm = {
|
|
enable = true;
|
|
wayland = true;
|
|
};
|
|
};
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
jack.enable = true;
|
|
};
|
|
hardware.pulseaudio.enable = false;
|
|
sound.enable = true;
|
|
security.rtkit.enable = true;
|
|
programs.thunar.enable = true;
|
|
services.gvfs.enable = true;
|
|
services.tumbler.enable = true;
|
|
|
|
# Optimization settings and garbage collection automation
|
|
nix = {
|
|
settings.auto-optimise-store = true;
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
}
|