179 lines
3.3 KiB
Nix
179 lines
3.3 KiB
Nix
# vim:fileencoding=utf-8:foldmethod=marker
|
|
{
|
|
pkgs,
|
|
inputs,
|
|
username,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./home.nix
|
|
];
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
modules = {
|
|
media.enableAll = true;
|
|
|
|
system = {
|
|
networking = {
|
|
bluetooth.enable = true;
|
|
wifi.enable = true;
|
|
};
|
|
};
|
|
|
|
services = {
|
|
nysh.enable = true;
|
|
tailscale = {
|
|
enable = true;
|
|
tags = [ "client" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
# Bootloader.
|
|
boot = {
|
|
loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
};
|
|
|
|
hardware.graphics.enable = true;
|
|
|
|
xdg = {
|
|
portal.enable = true;
|
|
mime.enable = true;
|
|
};
|
|
|
|
specialisation = {
|
|
gpu.configuration = {
|
|
imports = [ inputs.nixos-hardware.nixosModules.dell-xps-15-9510-nvidia ];
|
|
};
|
|
};
|
|
|
|
age = {
|
|
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
secrets.rustypaste = {
|
|
file = ../../secrets/rustypaste.age;
|
|
mode = "440";
|
|
group = "wheel";
|
|
};
|
|
};
|
|
|
|
programs = {
|
|
dconf.enable = true;
|
|
steam.enable = true;
|
|
fish.enable = true;
|
|
firefox.enable = true;
|
|
thunderbird.enable = true;
|
|
sway.enable = true;
|
|
hyprland.enable = true;
|
|
pulseview.enable = true;
|
|
|
|
gnupg.agent = {
|
|
enable = true;
|
|
enableSSHSupport = true;
|
|
};
|
|
};
|
|
|
|
services = {
|
|
dbus.enable = true;
|
|
fwupd.enable = true;
|
|
gvfs.enable = true;
|
|
printing.enable = true;
|
|
|
|
xserver.xkb = {
|
|
layout = "fr";
|
|
variant = "";
|
|
};
|
|
|
|
pipewire.enable = true;
|
|
gnome.gnome-keyring.enable = true;
|
|
openssh.enable = true;
|
|
|
|
greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd \"sway --unsupported-gpu\"";
|
|
user = "greeter";
|
|
};
|
|
};
|
|
};
|
|
|
|
#: Power Consumption {{{
|
|
logind = {
|
|
lidSwitch = "suspend-then-hibernate";
|
|
powerKey = "hibernate";
|
|
};
|
|
|
|
thermald.enable = true;
|
|
|
|
tlp = {
|
|
enable = false;
|
|
settings = {
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
CPU_MIN_PERF_ON_BAT = 0;
|
|
CPU_MAX_PERF_ON_BAT = 20;
|
|
|
|
# Optional helps save long term battery health
|
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
|
|
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
|
};
|
|
};
|
|
|
|
upower = {
|
|
enable = true;
|
|
criticalPowerAction = "Hibernate";
|
|
};
|
|
#:}}}
|
|
};
|
|
|
|
console.keyMap = "fr";
|
|
|
|
users = {
|
|
defaultUserShell = pkgs.fish;
|
|
users.${username} = {
|
|
isNormalUser = true;
|
|
createHome = true;
|
|
extraGroups = [
|
|
"networkmanager"
|
|
"wheel"
|
|
"audio"
|
|
"libvirtd"
|
|
"dialout" # Necessary for serial port interactions
|
|
];
|
|
};
|
|
};
|
|
|
|
environment.variables = {
|
|
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
|
MOZ_ENABLE_WAYLAND = 1;
|
|
};
|
|
|
|
security.polkit = {
|
|
enable = true;
|
|
package = pkgs.polkit-kde-agent;
|
|
};
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
programs.virt-manager.enable = true;
|
|
|
|
programs.nix-ld.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
shared-mime-info
|
|
glib
|
|
wireguard-tools
|
|
dconf
|
|
pwvucontrol
|
|
xdg-utils
|
|
brightnessctl
|
|
pop-icon-theme
|
|
];
|
|
|
|
system.stateVersion = "24.11";
|
|
}
|