From 71eb9ec35f72171f4a72f48708f446e760101cb4 Mon Sep 17 00:00:00 2001 From: Wekuz Date: Tue, 30 Dec 2025 15:25:29 +0200 Subject: [PATCH] Formatted files --- flake.nix | 37 +++++++++++++++---------- hosts/plexy/default.nix | 38 +++++++++++++++++++++----- hosts/plexy/disko-config.nix | 15 ++++++++-- hosts/plexy/hardware-configuration.nix | 18 ++++++++++-- hosts/plexy/home.nix | 4 ++- 5 files changed, 83 insertions(+), 29 deletions(-) diff --git a/flake.nix b/flake.nix index 2fd1a43..ac87abe 100644 --- a/flake.nix +++ b/flake.nix @@ -15,21 +15,28 @@ }; }; - outputs = { nixpkgs, home-manager, disko, ... }: { - nixosConfigurations = { - plexy = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./hosts/plexy - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.wekuz = import ./hosts/plexy/home.nix; - } - disko.nixosModules.disko - ]; + outputs = + { + nixpkgs, + home-manager, + disko, + ... + }: + { + nixosConfigurations = { + plexy = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/plexy + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.wekuz = import ./hosts/plexy/home.nix; + } + disko.nixosModules.disko + ]; + }; }; }; - }; } diff --git a/hosts/plexy/default.nix b/hosts/plexy/default.nix index bf88550..0a04d19 100644 --- a/hosts/plexy/default.nix +++ b/hosts/plexy/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + inputs, + pkgs, + ... +}: { - imports = [ ./hardware-configuration.nix ./disko-config.nix ]; + imports = [ + ./hardware-configuration.nix + ./disko-config.nix + ]; nix = { package = pkgs.nixVersions.stable; @@ -12,7 +19,10 @@ dates = "weekly"; options = "--delete-older-than 2w"; }; - settings.experimental-features = [ "nix-command" "flakes" ]; + settings.experimental-features = [ + "nix-command" + "flakes" + ]; extraOptions = '' min-free = 512000000 @@ -30,7 +40,10 @@ hardware.graphics = { enable = true; - extraPackages = with pkgs; [ intel-media-driver intel-vaapi-driver ]; + extraPackages = with pkgs; [ + intel-media-driver + intel-vaapi-driver + ]; }; time.timeZone = "Europe/Tallinn"; @@ -39,7 +52,11 @@ hostName = "plexy"; networkmanager.enable = true; nftables.enable = true; - firewall.allowedTCPPorts = [ 22 80 443 ]; + firewall.allowedTCPPorts = [ + 22 + 80 + 443 + ]; }; services = { @@ -57,7 +74,10 @@ enable = true; dates = "weekly"; randomizedDelaySec = "30min"; - flags = [ "--all" "--volumes" ]; + flags = [ + "--all" + "--volumes" + ]; }; }; }; @@ -66,7 +86,11 @@ users.users.wekuz = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "docker" ]; + extraGroups = [ + "wheel" + "networkmanager" + "docker" + ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs3aPxyJpVGytuVSO3va2WybKNFMR241o8DCJQbBEWV" ]; diff --git a/hosts/plexy/disko-config.nix b/hosts/plexy/disko-config.nix index 8ddfd7f..7efa09c 100644 --- a/hosts/plexy/disko-config.nix +++ b/hosts/plexy/disko-config.nix @@ -24,16 +24,25 @@ extraArgs = [ "-f" ]; # Override existing partition subvolumes = { "/rootfs" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/"; }; "/home" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/home"; }; "/home/wekuz" = { }; "/nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/nix"; }; # TODO: /log diff --git a/hosts/plexy/hardware-configuration.nix b/hosts/plexy/hardware-configuration.nix index 728cc54..e78d289 100644 --- a/hosts/plexy/hardware-configuration.nix +++ b/hosts/plexy/hardware-configuration.nix @@ -1,10 +1,22 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/plexy/home.nix b/hosts/plexy/home.nix index c43e2a1..4665f8b 100644 --- a/hosts/plexy/home.nix +++ b/hosts/plexy/home.nix @@ -45,7 +45,9 @@ }; }; - programs.zsh = { enable = true; }; + programs.zsh = { + enable = true; + }; home.stateVersion = "25.11"; }