Johan Rong 3 月之前
父节点
当前提交
35702762bb
共有 3 个文件被更改,包括 54 次插入3 次删除
  1. 3 3
      config/hosts.nix
  2. 29 0
      hosts/dellaptop/configuration.nix
  3. 22 0
      hosts/dellaptop/home.nix

+ 3 - 3
config/hosts.nix

@@ -8,9 +8,9 @@ in
     arch = "x86_64-linux";
     user = users.default;
   };
-  nixtop = {
-    hostname = "nixtop";
-    dir = "laptop-nixos-dell";
+  dellaptop = {
+    hostname = "dellaptop";
+    dir = "dellaptop";
     arch = "x86_64-linux";
     user = users.default;  
   };

+ 29 - 0
hosts/dellaptop/configuration.nix

@@ -0,0 +1,29 @@
+{ config, pkgs, lib, ... }:
+
+let 
+  hosts = import ../../config/hosts.nix;
+in
+{
+  imports = [
+    ./hardware.nix
+
+    ../../nixos/hardware/gpu/nvidia.nix
+    ../../nixos/hardware/sound
+    ../../nixos/hardware/bluetooth
+    ../../nixos/flavors/desktop/sway
+    ../../nixos/flavors/desktop/sway/greeter-default.nix
+    ../../nixos/features/system/basic.nix
+    ../../nixos/features/system/users.nix
+    ../../nixos/features/system/gaming.nix
+  ];
+
+  nixpkgs.config.allowUnfree = true;
+
+  nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+  networking.hostName = hosts.dellaptop.hostname;
+
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+  system.stateVersion = "25.11";
+}

+ 22 - 0
hosts/dellaptop/home.nix

@@ -0,0 +1,22 @@
+{ config, pkgs, ... }:
+let
+  users = import ../../config/users.nix;
+in
+{
+  imports = [
+    ../../home/flavors/desktop/sway
+    ../../home/flavors/application/workstation
+    ../../home/flavors/application/development
+  ];
+
+  news.display = "silent";
+
+  #nixpkgs.config.allowUnfree = true;
+
+  home = {
+    username = users.default;
+    homeDirectory = "/home/${users.default}";
+    stateVersion = "25.11";
+  };
+
+}