nix-config/hosts/base/default.nix

157 lines
3.6 KiB
Nix
Raw Normal View History

2024-09-16 22:04:47 +02:00
# 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,
2024-09-20 23:44:08 +02:00
inputs,
...
2024-09-20 23:44:08 +02:00
}:
2024-09-16 22:04:47 +02:00
{
2024-09-20 23:15:30 +02:00
imports = [
2024-09-24 10:13:04 +02:00
inputs.home-manager.nixosModules.home-manager
inputs.nix-flatpak.nixosModules.nix-flatpak
];
2024-09-16 22:04:47 +02:00
# Bootloader.
2024-09-20 23:44:08 +02:00
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2024-09-16 22:04:47 +02:00
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Prague";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "cs_CZ.UTF-8";
LC_IDENTIFICATION = "cs_CZ.UTF-8";
LC_MEASUREMENT = "cs_CZ.UTF-8";
LC_MONETARY = "cs_CZ.UTF-8";
LC_NAME = "cs_CZ.UTF-8";
LC_NUMERIC = "cs_CZ.UTF-8";
LC_PAPER = "cs_CZ.UTF-8";
LC_TELEPHONE = "cs_CZ.UTF-8";
LC_TIME = "cs_CZ.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "cz";
variant = "bksl";
};
# Configure console keymap
console.keyMap = "cz-lat2";
# Define a user account. Don't forget to set a password with passwd.
2024-10-16 00:01:20 +02:00
# Replace name <krop> with a variable
2024-09-16 22:04:47 +02:00
users.users.krop = {
isNormalUser = true;
2024-10-13 23:17:07 +02:00
description = "Jakub Kropáček";
extraGroups = [
"networkmanager"
"wheel"
];
2024-09-16 22:06:27 +02:00
shell = pkgs.zsh;
2024-09-16 22:04:47 +02:00
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
2024-09-16 22:04:47 +02:00
# List packages installed in system profile. To search, run:
# $ nix search wget
programs = {
dconf.enable = true;
thunderbird.enable = true;
firefox.enable = true;
2024-10-03 14:11:02 +02:00
gnupg.agent = {
enable = true;
};
nix-ld = {
enable = true;
};
2024-09-16 22:04:47 +02:00
};
2024-10-16 00:01:20 +02:00
services = {
tailscale = {
enable = true;
2024-10-25 15:57:14 +02:00
openFirewall = true;
2024-10-16 00:01:20 +02:00
};
flatpak = {
enable = true;
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}
];
packages = [
"org.gnome.World.PikaBackup"
"ca.desrt.dconf-editor"
"org.onlyoffice.desktopeditors"
"tv.kodi.Kodi"
"com.valvesoftware.Steam"
"com.github.tchx84.Flatseal"
"io.dbeaver.DBeaverCommunity"
];
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
printing = {
enable = true;
drivers = [ pkgs.samsung-unified-linux-driver ];
};
2024-09-16 22:04:47 +02:00
};
2024-09-19 17:14:01 +02:00
networking = {
nftables.enable = true;
2024-10-25 15:57:14 +02:00
firewall = {
checkReversePath = "loose";
};
2024-09-19 17:14:01 +02:00
};
2024-09-16 22:04:47 +02:00
2024-10-25 12:15:44 +02:00
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
2024-11-11 16:39:11 +01:00
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
};
sharedModules = [
../../homeManagerModules
];
};
2024-09-16 22:04:47 +02:00
# 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 = "24.05"; # Did you read the comment?
}