KaitoianOS/hosts/shiroko/configuration.nix

172 lines
4.9 KiB
Nix
Raw Normal View History

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
...
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
2024-12-15 17:50:53 -08:00
services.fprintd.enable = true;
security.pam.services.login.fprintAuth = true;
2025-01-17 16:23:19 -08:00
2024-11-27 20:22:18 -08:00
hardware = {
graphics.enable32Bit = true;
pulseaudio.support32Bit = true;
2025-02-08 01:14:57 -08:00
openrazer.enable = true;
2024-11-27 20:22:18 -08:00
};
2025-01-17 16:23:19 -08:00
2024-12-03 17:30:36 -08:00
boot = {
# Bootloader.
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
plymouth = {
enable = true;
2024-12-15 17:50:53 -08:00
font = "${config.stylix.fonts.monospace.package}/share/fonts/truetype/NerdFonts/CaskaydiaCove/CaskaydiaCoveNerdFontMono-Regular.ttf";
2024-12-03 17:30:36 -08:00
};
consoleLogLevel = 3;
initrd.systemd.enable = true;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
"mem_sleep_default=deep"
];
};
virtualisation.waydroid.enable = true;
2025-01-17 16:23:19 -08:00
boot.kernelPackages = pkgs.linuxPackages_zen;
networking.hostName = "shiroko"; # Define your hostname.
2024-11-27 20:22:18 -08:00
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
2024-12-03 17:30:36 -08:00
services.keyd = {
enable = true;
keyboards.default = {
ids = [ "*" ];
settings = {
main = {
capslock = "esc";
leftalt = "leftcontrol";
leftcontrol = "leftalt";
y = "z";
z = "y";
};
};
};
};
2024-11-19 08:07:14 -08:00
#security yargen
#If i become a twat
2024-11-05 10:25:03 -08:00
services.desktopManager.plasma6.enable = false;
2024-09-24 21:17:49 -07:00
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
2024-09-18 10:28:09 -07:00
security.polkit.enable = true;
# Enable networking
networking.networkmanager.enable = true;
2024-11-19 08:07:14 -08:00
#Here's my Attempt of Sleep XD
systemd.sleep.extraConfig = ''
AllowSuspend=yes
AllowHibernation=yes
AllowHybridSleep=yes
AllowSuspendThenHibernate=yes
'';
2025-01-10 15:29:27 -08:00
#Conclusion: Intel Hates Me
2024-11-19 08:07:14 -08:00
#laptop Optmization
powerManagement.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
2024-11-27 20:22:18 -08:00
CPU_SCALING_GOVERNOR_ON_BAT = "performance";
2024-11-19 08:07:14 -08:00
2024-11-27 20:22:18 -08:00
CPU_ENERGY_PERF_POLICY_ON_BAT = "performance";
2024-11-19 08:07:14 -08:00
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 20; # 40 and bellow it starts to charge
2024-11-27 20:22:18 -08:00
STOP_CHARGE_THRESH_BAT0 = 98; # 80 and above it stops charging
2024-11-19 08:07:14 -08:00
};
};
2025-01-24 11:51:11 -08:00
environment.systemPackages = with pkgs; [
2025-02-08 01:14:57 -08:00
openrazer-daemon
2025-01-24 11:51:11 -08:00
];
# Set your time zone.
2025-01-09 10:53:15 -08:00
time.timeZone = "America/Los_Angeles"; # Asia/Taipei lib.mkDefault
2024-12-27 20:52:26 +08:00
#services.automatic-timezoned.enable = true;
2025-01-09 10:53:15 -08:00
#time.timeZone = lib.mkForce null;
#services.timesyncd.enable = true;
2025-01-05 15:37:29 +08:00
systemd.services = {
# Ensure network uplink on boot
NetworkManager-wait-online.enable = true;
2025-01-05 15:37:29 +08:00
# Automatic time zone switching
updateTimezone = {
description = "Automatically update timezone using `timedatectl` and `tzupdate`";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
script = ''
timedatectl set-timezone $("${pkgs.tzupdate}/bin/tzupdate" -p)
'';
};
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# List services that you want to enable:
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}