summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian <[email protected]>2026-04-17 12:03:46 -0500
committerChristian <[email protected]>2026-04-17 12:03:46 -0500
commitb37bb85cd72dc3aca02aaa99d944f92ce75246f2 (patch)
treebc185b306e5af248b866240dcc4771845811b760
parent0b77660443280e0dbfccf1b55785ea6db5ac2d62 (diff)
Formatting
-rw-r--r--flake.nix43
-rw-r--r--hosts/desktop/configuration.nix20
-rw-r--r--hosts/desktop/hardware-configuration.nix58
-rw-r--r--hosts/hyper-v/configuration.nix22
-rw-r--r--hosts/hyper-v/hardware-configuration.nix40
-rw-r--r--hosts/laptop/configuration.nix20
-rw-r--r--hosts/laptop/hardware-configuration.nix36
-rw-r--r--modules/common.nix29
-rw-r--r--modules/home/christian.nix14
-rw-r--r--modules/home/nvim/default.nix3
10 files changed, 186 insertions, 99 deletions
diff --git a/flake.nix b/flake.nix
index 82c32c0..c83dc9e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,23 +21,32 @@
};
};
- outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nix-index-database, ... }@inputs: {
- nixosConfigurations = {
- hyper-v = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = { inherit inputs; };
- modules = [ ./hosts/hyper-v/configuration.nix ];
- };
- desktop = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = { inherit inputs; };
- modules = [ ./hosts/desktop/configuration.nix ];
- };
- laptop = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = { inherit inputs; };
- modules = [ ./hosts/laptop/configuration.nix ];
+ outputs =
+ {
+ self,
+ nixpkgs,
+ nixpkgs-unstable,
+ home-manager,
+ nix-index-database,
+ ...
+ }@inputs:
+ {
+ nixosConfigurations = {
+ hyper-v = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = { inherit inputs; };
+ modules = [ ./hosts/hyper-v/configuration.nix ];
+ };
+ desktop = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = { inherit inputs; };
+ modules = [ ./hosts/desktop/configuration.nix ];
+ };
+ laptop = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = { inherit inputs; };
+ modules = [ ./hosts/laptop/configuration.nix ];
+ };
};
};
- };
}
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index 810fa8b..e276b17 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, inputs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
let
unstable = import inputs.nixpkgs-unstable {
@@ -8,11 +14,11 @@ let
};
in
{
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ../../modules/common.nix
- ];
+ imports = [
+ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ../../modules/common.nix
+ ];
boot.loader.grub = {
enable = true;
@@ -25,7 +31,7 @@ in
networking.hostName = "desktop";
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
- General.EnableNetworkConfiguration = true;
+ General.EnableNetworkConfiguration = true;
};
networking.nameservers = [
"1.1.1.1"
diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix
index cc0c460..fb2980b 100644
--- a/hosts/desktop/hardware-configuration.nix
+++ b/hosts/desktop/hardware-configuration.nix
@@ -1,20 +1,33 @@
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "nvme"
+ "xhci_pci"
+ "ahci"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [
- "amdgpu.noretry=0" # Allows the GPU to retry memory access instead of crashing
- "amdgpu.gpureset=1" # Enables better recovery if a fault occurs
+ "amdgpu.noretry=0" # Allows the GPU to retry memory access instead of crashing
+ "amdgpu.gpureset=1" # Enables better recovery if a fault occurs
"amdgpu.pcie_gen_cap=0x00040000" # Forces PCIe 4.0 if your board is being weird
];
@@ -27,16 +40,19 @@
];
};
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/e09483ea-5fb4-472d-99ba-3d4dc9560400";
- fsType = "btrfs";
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/e09483ea-5fb4-472d-99ba-3d4dc9560400";
+ fsType = "btrfs";
+ };
- fileSystems."/boot/efi" =
- { device = "/dev/disk/by-uuid/B29A-4911";
- fsType = "vfat";
- options = [ "fmask=0077" "dmask=0077" ];
- };
+ fileSystems."/boot/efi" = {
+ device = "/dev/disk/by-uuid/B29A-4911";
+ fsType = "vfat";
+ options = [
+ "fmask=0077"
+ "dmask=0077"
+ ];
+ };
zramSwap = {
enable = true;
@@ -45,10 +61,12 @@
priority = 100;
};
- swapDevices = [ {
- device = "/swap/swapfile";
- size = 32 * 1024;
- } ];
+ swapDevices = [
+ {
+ device = "/swap/swapfile";
+ size = 32 * 1024;
+ }
+ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
diff --git a/hosts/hyper-v/configuration.nix b/hosts/hyper-v/configuration.nix
index 8da08c2..77da89b 100644
--- a/hosts/hyper-v/configuration.nix
+++ b/hosts/hyper-v/configuration.nix
@@ -1,18 +1,24 @@
-{config, lib, pkgs, inputs, ...}:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ../../modules/common.nix
- ];
+ imports = [
+ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ../../modules/common.nix
+ ];
networking.hostName = "hyper-v";
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
-
+
# Hyper-V setup
virtualisation.hypervGuest.enable = true;
services.xrdp.enable = true;
@@ -29,7 +35,7 @@
--replace-fail "#vmconnect=true" "vmconnect=true" \
--replace-fail "security_layer=negotiate" "security_layer=rdp" \
--replace-fail "crypt_level=high" "crypt_level=none" \
- '';
+ '';
services.xserver.displayManager.lightdm.enable = false;
diff --git a/hosts/hyper-v/hardware-configuration.nix b/hosts/hyper-v/hardware-configuration.nix
index 0417079..4a2d311 100644
--- a/hosts/hyper-v/hardware-configuration.nix
+++ b/hosts/hyper-v/hardware-configuration.nix
@@ -1,30 +1,42 @@
# 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 = [ ];
- boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ];
+ boot.initrd.availableKernelModules = [
+ "sd_mod"
+ "sr_mod"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/11857814-2a7a-4aaa-82bd-7ecea40117d3";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/1FB1-AF5C";
- fsType = "vfat";
- options = [ "fmask=0077" "dmask=0077" ];
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/11857814-2a7a-4aaa-82bd-7ecea40117d3";
+ fsType = "ext4";
+ };
- swapDevices =
- [ { device = "/dev/disk/by-uuid/5cfd31ff-439c-4829-b575-92ea76bec3c4"; }
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/1FB1-AF5C";
+ fsType = "vfat";
+ options = [
+ "fmask=0077"
+ "dmask=0077"
];
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/5cfd31ff-439c-4829-b575-92ea76bec3c4"; }
+ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.hypervGuest.enable = true;
diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix
index edc7306..87cd2a3 100644
--- a/hosts/laptop/configuration.nix
+++ b/hosts/laptop/configuration.nix
@@ -1,11 +1,17 @@
-{ config, lib, pkgs, inputs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ../../modules/common.nix
- ];
+ imports = [
+ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ../../modules/common.nix
+ ];
boot.loader.grub = {
enable = true;
@@ -18,7 +24,7 @@
networking.hostName = "laptop";
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
- General.EnableNetworkConfiguration = true;
+ General.EnableNetworkConfiguration = true;
};
networking.nameservers = [
"1.1.1.1"
diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix
index 291f635..6ad14c8 100644
--- a/hosts/laptop/hardware-configuration.nix
+++ b/hosts/laptop/hardware-configuration.nix
@@ -1,27 +1,37 @@
# 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" "rtsx_pci_sdmmc" ];
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "nvme"
+ "rtsx_pci_sdmmc"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/56ae0488-d952-41d8-8128-60a46e979d91";
- fsType = "ext4";
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/56ae0488-d952-41d8-8128-60a46e979d91";
+ fsType = "ext4";
+ };
- fileSystems."/boot/efi" =
- { device = "/dev/disk/by-label/ESP";
- fsType = "vfat";
- };
+ fileSystems."/boot/efi" = {
+ device = "/dev/disk/by-label/ESP";
+ fsType = "vfat";
+ };
swapDevices = [ ];
diff --git a/modules/common.nix b/modules/common.nix
index 6ca9591..091b8c9 100644
--- a/modules/common.nix
+++ b/modules/common.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, inputs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
imports = [
@@ -9,7 +15,10 @@
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
# Experimental features
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
@@ -30,10 +39,17 @@
# User
users.users.christian = {
- isNormalUser = true;
- extraGroups = [ "wheel" "video" "render" "docker" ];
- };
- home-manager.users.christian = import ./home/christian.nix;
+ isNormalUser = true;
+ extraGroups = [
+ "wheel"
+ "video"
+ "render"
+ "docker"
+ ];
+ };
+ home-manager.users.christian = {
+ imports = [ ./home/christian.nix ];
+ };
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@@ -70,4 +86,3 @@
programs.nix-index-database.comma.enable = true;
programs.command-not-found.enable = false;
}
-
diff --git a/modules/home/christian.nix b/modules/home/christian.nix
index 8c32edc..a5af420 100644
--- a/modules/home/christian.nix
+++ b/modules/home/christian.nix
@@ -1,12 +1,17 @@
-{ config, pkgs, inputs, ... }:
+{
+ config,
+ pkgs,
+ inputs,
+ ...
+}:
{
imports = [ ./nvim ];
home.stateVersion = "25.11";
- home.packages = with pkgs; [
+ home.packages = with pkgs; [
(dmenu.override {
- conf = ./dmenu/config.h;
+ conf = ./dmenu/config.h;
})
nixfmt
];
@@ -54,7 +59,7 @@
"browser.theme.toolbar-theme" = 0;
};
extensions.packages = with inputs.nur.legacyPackages.x86_64-linux.repos.rycee.firefox-addons; [
- ublock-origin
+ ublock-origin
];
};
};
@@ -64,6 +69,5 @@
extraConfig = builtins.readFile ./xmobar/xmobarrc;
};
-
programs.home-manager.enable = true;
}
diff --git a/modules/home/nvim/default.nix b/modules/home/nvim/default.nix
index 6cae9d6..8c28257 100644
--- a/modules/home/nvim/default.nix
+++ b/modules/home/nvim/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
programs.neovim = {
enable = true;
defaultEditor = true;