No description
Find a file
2026-01-25 16:59:00 +01:00
hosts 👌 IMPROVE: [role:bspwm] Move enabling NetworkManager applet to module 2026-01-25 16:59:00 +01:00
modules 👌 IMPROVE: [role:bspwm] Move enabling NetworkManager applet to module 2026-01-25 16:59:00 +01:00
overlays 👌 IMPROVE: [overlay:mumble] Rename to mumble-tts 2025-12-23 11:55:48 +01:00
res Background image for grub and change gfxmode 2020-04-20 23:14:55 +02:00
scripts 🐛 FIX: Replace tab indentation with spaces 2022-02-23 11:04:30 +01:00
.editorconfig 👌 IMPROVE: Add Editorconfig 2026-01-25 09:10:16 +01:00
.gitignore ❄️ REBUILD: [switch] Jehuty: Gen. 235 - 24.05.20240630.7dca152 2024-08-22 17:15:11 +02:00
.local-files 👌 IMPROVE: Add local configuration file 2024-12-22 16:23:17 +01:00
configuration.nix ‼️ BREAKING: Do no longer copy extra config files 2026-01-17 23:05:13 +01:00
encryption-configuration.local.nix.example 👌 IMPROVE: Update encryption configuration example 2021-10-26 13:52:54 +02:00
flake.lock ❄️ REBUILD: [switch] K1STE: Gen. 326 - 25.11.20260117.72ac591 2026-01-19 00:27:59 +01:00
flake.nix 🐛 FIX: [flake] Use new option name system.systemBuilderCommands 2026-01-17 23:33:21 +01:00
install-nixos.sh 📦 NEW: Add script to make installation easy 2023-06-07 01:48:57 +02:00
mkmod.sh 📦 NEW: Add helper script to create new module files 2026-01-24 19:39:52 +01:00
myLib.nix 👌 IMPROVE: [myLib] Add usage instructions for createCopyExtraConfigFilesScript 2026-01-17 22:58:25 +01:00
README.md 👌 IMPROVE: Add instruction to create current-host link 2022-08-14 12:46:56 +02:00
rebuild ❄️ REBUILD: [switch] K1STE: Gen. 326 - 25.11.20260117.72ac591 2026-01-19 00:27:59 +01:00

My NixOS Configuration

  • git clone git@gitlab.com:x3ro/nixos-config.git
  • cp hostname.example.nix hostname.nix
  • vim hostname.nix
  • ln -s configuration/<hostname> current-host

Create Initrd for Crypto Keyfiles

# dd if=/dev/urandom of=./crypto_keyfiles/my_keyfile_01.bin bs=1024 count=4

# cryptsetup luksAddKey /dev/sdXY ./crypto_keyfiles/my_keyfile_01.bin

# ./scripts/make_initrd_for_keys.sh crypto_keyfiles/ /mnt/boot/initrd.keys.gz

Example Snippets

Get a specific Module from unstable Channel

First add the channel:

$ sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable

Then replace the module:

{ config, pkgs, ... }:

let
  baseconfig = { allowUnfree = true; };
  unstable = import <nixos-unstable> { config = baseconfig; };
in
{
  disabledModules = [
    "services/networking/unify.nix"
  ];
  imports = [
    # Include the results of the hardware scan.
    ./hardware-configuration.nix
    <nixos-unstable/nixos/modules/services/networking/unify.nix>
  ];

  nixpkgs.config = baseconfig;

  # This also replaces the packages when they are used as dependency for other
  # packages
  nixpkgs.config.packageOverrides = pkgs: {
    unify = unstable.unify;

    # NOTE: It might be necessary to add `unstable = unstable;` or
    #       `inherit unstable;` here to make the below `unstable.nvim` work.
  };

  environment.systemPackages = with pkgs; [
    # Get package specifically from `unstable`
    unstable.nvim

    # This package has been replaced with the version from `unstable`
    unify
  ];

Get a specific Package from a Pull Request

{ config, pkgs, ... }:

let
  pr_ksnip = import (builtins.fetchTarball {
    name = "nixos-pr_ksnip";
    url = "https://api.github.com/repos/x3rAx/nixpkgs/tarball/ksnip-1.9.1";
    sha256 = "0qxx4kvmka3ykjnlqbdfapymb8k16adznh3ihf9gabzcy5mbavbr";
  }) { };
in
{
  imports = [
    # Include the results of the hardware scan.
    ./hardware-configuration.nix
  ];

  nixpkgs.config.allowUnfree = true;

  # This also replaces the package when it is used as dependency for other
  # packages
  nixpkgs.config.packageOverrides = pkgs: {
    ksnip = pr_ksnip.ksnip;
  };
}