From 183a6ba43ef34dd57b9529a3312b1f361e6ff259 Mon Sep 17 00:00:00 2001 From: shinya Date: Tue, 26 May 2026 20:01:20 +0200 Subject: [PATCH] updated persistence and config --- configuration.nix | 76 +++++++++++++++++++++++++++-------------------- preservation.nix | 5 +++- 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/configuration.nix b/configuration.nix index a9bf426..309dbae 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,7 +10,7 @@ ./hardware-configuration.nix ]; - nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Use the systemd-boot EFI boot loader. boot.loader = { systemd-boot.enable = true; @@ -25,27 +25,35 @@ # Set your time zone. time.timeZone = "Europe/Prague"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - # Enable the X11 windowing system. services.xserver = { enable = true; desktopManager.mate.enable = true; + xkb.layout = "us, cz"; }; - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; + i18n = { + defaultLocale = "en_US.UTF-8"; + + 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"; + }; + }; + + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-emoji + corefonts + ]; + # Enable CUPS to print documents. # services.printing.enable = true; @@ -59,7 +67,11 @@ # }; # Enable touchpad support (enabled default in most desktopManager). - # services.libinput.enable = true; + services.libinput.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.konsta = { @@ -71,36 +83,34 @@ keepassxc gimp inkscape - libreoffice onlyoffice-desktopeditors + hypnotix + blueman + mpv ]; }; programs.firefox.enable = true; + services = { + network-manager-applet.enable = true; + }; + + # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). environment.systemPackages = with pkgs; [ helix + git ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; + nixpkgs.config = { + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "corefonts" + ]; + }; - # List services that you want to enable: - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. # networking.firewall.enable = false; # Copy the NixOS configuration file and link it from the resulting system diff --git a/preservation.nix b/preservation.nix index 737c1c8..6be3bd5 100644 --- a/preservation.nix +++ b/preservation.nix @@ -6,6 +6,10 @@ directories = [ "/etc/nixos" "/var/lib/bluetooth" + { + directory = "/etc/NetworkManager/system-connections"; + inInitrd = true; + } { directory = "/var/lib/nixos"; inInitrd = true; @@ -19,7 +23,6 @@ } ]; - # Preserve user files users.konsta = { directories = [ ".mozilla"