1
0
Fork
You've already forked systemn
0
No description
  • Nix 100%
Find a file
2026年01月10日 18:33:43 -03:00
desktop Programming,Zig: Add zig submodule 2026年01月10日 17:53:37 -03:00
hardware HW: Add openrazer 2026年01月09日 12:49:54 -03:00
server Misc: Formatting 2026年01月10日 18:33:43 -03:00
system Misc: Avoid multi-level import 2026年01月08日 09:36:29 -03:00
workstation
.gitignore
flake.nix Programming,Zig: Add zig submodule 2026年01月10日 17:53:37 -03:00
README.org Input: Add libinput 2025年12月13日 01:00:09 -03:00

Info

These are my personal nixos configuration building blocks.

Examples

Typical system configuration

In your /etc/nixos/ directory,

flake.nix

 {
 description = "YOUR_MACHINE's NixOS configuration";
 inputs = {
 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
 nixos-hardware.url = "github:NixOS/nixos-hardware";
 systemn = {
 url = "github:Dietr1ch/systemn";
 inputs = {
 nixpkgs.follows = "nixpkgs";
 };
 };
 };
 nixConfig = {
 extra-substituters = [
 "https://nix-community.cachix.org" # Cachix - nix-community
 "https://devenv.cachix.org" # Cachix - devenv (https://devenv.sh/guides/using-with-flakes/#getting-started)
 ];
 extra-trusted-public-keys = [
 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" # Cachix - nix-community
 "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" # Cachix - devenv (https://devenv.sh/guides/using-with-flakes/#getting-started)
 ];
 };
 outputs =
 {
 nixpkgs,
 nixos-hardware,
 systemn,
 ...
 }@attrs:
 {
 nixosConfigurations = {
 "YOUR_MACHINE" = nixpkgs.lib.nixosSystem {
 system = "x86_64-linux";
 modules = [
 # NixOS Hardware
 # ==============
 # CPU - AMD
 nixos-hardware.nixosModules.common-cpu-amd # ~/Projects/nixos-hardware/common/cpu/amd/default.nix
 nixos-hardware.nixosModules.common-cpu-amd-pstate # ~/Projects/nixos-hardware/common/cpu/amd/pstate.nix
 nixos-hardware.nixosModules.common-cpu-amd-zenpower # ~/Projects/nixos-hardware/common/cpu/amd/zenpower.nix
 # GPU - AMD
 nixos-hardware.nixosModules.common-gpu-amd # ~/Projects/nixos-hardware/common/gpu/amd/default.nix
 # SSD
 nixos-hardware.nixosModules.common-pc-ssd # ~/Projects/nixos-hardware/common/pc/ssd/default.nix
 # SystemN ~/Projects/systemn/flake.nix
 # =======
 # Hardware
 systemn.nixosModules.hardware # ~/Projects/systemn/hardware/default.nix
 systemn.nixosModules.hardware-bluetooth # ~/Projects/systemn/hardware/bluetooth.nix
 systemn.nixosModules.hardware-graphics # ~/Projects/systemn/hardware/graphics/default.nix
 # systemn.nixosModules.hardware-graphics-amd # ~/Projects/systemn/hardware/graphics/amd.nix
 # systemn.nixosModules.hardware-keyboard-ergodox_ez # ~/Projects/systemn/hardware/keyboard/ergodox_ez.nix
 systemn.nixosModules.hardware-memtest # ~/Projects/systemn/hardware/memtest.nix
 systemn.nixosModules.hardware-phone # ~/Projects/systemn/hardware/phone.nix
 systemn.nixosModules.hardware-printing # ~/Projects/systemn/hardware/printing.nix
 # systemn.nixosModules.hardware-truerng # ~/Projects/systemn/hardware/truerng.nix
 systemn.nixosModules.hardware-workstation # ~/Projects/systemn/hardware/workstation/default.nix
 # System
 systemn.nixosModules.system # ~/Projects/systemn/system/default.nix
 systemn.nixosModules.system-base-hardware_information # ~/Projects/systemn/system/base/hardware_information.nix
 systemn.nixosModules.system-base-watchdog # ~/Projects/systemn/system/base/watchdog.nix
 # systemn.nixosModules.system-boot-efi # ~/Projects/systemn/system/boot/efi.nix
 systemn.nixosModules.system-input # ~/Projects/systemn/system/input/default.nix
 systemn.nixosModules.system-input-keyboard-dvorak # ~/Projects/systemn/system/input/keyboard/dvorak.nix
 # systemn.nixosModules.system-input-mouse # ~/Projects/systemn/system/input/mouse.nix
 # systemn.nixosModules.system-input-racing_wheel # ~/Projects/systemn/system/input/racing_wheel.nix
 systemn.nixosModules.system-networking # ~/Projects/systemn/system/networking/default.nix
 # systemn.nixosModules.system-networking-connectivity-wireguard # ~/Projects/systemn/system/networking/connectivity/wireguard.nix
 # systemn.nixosModules.system-networking-connectivity-zerotier # ~/Projects/systemn/system/networking/connectivity/zerotier.nix
 # systemn.nixosModules.system-security-yubikey # ~/Projects/systemn/system/security/yubikey.nix;
 # Desktop
 systemn.nixosModules.desktop # ~/Projects/systemn/desktop/default.nix
 systemn.nixosModules.desktop-gaming # ~/Projects/systemn/desktop/gaming/default.nix
 # systemn.nixosModules.desktop-programming # ~/Projects/systemn/desktop/programming/default.nix
 # systemn.nixosModules.desktop-programming-c # ~/Projects/systemn/desktop/programming/c.nix
 # systemn.nixosModules.desktop-programming-cpp # ~/Projects/systemn/desktop/programming/cpp.nix
 # systemn.nixosModules.desktop-programming-haskell # ~/Projects/systemn/desktop/programming/haskell.nix
 # systemn.nixosModules.desktop-programming-python # ~/Projects/systemn/desktop/programming/python.nix
 # systemn.nixosModules.desktop-programming-rust # ~/Projects/systemn/desktop/programming/rust.nix
 systemn.nixosModules.desktop-shell-graphical-audio # ~/Projects/systemn/desktop/shell/graphical/audio.nix;
 systemn.nixosModules.desktop-shell-graphical-browser-chromium # ~/Projects/systemn/desktop/shell/graphical/browser/chromium.nix
 systemn.nixosModules.desktop-shell-graphical-cad # ~/Projects/systemn/desktop/shell/graphical/cad.nix;
 # systemn.nixosModules.desktop-shell-graphical-hyprland # ~/Projects/systemn/desktop/shell/graphical/hyprland.nix
 systemn.nixosModules.desktop-shell-graphical-images # ~/Projects/systemn/desktop/shell/graphical/images.nix;
 systemn.nixosModules.desktop-shell-graphical-office # ~/Projects/systemn/desktop/shell/graphical/office.nix
 systemn.nixosModules.desktop-shell-graphical-video # ~/Projects/systemn/desktop/shell/graphical/video.nix;
 systemn.nixosModules.desktop-shell-terminal-documents # ~/Projects/systemn/desktop/shell/terminal/documents.nix
 systemn.nixosModules.desktop-sound # ~/Projects/systemn/desktop/sound.nix
 # Workstation
 systemn.nixosModules.workstation-virtualisation # ~/Projects/systemn/workstation/virtualisation/default.nix
 # Server
 # systemn.nixosModules.monero # ~/Projects/systemn/server/monero.nix
 # systemn.nixosModules.server-database-postgres # ~/Projects/systemn/server/database/postgres.nix
 systemn.nixosModules.server-grafana # ~/Projects/systemn/server/grafana.nix
 systemn.nixosModules.server-nix_serve # ~/Projects/systemn/server/nix-serve.nix
 systemn.nixosModules.server-ollama # ~/Projects/systemn/server/ollama.nix
 systemn.nixosModules.server-prometheus # ~/Projects/systemn/server/prometheus.nix
 systemn.nixosModules.server-transmission # ~/Projects/systemn/server/transmission.nix
 systemn.nixosModules.server-web # ~/Projects/systemn/server/web.nix
 # Configuration
 # =============
 ./secrets # ./secrets/default.nix
 ./configuration.nix
 ];
 };
 };
 };
 }

configuration.nix

 {
 config,
 pkgs,
 lib,
 ...
 }:
 {
 # ./flake.nix
 imports = [
 ./hardware-configuration.nix
 ];
 hardware = {
 enableRedistributableFirmware = true;
 };
 environment = {
 systemPackages = with pkgs; [
 ];
 };
 nixpkgs = {
 config = {
 allowUnfreePredicate =
 pkg:
 builtins.elem (lib.getName pkg) [
 "steam"
 "steam-unwrapped"
 "symbola"
 "zerotierone"
 ];
 };
 };
 nix = {
 # https://nix.dev/manual/nix/2.24/command-ref/conf-file.html
 settings = {
 max-jobs = lib.mkDefault 16;
 cores = 32;
 };
 };
 system = {
 # 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. It‘s 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).
 stateVersion = "25.11"; # Did you read the comment?
 };
 }