### Install Gauge plugins with Nix Source: https://nixos.org/manual/nixos/unstable/release-notes Examples for loading Gauge plugins from a manifest file or defining them directly within Nix. ```nix gauge.fromManifest ./path/to/manifest.json ``` ```nix gauge.withPlugins (p: with p; [ js html-report xml-report ]) ``` -------------------------------- ### Generate Mautrix-WhatsApp example configuration Source: https://nixos.org/manual/nixos/unstable Use this command to generate an example configuration file for comparison during migration. ```bash nix-shell -p mautrix-whatsapp --run "mautrix-whatsapp -c example.yaml -e" ``` -------------------------------- ### Defining configData examples Source: https://nixos.org/manual/nixos/unstable Example showing how to define configuration files using text content or source paths. ```nix { "server.conf" = { text = '' port = 8080 workers = 4 ''; }; "ssl/cert.pem" = { source = ./cert.pem; }; } ``` -------------------------------- ### Install Nix package manager Source: https://nixos.org/manual/nixos/unstable Execute the official installation script to set up Nix on the host system. ```shell $ curl -L https://nixos.org/nix/install | sh $ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell ``` -------------------------------- ### Execute NixOS installation Source: https://nixos.org/manual/nixos/unstable Run the installation command to build and install the NixOS system. ```shell $ sudo PATH="$PATH" `which nixos-install` --root /mnt ``` -------------------------------- ### Install NixOS on /dev/sda Source: https://nixos.org/manual/nixos/unstable A complete sequence of commands to format, mount, and install NixOS. ```bash # mkfs.ext4 -L nixos /dev/sda1 # mkswap -L swap /dev/sda2 # swapon /dev/sda2 # mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only) # mount /dev/disk/by-label/nixos /mnt # mkdir -p /mnt/boot # (for UEFI systems only) # mount -o umask=077 /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only) # nixos-generate-config --root /mnt # nano /mnt/etc/nixos/configuration.nix # nixos-install # reboot ``` -------------------------------- ### Start X server with custom XKB directory Source: https://nixos.org/manual/nixos/unstable Specify the XKB directory when manually starting the X server to ensure custom files are found. ```bash $ xinit -- -xkbdir /etc/X11/xkb ``` -------------------------------- ### Enter NixOS Installation Shell Source: https://nixos.org/manual/nixos/unstable Commands to start a login shell within a NixOS installation located at /mnt. ```bash $ nix-build '' -A nixos-enter # ./result/bin/nixos-enter ``` -------------------------------- ### Configure extraPythonPackages example Source: https://nixos.org/manual/nixos/unstable Example usage for adding Python packages to the test driver. ```nix p: [ p.numpy ] ``` -------------------------------- ### Configure enableDebugHook example Source: https://nixos.org/manual/nixos/unstable Example value for enabling the debug hook. ```nix true ``` -------------------------------- ### Start X server manually Source: https://nixos.org/manual/nixos/unstable Command to start the display manager service manually. ```bash # systemctl start display-manager.service ``` -------------------------------- ### Install NixOS tools Source: https://nixos.org/manual/nixos/unstable Install the necessary tools for NixOS installation, such as nixos-install and nixos-generate-config. ```shell $ nix-env -f '' -iA nixos-install-tools ``` -------------------------------- ### NixOS configuration example Source: https://nixos.org/manual/nixos/unstable A sample configuration file demonstrating imports, bootloader settings, and service enablement. ```nix { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; boot.loader.grub.device = "/dev/sda"; # (for BIOS systems only) boot.loader.systemd-boot.enable = true; # (for UEFI systems only) # Note: setting fileSystems is generally not # necessary, since nixos-generate-config figures them out # automatically in hardware-configuration.nix. #fileSystems."/" .device = "/dev/disk/by-label/nixos"; # Enable the OpenSSH server. services.sshd.enable = true; } ``` -------------------------------- ### Execute NixOS installation Source: https://nixos.org/manual/nixos/unstable Run the standard installation command or use the flake-based variant for custom configurations. ```bash # nixos-install ``` ```bash # nixos-install --flake 'path/to/flake.nix#nixos' ``` -------------------------------- ### Start a NixOS container Source: https://nixos.org/manual/nixos/unstable Boots the specified container and waits until it reaches multi-user.target. ```bash # nixos-container start foo ``` -------------------------------- ### Activate and start Emacs service Source: https://nixos.org/manual/nixos/unstable Commands to apply the configuration and start the Emacs daemon. ```bash $ nixos-rebuild switch # to activate the new configuration.nix $ systemctl --user daemon-reload # to force systemd reload $ systemctl --user start emacs.service # to start the Emacs daemon ``` -------------------------------- ### Install NixOS Bootloader on UEFI Systems Source: https://nixos.org/manual/nixos/unstable Backs up existing boot files and triggers the NixOS bootloader installation. ```bash $ sudo mkdir /boot.bak && sudo mv /boot/* /boot.bak && sudo NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot ``` -------------------------------- ### Add package to systemPackages Source: https://nixos.org/manual/nixos/unstable Example of adding a custom package to the system configuration. ```nix { environment.systemPackages = [ pkgs.my-package ]; } ``` -------------------------------- ### Define a Modular Service Instance Source: https://nixos.org/manual/nixos/unstable Example of configuring a service instance by importing a module into system.services. ```nix { system.services.my-service-instance = { imports = [ pkgs.some-application.services.some-service-module ]; foo.settings = { # ... }; }; } ``` -------------------------------- ### Install a package with nix-env Source: https://nixos.org/manual/nixos/unstable Installs a package by its attribute name. Using the -A flag is recommended for performance and to avoid ambiguity. ```bash $ nix-env -iA nixos.thunderbird ``` -------------------------------- ### Build and install NixOS system profile Source: https://nixos.org/manual/nixos/unstable Installs the NixOS system closure into the system profile using the specified configuration file. ```bash $ nix-env -p /nix/var/nix/profiles/system -f '' -I nixos-config=/etc/nixos/configuration.nix -iA system ``` -------------------------------- ### Defining Configuration Options Source: https://nixos.org/manual/nixos/unstable Example of setting service options using dot notation for nested sets. ```nix { config, pkgs, ... }: { services.httpd.enable = true; services.httpd.adminAddr = "alice@example.org"; services.httpd.virtualHosts.localhost.documentRoot = "/webroot"; } ``` ```nix { config, pkgs, ... }: { services = { httpd = { enable = true; adminAddr = "alice@example.org"; virtualHosts = { localhost = { documentRoot = "/webroot"; }; }; }; }; } ``` -------------------------------- ### Configure VirtualBox bootloader Source: https://nixos.org/manual/nixos/unstable Enable GRUB bootloader for a VirtualBox guest installation. ```nix { boot.loader.grub.device = "/dev/sda"; } ``` -------------------------------- ### Mount Installation Targets Source: https://nixos.org/manual/nixos/unstable Mounting the root and boot filesystems to the /mnt directory. ```bash # mount /dev/disk/by-label/nixos /mnt ``` ```bash # mkdir -p /mnt/boot # mount -o umask=077 /dev/disk/by-label/boot /mnt/boot ``` -------------------------------- ### Start GitLab manual backup Source: https://nixos.org/manual/nixos/unstable Executes a manual backup of the GitLab instance using systemd. ```bash $ systemctl start gitlab-backup.service ``` -------------------------------- ### Enable OneDrive Service Source: https://nixos.org/manual/nixos/unstable Add this option to your configuration.nix to install the onedrive package and launcher service. ```nix services.onedrive.enable = true; ``` -------------------------------- ### Initialize NIXOS and NIXOS_LUSTRATE files Source: https://nixos.org/manual/nixos/unstable Creates the required marker files to identify the partition as NixOS and enable the lustrate process. ```bash $ sudo touch /etc/NIXOS $ sudo touch /etc/NIXOS_LUSTRATE ``` -------------------------------- ### Configure Synapse on NixOS Source: https://nixos.org/manual/nixos/unstable A complete NixOS configuration example for a Synapse homeserver, including Nginx virtual host setup for well-known discovery and proxying. ```nix { pkgs, lib, config, ... }: let fqdn = "${config.networking.hostName}.${config.networking.domain}"; baseUrl = "https://${fqdn}"; clientConfig."m.homeserver".base_url = baseUrl; serverConfig."m.server" = "${fqdn}:443"; mkWellKnown = data: '' default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '${builtins.toJSON data}'; ''; in { networking.hostName = "myhostname"; networking.domain = "example.org"; networking.firewall.allowedTCPPorts = [ 80 443 ]; services.postgresql.enable = true; services.nginx = { enable = true; recommendedTlsSettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; recommendedProxySettings = true; virtualHosts = { # If the A and AAAA DNS records on example.org do not point on the same host as the # records for myhostname.example.org, you can easily move the /.well-known # virtualHost section of the code to the host that is serving example.org, while # the rest stays on myhostname.example.org with no other changes required. # This pattern also allows to seamlessly move the homeserver from # myhostname.example.org to myotherhost.example.org by only changing the # /.well-known redirection target. "${config.networking.domain}" = { enableACME = true; forceSSL = true; # This section is not needed if the server_name of matrix-synapse is equal to # the domain (i.e. example.org from @foo:example.org) and the federation port # is 8448. # Further reference can be found in the docs about delegation under # https://element-hq.github.io/synapse/latest/delegate.html locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; # This is usually needed for homeserver discovery (from e.g. other Matrix clients). # Further reference can be found in the upstream docs at # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; }; "${fqdn}" = { enableACME = true; forceSSL = true; # It's also possible to do a redirect here or something else, this vhost is not # needed for Matrix. It's recommended though to *not put* element # here, see also the section about Element. locations."/".extraConfig = '' return 404; ''; # Forward all Matrix API calls to the synapse Matrix homeserver. A trailing slash # *must not* be used here. locations."/_matrix".proxyPass = "http://[::1]:8008"; # Forward requests for e.g. SSO and password-resets. locations."/_synapse/client".proxyPass = "http://[::1]:8008"; }; }; }; services.matrix-synapse = { enable = true; settings.server_name = config.networking.domain; # The public base URL value must match the `base_url` value set in `clientConfig` above. # The default value here is based on `server_name`, so if your `server_name` is different # from the value of `fqdn` above, you will likely run into some mismatched domain names # in client applications. settings.public_baseurl = baseUrl; settings.listeners = [ { port = 8008; bind_addresses = [ "::1" ]; type = "http"; tls = false; x_forwarded = true; resources = [ { names = [ "client" "federation" ]; compress = true; } ]; } ]; }; } ``` -------------------------------- ### Build and test kernel and initial ramdisk Source: https://nixos.org/manual/nixos/unstable Build the kernel and initrd components and test them using QEMU. ```bash $ nix-build -A config.system.build.initialRamdisk -o initrd $ nix-build -A config.system.build.kernel -o kernel $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null ``` -------------------------------- ### Test the NixOS Installer Source: https://nixos.org/manual/nixos/unstable Commands to verify the installer functionality by mounting a tmpfs and running the installation process. ```bash # mount -t tmpfs none /mnt # nixos-generate-config --root /mnt $ nix-build '' -A nixos-install # ./result/bin/nixos-install ``` -------------------------------- ### Manual window manager startup in .xinitrc Source: https://nixos.org/manual/nixos/unstable Example commands to launch window managers when managing the xinitrc file manually. ```bash sxhkd & bspwm & ``` -------------------------------- ### meta.teams example Source: https://nixos.org/manual/nixos/unstable Example of defining teams for a module. ```nix [ lib.teams.acme lib.teams.haskell ] ``` -------------------------------- ### Enable manual X server startup Source: https://nixos.org/manual/nixos/unstable Configures the system to allow starting the X server manually via the startx command. ```nix { services.xserver.displayManager.startx = { enable = true; generateScript = true; }; } ``` -------------------------------- ### meta.maintainers example Source: https://nixos.org/manual/nixos/unstable Example of defining maintainers for a module. ```nix [ lib.maintainers.alice lib.maintainers.bob ] ``` -------------------------------- ### Breakpoint output example Source: https://nixos.org/manual/nixos/unstable Example output displayed when a test breakpoint is reached. ```text vm-test-run-foo> !!! Breakpoint reached, run 'sudo /nix/store/eeeee-attach/bin/attach ' ``` -------------------------------- ### Build kexec files Source: https://nixos.org/manual/nixos/unstable Build the necessary kernel, initrd, and boot script from the current nixpkgs version. ```bash nix-build -A kexec.x86_64-linux '' ``` -------------------------------- ### Build netboot images Source: https://nixos.org/manual/nixos/unstable Build the necessary files for PXE or iPXE booting from the current nixpkgs version. ```bash nix-build -A netboot.x86_64-linux '' ``` -------------------------------- ### Build configuration reference manpage Source: https://nixos.org/manual/nixos/unstable Commands to build and view the configuration.nix man page. ```bash $ cd /path/to/nixpkgs $ nix-build nixos/release.nix -A nixos-configuration-reference-manpage.x86_64-linux ``` ```bash $ man --local-file result/share/man/man5/configuration.nix.5 ``` -------------------------------- ### Set root password Source: https://nixos.org/manual/nixos/unstable The installer prompts for a root password during the final installation phase. ```text setting root password... New password: *** Retype new password: *** ``` -------------------------------- ### Install Haskell programs Source: https://nixos.org/manual/nixos/unstable/release-notes Install specific Haskell executables using the nix-env command. ```bash nix-env -f "" -iA haskellPackages.pandoc ``` -------------------------------- ### Test Configuration in VM Source: https://nixos.org/manual/nixos/unstable Builds and runs the configuration in a QEMU virtual machine. ```bash $ nixos-rebuild build-vm $ ./result/bin/run-*-vm ``` -------------------------------- ### Example configuration with custom position Source: https://nixos.org/manual/nixos/unstable Demonstrates how custom file locations appear in error messages when definition conflicts occur. ```nix { _file = "file.nix"; options.foo = mkOption { default = 13; }; config.foo = lib.mkDefinition { file = "custom place"; # mkOptionDefault creates a conflict with the option foo's `default = 1` on purpose # So we see the error message below contains the conflicting values and different positions value = lib.mkOptionDefault 42; }; } ``` -------------------------------- ### Start interactive shell after filesystem mounting Source: https://nixos.org/manual/nixos/unstable Starts an interactive shell after all initrd filesystems are mounted. ```text boot.debug1mounts ``` -------------------------------- ### Format Partitions Source: https://nixos.org/manual/nixos/unstable Commands to initialize filesystems and swap partitions with labels for device independence. ```bash # mkfs.ext4 -L nixos /dev/sda1 ``` ```bash # mkswap -L swap /dev/sda2 ``` ```bash # mkfs.fat -F 32 -n boot /dev/sda3 ``` -------------------------------- ### Configure system.nix as an alternative entry point Source: https://nixos.org/manual/nixos/unstable/release-notes Use this file to configure NixOS without relying on nix-channel by pinning a specific Nixpkgs version. ```nix # system.nix let # Pinned Nixpkgs archive # # Use `curl -I https://channels.nixos.org/nixos-26.05` to get the # latest commit of the stable channel and `nix-prefetch-url --unpack` # to compute its sha256 hash. nixpkgs = builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/c217913993d6.tar.gz"; sha256 = "026mprs324330pfazlgbw987qmsa8ligglarvqbcxzig2kgw0lqg"; }; in import "${nixpkgs}/nixos" { # Build NixOS using an external configuration.nix file, # or directly set your options here configuration = ./configuration.nix; } ``` -------------------------------- ### Configure qemu.package Source: https://nixos.org/manual/nixos/unstable Default QEMU package used for virtualisation. ```nix "hostPkgs.qemu_test" ``` -------------------------------- ### Start interactive shell in stage 1 Source: https://nixos.org/manual/nixos/unstable Starts an interactive shell before modules are loaded or filesystems are mounted. ```text boot.debug1 ``` -------------------------------- ### Migrate Keycloak Configuration Source: https://nixos.org/manual/nixos/unstable/release-notes Example showing the transition from the deprecated Keycloak configuration options to the new settings-style format. ```nix { services.keycloak = { enable = true; httpPort = "8080"; frontendUrl = "https://keycloak.example.com/auth"; database.passwordFile = "/run/keys/db_password"; extraConfig = { "subsystem=undertow"."server=default-server"."http-listener=default".proxy-address-forwarding = true; }; }; } ``` ```nix { services.keycloak = { enable = true; settings = { http-port = 8080; hostname = "keycloak.example.com"; http-relative-path = "/auth"; proxy = "edge"; }; database.passwordFile = "/run/keys/db_password"; }; } ``` -------------------------------- ### Install NixOS Bootloader Source: https://nixos.org/manual/nixos/unstable Triggers the NixOS bootloader installation for systems where the EFI partition is already correctly mounted. ```bash sudo NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot ``` -------------------------------- ### Configure permissions in postStart Source: https://nixos.org/manual/nixos/unstable Grant database permissions using the postStart hook of the postgresql-setup service. ```nix { systemd.services.postgresql-setup.postStart = '' psql service1 -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"' psql service1 -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"' # .... ''; } ``` -------------------------------- ### Configure basic Nextcloud instance Source: https://nixos.org/manual/nixos/unstable A minimal configuration enabling Nextcloud with a local PostgreSQL database and required firewall ports. ```nix { pkgs, ... }: { services.nextcloud = { enable = true; hostName = "nextcloud.tld"; database.createLocally = true; config = { dbtype = "pgsql"; adminpassFile = "/path/to/admin-pass-file"; }; }; networking.firewall.allowedTCPPorts = [ 80 443 ]; } ``` -------------------------------- ### Configure additional drivers in NixOS installer Source: https://nixos.org/manual/nixos/unstable Extends the graphical GNOME installer configuration to include Broadcom WiFi drivers. ```nix { config, ... }: { imports = [ ./installation-cd-graphical-gnome.nix ]; boot.initrd.kernelModules = [ "wl" ]; boot.kernelModules = [ "kvm-intel" "wl" ]; boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; } ``` -------------------------------- ### Markup command arguments in examples Source: https://nixos.org/manual/nixos/unstable Example of using mdoc macros to differentiate commands and arguments within a descriptive sentence. ```mdoc This will run .Ic ssh Ar name Ic time to retrieve the remote time. ``` -------------------------------- ### Start interactive shell after device initialization Source: https://nixos.org/manual/nixos/unstable Starts an interactive shell after kernel modules are loaded and device nodes are created. ```text boot.debug1devices ``` -------------------------------- ### Construct a NixOS system from a Nixpkgs invocation Source: https://nixos.org/manual/nixos/unstable/release-notes Demonstrates how to construct a NixOS system using a preexisting Nixpkgs invocation to improve evaluation performance. ```nix { inherit (pkgs.nixos { boot.loader.grub.enable = false; fileSystems."/".device = "/dev/xvda1"; }) toplevel kernel initialRamdisk manual ; } ``` -------------------------------- ### GET /image/original/{file} Source: https://nixos.org/manual/nixos/unstable Retrieves a full-resolution image. ```APIDOC ## GET /image/original/{file} ### Description Retrieves a full-resolution image. ### Method GET ### Endpoint /image/original/{file} ### Parameters #### Path Parameters - **file** (string) - Required - The filename of the image ``` -------------------------------- ### Create a Subversion repository Source: https://nixos.org/manual/nixos/unstable Initialize a new repository using the svn command. ```bash $ svn create REPO_NAME ``` -------------------------------- ### GET /image/download Source: https://nixos.org/manual/nixos/unstable Downloads an image from a remote server. ```APIDOC ## GET /image/download ### Description Download an image from a remote server, returning the same JSON payload as the POST /image endpoint. ### Method GET ### Endpoint /image/download ### Parameters #### Query Parameters - **url** (string) - Required - The URL of the image to download ``` -------------------------------- ### Configure Kodi Addons in NixOS Source: https://nixos.org/manual/nixos/unstable/release-notes Demonstrates the transition from legacy configuration flags to the new withPackages approach for managing Kodi addons. ```nix { environment.systemPackages = [ pkgs.kodi ]; nixpkgs.config.kodi = { enableInputStreamAdaptive = true; enableVFSSFTP = true; }; } ``` ```nix { environment.systemPackages = [ (pkgs.kodi.withPackages ( p: with p; [ inputstream-adaptive vfs-sftp ] )) ]; } ``` -------------------------------- ### Enable GNOME Games Source: https://nixos.org/manual/nixos/unstable Installs the collection of GNOME games. ```nix { services.gnome.games.enable = true; } ``` -------------------------------- ### Define requiredFeatures Source: https://nixos.org/manual/nixos/unstable Example configuration for required builder features. ```nix { cuda = true; devnet = mkForce false; } ``` ```nix { } ``` -------------------------------- ### Build the NixOS Manual Source: https://nixos.org/manual/nixos/unstable Build the manual using nix-build to generate HTML documentation. ```bash nix-build nixos/release.nix -A manual.x86_64-linux ``` -------------------------------- ### GET /image/details/original/{file} Source: https://nixos.org/manual/nixos/unstable Retrieves metadata for a full-resolution image. ```APIDOC ## GET /image/details/original/{file} ### Description Retrieves the details of a full-resolution image. ### Method GET ### Endpoint /image/details/original/{file} ### Response #### Success Response (200) - **width** (int) - Image width - **height** (int) - Image height - **content_type** (string) - MIME type - **created_at** (array) - Creation timestamp data ``` -------------------------------- ### Initialize Pleroma Database Source: https://nixos.org/manual/nixos/unstable Seed the database using the generated setup.psql file. ```bash $ sudo -u postgres psql -f setup.psql ``` -------------------------------- ### Build the top-level system Source: https://nixos.org/manual/nixos/unstable A shortcut command to build the entire NixOS system configuration. ```bash $ nix-build -A system ``` -------------------------------- ### Reboot system Source: https://nixos.org/manual/nixos/unstable Final command to restart the machine after a successful installation. ```bash # reboot ``` -------------------------------- ### Access root shell Source: https://nixos.org/manual/nixos/unstable Elevate privileges to root in the installer environment. ```bash $ sudo -i ``` -------------------------------- ### GET /image/process.{ext} Source: https://nixos.org/manual/nixos/unstable Retrieves an image with specified transformations applied. ```APIDOC ## GET /image/process.{ext} ### Description Get a file with transformations applied. Supported extensions include png, jpg, and webp. ### Method GET ### Endpoint /image/process.{ext} ### Parameters #### Path Parameters - **ext** (string) - Required - The desired file extension #### Query Parameters - **src** (string) - Required - The source filename - **identity** (boolean) - Optional - Apply no changes - **blur** (float) - Optional - Apply a gaussian blur - **thumbnail** (int) - Optional - Produce a thumbnail - **resize** (int) - Optional - Produce a thumbnail using Lanczos2 filter - **crop** (string) - Optional - Crop with specified aspect ratio (e.g., 1600x900) ``` -------------------------------- ### Configure prebuilt Mattermost plugins Source: https://nixos.org/manual/nixos/unstable Use fetchurl to provide a plugin tarball to the services.mattermost.plugins list. Ensure the tarball remains packed as the NixOS module handles the unpacking process. ```nix { services.mattermost = { plugins = with pkgs; [ # todo # 0.7.1 # https://github.com/mattermost/mattermost-plugin-todo/releases/tag/v0.7.1 (fetchurl { # Note: Don't unpack the tarball; the NixOS module will repack it for you. url = "https://github.com/mattermost-community/mattermost-plugin-todo/releases/download/v0.7.1/com.mattermost.plugin-todo-0.7.1.tar.gz"; hash = "sha256-P+Z66vqE7FRmc2kTZw9FyU5YdLLbVlcJf11QCbfeJ84="; }) ]; }; } ``` -------------------------------- ### Configuring filesystem options Source: https://nixos.org/manual/nixos/unstable/release-notes Filesystem options must now be provided as a list of strings instead of a comma-separated string. ```nix { fileSystems."/example" = { device = "/dev/sdc"; fsType = "btrfs"; options = [ "noatime" "compress=lzo" "space_cache" "autodefrag" ]; }; } ``` -------------------------------- ### Manage Flatpak Applications Source: https://nixos.org/manual/nixos/unstable Commands for searching, installing, and executing Flatpak applications. ```bash $ flatpak search bustle $ flatpak install flathub org.freedesktop.Bustle $ flatpak run org.freedesktop.Bustle ``` -------------------------------- ### Disable Pantheon Default Apps Source: https://nixos.org/manual/nixos/unstable Prevents the installation of default Pantheon applications. ```nix { services.pantheon.apps.enable = false; } ``` -------------------------------- ### Apply System Configuration Source: https://nixos.org/manual/nixos/unstable Commands to build and activate system configurations. Requires root privileges. ```bash # nixos-rebuild switch ``` ```bash # nixos-rebuild test ``` ```bash # nixos-rebuild boot ``` ```bash # nixos-rebuild switch -p test ``` -------------------------------- ### Disable GNOME Core Apps Source: https://nixos.org/manual/nixos/unstable Prevents the installation of GNOME core applications. ```nix { services.gnome.core-apps.enable = false; } ``` -------------------------------- ### Build the NixOS manual Source: https://nixos.org/manual/nixos/unstable Commands to navigate to the nixpkgs directory, edit the manual, and build the documentation using nix-build. ```bash $ cd /path/to/nixpkgs $ $EDITOR nixos/doc/manual/... # edit the manual $ nix-build nixos/release.nix -A manual.x86_64-linux ``` -------------------------------- ### Print Default Configuration Source: https://nixos.org/manual/nixos/unstable Runs the mautrix-discord binary to output the default configuration file. ```bash nix-shell -p mautrix-discord --run "mautrix-discord -e" ``` -------------------------------- ### Configure Akkoma media previews Source: https://nixos.org/manual/nixos/unstable Enable and set dimensions for generated media previews. ```nix { services.akkoma.config.":pleroma".":media_preview_proxy" = { enabled = true; thumbnail_max_width = 1920; thumbnail_max_height = 1080; }; } ``` -------------------------------- ### Enable unfree packages Source: https://nixos.org/manual/nixos/unstable/release-notes Explicitly allow the installation of packages with unfree licenses. ```nix { nixpkgs.config.allowUnfree = true; } ```