formatting

This commit is contained in:
Henri Dohmen 2025-03-22 12:28:50 +01:00
parent e3e370c893
commit 43860609e1
22 changed files with 230 additions and 154 deletions

View file

@ -3,25 +3,28 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @ inputs:
let lib = nixpkgs.lib; in
let mod = import ./mod { inherit lib; }; in
let specialArgs = { inherit inputs mod; }; in
outputs =
{ self, nixpkgs }@inputs:
let
lib = nixpkgs.lib;
mod = import ./mod { inherit lib; };
specialArgs = { inherit inputs mod; };
in
{
nixosConfigurations = {
"solo" = nixpkgs.lib.nixosSystem
{
"solo" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit specialArgs;
modules = [ ./host/solo ];
};
"c2" = nixpkgs.lib.nixosSystem
{
"c2" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit specialArgs;
modules = [ ./host/c2 ];
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
};
}

View file

@ -1,4 +1,5 @@
{ mod, ... }: {
{ mod, ... }:
{
networking.hostName = "c2";
imports = with mod; [

View file

@ -1,40 +1,67 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fileSystems."/" = {
device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fsType = "btrfs";
options = [ "noatime" "compress=zstd:1" "subvol=@" ];
options = [
"noatime"
"compress=zstd:1"
"subvol=@"
];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fsType = "btrfs";
options = [ "noatime" "compress=zstd:1" "subvol=@nix" ];
options = [
"noatime"
"compress=zstd:1"
"subvol=@nix"
];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0aa43f8a-a6e8-47aa-800d-b02d98f2cb8a";
fsType = "btrfs";
options = [ "noatime" "compress=zstd:1" "subvol=@home" ];
options = [
"noatime"
"compress=zstd:1"
"subvol=@home"
];
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/829B-BDFC";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/829B-BDFC";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View file

@ -1,4 +1,5 @@
{ mod, ... }: {
{ mod, ... }:
{
networking.hostName = "solo";
services.xserver.enable = true;

View file

@ -1,31 +1,46 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/7554858a-648d-47d9-839a-6b66ef2b99d9";
fileSystems."/" = {
device = "/dev/disk/by-uuid/7554858a-648d-47d9-839a-6b66ef2b99d9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8040-8FF4";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/8040-8FF4";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9569220a-c151-44ca-a4db-037e63d314be"; }
swapDevices = [
{ device = "/dev/disk/by-uuid/9569220a-c151-44ca-a4db-037e63d314be"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pavucontrol
alsa-utils

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
boot.loader = {
efi.canTouchEfiVariables = true;
grub = {

View file

@ -1,4 +1,5 @@
{ mod, ... }: {
{ mod, ... }:
{
imports = with mod; [
audio
boot

View file

@ -1,11 +1,15 @@
{ lib, ... }:
let
walk = path:
let dir = builtins.readDir path;
in lib.mapAttrs' (name: value: {
walk =
path:
let
dir = builtins.readDir path;
in
lib.mapAttrs' (name: value: {
name = lib.removeSuffix ".nix" name;
value = if value == "regular" then
value =
if value == "regular" then
import (path + "/${name}")
else if value == "directory" then
walk (path + "/${name}")
@ -13,4 +17,5 @@ let
builtins.throw "Cannot handle item of type ${value}";
}) dir;
in walk ./.
in
walk ./.

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
runelite
];

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
# hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [ vial ];
services.udev.packages = with pkgs; [ vial ];

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
networking.networkmanager.enable = true;
networking.networkmanager.wifi.macAddress = "random";

View file

@ -1,14 +1,23 @@
{ lib, ... }: {
{ lib, ... }:
{
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "@wheel" ];
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
};
programs.nix-ld.enable = true;
nixpkgs.config.allowUnfree = false;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"vscode"

View file

@ -1,4 +1,5 @@
{ config, ... }: {
{ config, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = {

View file

@ -1,3 +1,4 @@
{ ... }: {
{ ... }:
{
security.rtkit.enable = true;
}

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
systemd.services.NetworkManager-wait-online.enable = false;
services.printing.enable = true;
services.avahi = {

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.shells = with pkgs; [
fish
bashInteractive

View file

@ -1,6 +1,8 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = let
environment.systemPackages =
let
editors = with pkgs; [
vscode
emacs
@ -41,12 +43,8 @@
binutils
];
in editors
++ messengers
++ util
++ media
++ productivity
++ dev;
in
editors ++ messengers ++ util ++ media ++ productivity ++ dev;
virtualisation = {
docker.enable = true;

View file

@ -1,9 +1,13 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
users.users.hd = {
description = "Henri";
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.fish;
packages = [];
packages = [ ];
};
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
enable = true;