Johan Rong před 3 měsíci
rodič
revize
645cb9c86b

+ 6 - 2
hosts/desktop-nixos-workstation/configuration.nix

@@ -1,12 +1,14 @@
 { config, pkgs, lib, ... }:
 
+let 
+  hosts = import ../../config/hosts.nix;
+in
 {
   imports = [
-    ./networking.nix
     ./hardware-configuration.nix
 
     ../../nixos/hardware/gpu/nvidia.nix
-    ../../nixos/hardware/wifi/bcm4360.nix
+    ../../nixos/hardware/networking/bcm4360.nix
     ../../nixos/hardware/sound
     ../../nixos/hardware/bluetooth
     ../../nixos/flavors/desktop/sway
@@ -20,6 +22,8 @@
 
   nix.settings.experimental-features = [ "nix-command" "flakes" ];
 
+  networking.hostName = hosts.nixstation.hostname;
+
   boot.loader.systemd-boot.enable = true;
   boot.loader.efi.canTouchEfiVariables = true;
   system.stateVersion = "25.11";

+ 0 - 58
hosts/desktop-nixos-workstation/hardware-configuration.nix.bak

@@ -1,58 +0,0 @@
-# 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, ... }:
-
-{
-  imports =
-    [ (modulesPath + "/installer/scan/not-detected.nix")
-    ];
-
-  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-amd" ];
-  boot.extraModulePackages = [ ];
-
-  fileSystems."/" =
-    { device = "/dev/disk/by-uuid/40f01d77-f742-494a-bd9d-05c691619578";
-      fsType = "btrfs";
-      options = [ "subvol=@" ];
-    };
-
-  fileSystems."/home" =
-    { device = "/dev/disk/by-uuid/40f01d77-f742-494a-bd9d-05c691619578";
-      fsType = "btrfs";
-      options = [ "subvol=@home" ];
-    };
-
-  fileSystems."/boot" =
-    { device = "/dev/disk/by-uuid/DC2D-30C4";
-      fsType = "vfat";
-      options = [ "fmask=0077" "dmask=0077" ];
-    };
-
-  fileSystems."/hdd" =
-    { device = "/dev/disk/by-uuid/995f3a39-f893-497d-bc2a-c0cb1f4c913c";
-      fsType = "ext4";
-    };
-
-  fileSystems."/nix" =
-    { device = "/dev/disk/by-uuid/08162bfa-f48f-4b7c-8bf0-2a38e92810de";
-      fsType = "btrfs";
-    };
-
-  fileSystems."/nvme" =
-    { device = "/dev/disk/by-uuid/aa535a01-d005-4fd2-9e95-3787ce33b6f3";
-      fsType = "btrfs";
-    };
-
-  fileSystems."/storage" =
-    { device = "/dev/disk/by-uuid/6f208e9e-ec40-4107-803d-d8f381a31e40";
-      fsType = "btrfs";
-    };
-
-  swapDevices = [ ];
-
-  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}

+ 0 - 22
hosts/desktop-nixos-workstation/iso-configuration.nix

@@ -1,22 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{
-  imports = [
-    #../../nixos/hardware/gpu/nvidia.nix
-    ../../nixos/hardware/wifi/bcm4360.nix
-  ];
-
-  nixpkgs.config.allowUnfree = true;
-
-  networking.hostName = "iso";
-  networking.networkmanager.enable = true;
-  networking.firewall.checkReversePath = false;
-
-  hardware.graphics.enable = true;
-
-  nix.settings.experimental-features = [ "nix-command" "flakes" ];
-
-  boot.loader.systemd-boot.enable = true;
-  boot.loader.efi.canTouchEfiVariables = true;
-  system.stateVersion = "25.11";  
-}

+ 0 - 16
hosts/desktop-nixos-workstation/networking.nix

@@ -1,16 +0,0 @@
-{ config, pkgs, ... }:
-let
-  hosts = import ../../config/hosts.nix;
-in
-
-{
-  environment.systemPackages = with pkgs; [
-    protonvpn-gui
-    wireguard-tools
-  ];
-
-  networking.hostName = hosts.nixstation.hostname;
-  networking.networkmanager.enable = true;
-
-  networking.firewall.checkReversePath = false;
-}

+ 2 - 0
nixos/features/system/basic.nix

@@ -30,6 +30,8 @@
     ffmpeg_7-full
     libGL
     discord
+    protonvpn-gui
+    wireguard-tools
   ];
 
   services.flatpak = {

+ 1 - 0
nixos/flavors/desktop/sway/default.nix

@@ -27,6 +27,7 @@
   };
 
   programs.foot.enable = false;
+  programs.kdeconnect.enable = true;
 
   environment.variables = {
     GDK_BACKEND = "wayland";

+ 0 - 4
nixos/hardware/bluetooth/default.nix

@@ -1,9 +1,5 @@
 { pkgs, ... }:
 {
-  imports = [
-    ./kdeconnect.nix
-  ];
-
   hardware.bluetooth.enable = true;
   services.blueman.enable = true;
 }

+ 0 - 4
nixos/hardware/bluetooth/kdeconnect.nix

@@ -1,4 +0,0 @@
-{ pkgs, ... }:
-{
-  programs.kdeconnect.enable = true;
-}

+ 4 - 0
nixos/hardware/wifi/bcm4360.nix → nixos/hardware/networking/bcm4360.nix

@@ -1,5 +1,9 @@
 { config, lib, pkgs, ... }:
 {
+  imports = [
+    ./default.nix
+  ];
+
   boot.kernelModules = [ "wl" ];
 
   boot.blacklistedKernelModules = [ "b43" "bcma" "brcmfmac" ];

+ 5 - 0
nixos/hardware/networking/default.nix

@@ -0,0 +1,5 @@
+{ config, pkgs, ... }:
+{
+  networking.networkmanager.enable = true;
+  networking.firewall.checkReversePath = false;
+}