nixos_configs/hosts/server/configuration.nix
2025-12-03 17:38:31 +00:00

83 lines
2.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
config,
pkgs,
inputs,
...
}: {
imports = [./hardware-configuration.nix ./service.nix];
powerManagement.enable = true;
system.autoUpgrade.enable = true;
networking.networkmanager.enable = true;
nix = {
gc.automatic = true;
settings = {
experimental-features = ["nix-command" "flakes"];
#substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
#trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
};
};
nixpkgs.config = {
allowUnfree = true;
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
programs = {
zsh.enable = true;
neovim.enable = true;
};
users = {
motd = "Welcome to the Server";
defaultUserShell = pkgs.zsh;
users = {
k = {
isNormalUser = true;
description = "k";
extraGroups = ["networkmanager" "wheel" "libvirtd"];
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"];
};
docker = {
isNormalUser = true;
description = "user for runing docker";
extraGroups = ["docker"];
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"];
packages = with pkgs; [docker-compose];
};
};
};
home-manager = {
backupFileExtension = "bk";
users = {"k" = import ./home.nix;};
};
environment.systemPackages = with pkgs; [
microcodeIntel
firefox
];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
vaapiVdpau
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
vpl-gpu-rt # QSV on 11th gen or newer
intel-media-sdk # QSV up to 11th gen
];
};
# 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 = "23.11"; # Did you read the comment?
}