configuration.nix
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.optimise.automatic = true;
nixpkgs.config.allowUnfree = false;
# networking.hostName = ""; # EDIT HOSTNAME
networking.networkmanager.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false;
time.timeZone = "America/New_York";
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
nerdfonts
];
security.rtkit.enable = true;
security.pam.services.hyprlock = {};
services.printing.enable = true;
services.udisks2.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ];
};
services.openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
services.auto-cpufreq.enable = true;
powerManagement.enable = true;
users.mutableUsers = true;
users.defaultUserShell = pkgs.zsh;
users.users.root = {
};
users.users.game = {
isNormalUser = true;
createHome = true;
extraGroups = [ "networkmanager" ];
};
users.users.code = {
isNormalUser = true;
createHome = true;
extraGroups = [ "networkmanager" "adbusers" "dialout" ];
};
environment.systemPackages = [ ];
programs.zsh.enable = true;
programs.hyprland.enable = true;
programs.neovim = {
enable = true;
configure = {
customRC = ''
set number relativenumber
filetype plugin indent on
'';
};
viAlias = true;
vimAlias = true;
};
programs.tmux = {
enable = true;
extraConfig = import ./tmux.conf;
};
programs.firejail = {
enable = true;
};
programs.adb.enable = true;
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
};
};
networking.firewall.enable = false;
system.copySystemConfiguration = true;
system.autoUpgrade = {
enable = true;
flake = "inputs.self.outPath";
flags = [
"--update-input"
"nixpkgs"
"-L"
];
dates = "02:00";
randomizedDelaySec = "45min";
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.11"; # Did you read the comment?
}