198 lines
4.8 KiB
Nix
198 lines
4.8 KiB
Nix
|
# 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, ... }:
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
nix.extraOptions = ''
|
|||
|
experimental-features = nix-command flakes
|
|||
|
keep-outputs = true
|
|||
|
keep-derivations = true
|
|||
|
'';
|
|||
|
|
|||
|
imports =
|
|||
|
[ # Include the results of the hardware scan.
|
|||
|
../hardware/hardware-caketray.nix
|
|||
|
];
|
|||
|
|
|||
|
virtualisation = {
|
|||
|
podman = {
|
|||
|
enable = true;
|
|||
|
dockerCompat = true;
|
|||
|
enableNvidia = true;
|
|||
|
defaultNetwork.settings.dns_enabled = true;
|
|||
|
};
|
|||
|
};
|
|||
|
|
|||
|
nix = {
|
|||
|
settings = {
|
|||
|
auto-optimise-store = true;
|
|||
|
};
|
|||
|
gc = {
|
|||
|
automatic = true;
|
|||
|
randomizedDelaySec = "14m";
|
|||
|
options = "--delete-older-than 10d";
|
|||
|
};
|
|||
|
};
|
|||
|
|
|||
|
# Bootloader.
|
|||
|
boot.loader.systemd-boot.enable = true;
|
|||
|
boot.loader.efi.canTouchEfiVariables = true;
|
|||
|
|
|||
|
networking.hostName = "caketray"; # Define your hostname.
|
|||
|
|
|||
|
services.mullvad-vpn.enable = true;
|
|||
|
networking.firewall.enable = false;
|
|||
|
networking.networkmanager.enable = true;
|
|||
|
|
|||
|
# Set your time zone.
|
|||
|
time.timeZone = "Europe/Rome";
|
|||
|
|
|||
|
# Select internationalisation properties.
|
|||
|
i18n.defaultLocale = "it_IT.UTF-8";
|
|||
|
|
|||
|
i18n.extraLocaleSettings = {
|
|||
|
LC_ADDRESS = "it_IT.UTF-8";
|
|||
|
LC_IDENTIFICATION = "it_IT.UTF-8";
|
|||
|
LC_MEASUREMENT = "it_IT.UTF-8";
|
|||
|
LC_MONETARY = "it_IT.UTF-8";
|
|||
|
LC_NAME = "it_IT.UTF-8";
|
|||
|
LC_NUMERIC = "it_IT.UTF-8";
|
|||
|
LC_PAPER = "it_IT.UTF-8";
|
|||
|
LC_TELEPHONE = "it_IT.UTF-8";
|
|||
|
LC_TIME = "it_IT.UTF-8";
|
|||
|
};
|
|||
|
|
|||
|
environment.systemPackages = with pkgs; [
|
|||
|
killall
|
|||
|
android-tools
|
|||
|
|
|||
|
jdk
|
|||
|
gcc
|
|||
|
clang
|
|||
|
clang-tools
|
|||
|
cmake
|
|||
|
gnumake
|
|||
|
rustc
|
|||
|
rust-analyzer
|
|||
|
cargo
|
|||
|
python3
|
|||
|
nodejs
|
|||
|
lua
|
|||
|
lua-language-server
|
|||
|
];
|
|||
|
|
|||
|
services.dbus.enable = true;
|
|||
|
services.gnome.evolution-data-server.enable = true;
|
|||
|
services.gnome.gnome-online-accounts.enable = true;
|
|||
|
services.gnome.gnome-keyring.enable = true;
|
|||
|
services.gvfs.enable = true;
|
|||
|
programs.dconf.enable = true;
|
|||
|
programs.fish.enable = true;
|
|||
|
programs.adb.enable = true;
|
|||
|
programs.gamemode.enable = true;
|
|||
|
|
|||
|
xdg.portal = {
|
|||
|
enable = true;
|
|||
|
#wlr.enable = false;
|
|||
|
xdgOpenUsePortal = true;
|
|||
|
|
|||
|
# gtk portal needed to make gtk apps happy
|
|||
|
extraPortals = [
|
|||
|
pkgs.xdg-desktop-portal-gtk #pkgs.xdg-desktop-portal-hyprland
|
|||
|
];
|
|||
|
};
|
|||
|
|
|||
|
# Config X11
|
|||
|
services.xserver = {
|
|||
|
enable = true;
|
|||
|
layout = "it";
|
|||
|
xkbVariant = "";
|
|||
|
displayManager.sddm.enable = true;
|
|||
|
desktopManager.plasma5.enable = true;
|
|||
|
|
|||
|
};
|
|||
|
|
|||
|
# Configure console keymap
|
|||
|
console.keyMap = "it2";
|
|||
|
|
|||
|
# Enable CUPS to print documents.
|
|||
|
services.printing.enable = true;
|
|||
|
|
|||
|
# Enable sound with pipewire.
|
|||
|
sound.enable = true;
|
|||
|
hardware.pulseaudio.enable = false;
|
|||
|
security.rtkit.enable = true;
|
|||
|
|
|||
|
services.pipewire = {
|
|||
|
enable = true;
|
|||
|
alsa.enable = true;
|
|||
|
alsa.support32Bit = true;
|
|||
|
pulse.enable = true;
|
|||
|
wireplumber.enable = true;
|
|||
|
};
|
|||
|
|
|||
|
# Enable touchpad support (enabled default in most desktopManager).
|
|||
|
# services.xserver.libinput.enable = true;
|
|||
|
|
|||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|||
|
users.users.alecake = {
|
|||
|
isNormalUser = true;
|
|||
|
description = "Ale";
|
|||
|
extraGroups = [ "networkmanager" "wheel" ];
|
|||
|
shell = pkgs.fish;
|
|||
|
};
|
|||
|
|
|||
|
security.pam.services.swaylock = {};
|
|||
|
|
|||
|
# Allow unfree packages
|
|||
|
nixpkgs.config.allowUnfree = true;
|
|||
|
services.flatpak.enable = true;
|
|||
|
fonts.fontDir.enable = true;
|
|||
|
fonts.packages = with pkgs; [
|
|||
|
noto-fonts
|
|||
|
unifont
|
|||
|
jetbrains-mono
|
|||
|
fira-code
|
|||
|
fira-code-symbols
|
|||
|
victor-mono
|
|||
|
monocraft
|
|||
|
nerdfonts
|
|||
|
mononoki
|
|||
|
times-newer-roman
|
|||
|
emacs-all-the-icons-fonts
|
|||
|
];
|
|||
|
|
|||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|||
|
programs.gnupg.agent = {
|
|||
|
enable = true;
|
|||
|
enableSSHSupport = true;
|
|||
|
};
|
|||
|
|
|||
|
# Enable the OpenSSH daemon.
|
|||
|
services.openssh.enable = true;
|
|||
|
|
|||
|
security.pam.services = {
|
|||
|
login.u2fAuth = true;
|
|||
|
sudo.u2fAuth = true;
|
|||
|
};
|
|||
|
systemd.user.extraConfig = ''
|
|||
|
DefaultEnvironment="PATH=/run/current-system/sw/bin"
|
|||
|
'';
|
|||
|
# 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. It‘s 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.05"; # Did you read the comment?
|
|||
|
}
|