From 1c9ffac6e8a899092d3d2ef3626fa3aa76f726c4 Mon Sep 17 00:00:00 2001 From: memere Date: Fri, 21 Aug 2026 12:02:25 +0200 Subject: [PATCH] real life fixes --- machines/memere/configuration.nix | 123 +++++++++++++++++++++ machines/memere/default.nix | 11 +- machines/memere/gnome.nix | 8 ++ machines/memere/hardware-configuration.nix | 31 ++++++ 4 files changed, 165 insertions(+), 8 deletions(-) create mode 100644 machines/memere/configuration.nix create mode 100644 machines/memere/hardware-configuration.nix diff --git a/machines/memere/configuration.nix b/machines/memere/configuration.nix new file mode 100644 index 0000000..e2b68a6 --- /dev/null +++ b/machines/memere/configuration.nix @@ -0,0 +1,123 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # networking.hostName = "nixos"; # Define your hostname. + + # Configure network connections interactively with nmcli or nmtui. + networking.networkmanager.enable = true; + + # Set your time zone. + # time.timeZone = "Europe/Amsterdam"; + + # 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; + + + + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + # services.pulseaudio.enable = true; + # OR + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + # users.users.alice = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + # packages = with pkgs; [ + # tree + # ]; + # }; + + # programs.firefox.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; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + # ]; + + # 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; + # }; + + # 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 + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "26.05"; # Did you read the comment? + +} + diff --git a/machines/memere/default.nix b/machines/memere/default.nix index 22a1a96..73344e1 100644 --- a/machines/memere/default.nix +++ b/machines/memere/default.nix @@ -5,6 +5,7 @@ /etc/nixos/modules/security.nix /etc/nixos/modules/nix.nix + ./hardware-configuration.nix ./users.nix ./gnome.nix ]; @@ -18,14 +19,8 @@ networking.hostName = "pepere"; networking.networkmanager.enable = true; - # replace `vmVariant` with `vmVariantWithBootLoader` if you are going to use `build-vm-with-bootloder`. - virtualisation.vmVariant = { - # the following configuration is added only when building VM with `build-vm` - virtualisation = { - memorySize = 2048; # use 2048MiB memory - cores = 3; # use 3 cpu cores - }; - }; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.efiSysMountPoint = "/boot"; i18n.defaultLocale = "fr_FR.UTF-8"; diff --git a/machines/memere/gnome.nix b/machines/memere/gnome.nix index 7e5725e..6405c06 100644 --- a/machines/memere/gnome.nix +++ b/machines/memere/gnome.nix @@ -27,6 +27,14 @@ { lockAll = true; # prevents overriding settings = { + "org/gtk/settings/file-chooser" = { + window-size = [ + (pkgs.lib.gvariant.mkTuple [ + (pkgs.lib.gvariant.mkInt32 1100) + (pkgs.lib.gvariant.mkInt32 600) + ]) + ]; + }; "org/gnome/desktop/input-sources" = { sources = [ (pkgs.lib.gvariant.mkTuple [ diff --git a/machines/memere/hardware-configuration.nix b/machines/memere/hardware-configuration.nix new file mode 100644 index 0000000..2c8fc05 --- /dev/null +++ b/machines/memere/hardware-configuration.nix @@ -0,0 +1,31 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/681ba8d9-6fdf-4698-b621-f2b16f125be3"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3564-6553"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}