94 lines
2 KiB
Nix
94 lines
2 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
imports = [ ./hardware-configuration.nix ];
|
||
|
|
||
|
boot.loader.systemd-boot.enable = true;
|
||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||
|
boot.loader.timeout = 0;
|
||
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||
|
boot.tmp.useTmpfs = true;
|
||
|
|
||
|
networking.hostName = "ahrc-laptop";
|
||
|
networking.networkmanager.enable = true;
|
||
|
|
||
|
time.timeZone = "Europe/Paris";
|
||
|
|
||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||
|
console = {
|
||
|
font = "Lat2-Terminus16";
|
||
|
keyMap = "fr-pc";
|
||
|
};
|
||
|
|
||
|
services.pipewire = {
|
||
|
enable = true;
|
||
|
pulse.enable = true;
|
||
|
};
|
||
|
|
||
|
#nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
vim
|
||
|
curl
|
||
|
ncdu
|
||
|
htop
|
||
|
tmux
|
||
|
powertop
|
||
|
file
|
||
|
nixfmt-classic
|
||
|
tree
|
||
|
brightnessctl
|
||
|
podman-compose
|
||
|
];
|
||
|
|
||
|
services.libinput.enable = true;
|
||
|
services.udisks2.enable = true;
|
||
|
|
||
|
services.tlp = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||
|
|
||
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||
|
|
||
|
CPU_MIN_PERF_ON_AC = 100;
|
||
|
CPU_MAX_PERF_ON_AC = 100;
|
||
|
CPU_MIN_PERF_ON_BAT = 20;
|
||
|
CPU_MAX_PERF_ON_BAT = 100;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
programs.hyprland.enable = true;
|
||
|
programs.zsh.enable = true;
|
||
|
|
||
|
programs.bash.promptInit = ''
|
||
|
if [ "$(whoami)" = root ]; then
|
||
|
color=31
|
||
|
else
|
||
|
color=32
|
||
|
user='\u@'
|
||
|
fi
|
||
|
PS1="\[\033[0m\](\[\033[1;''${color}m\]''${user}\h\[\033[0m\] \[\033[1;34m\]\W\[\033[0m\])\\$ "
|
||
|
'';
|
||
|
|
||
|
virtualisation.containers.enable = true;
|
||
|
virtualisation = {
|
||
|
podman = {
|
||
|
enable = true;
|
||
|
dockerCompat = true;
|
||
|
defaultNetwork.settings.dns_enabled = true;
|
||
|
};
|
||
|
};
|
||
|
boot.kernel.sysctl."net.ipv4.ip_unprivileged_port_start" = 0;
|
||
|
|
||
|
users.users.ahurac = {
|
||
|
isNormalUser = true;
|
||
|
extraGroups = [ "wheel" "networkmanager" ];
|
||
|
shell = pkgs.zsh;
|
||
|
};
|
||
|
|
||
|
system.stateVersion = "24.05";
|
||
|
}
|