瀏覽代碼

Refactore structure and ++

Johan Rong 1 月之前
父節點
當前提交
3f685f74c1
共有 89 個文件被更改,包括 69 次插入 和 317 次删除
  1. 0 6
      config/hosts.nix
  2. 4 13
      flake.nix
  3. 0 9
      home/flavors/desktop/hyprland/default.nix
  4. 0 8
      home/flavors/desktop/mango/default.nix
  5. 0 8
      home/flavors/desktop/sway/default.nix
  6. 0 0
      home/modules/configs/alacritty.nix
  7. 0 0
      home/modules/configs/bashrc.nix
  8. 0 0
      home/modules/configs/fish.nix
  9. 0 0
      home/modules/desktop/hyprland/default.nix
  10. 0 0
      home/modules/desktop/hyprland/hypr/hyprland.lua
  11. 0 0
      home/modules/desktop/hyprland/hypr/modules/autostart.lua
  12. 0 0
      home/modules/desktop/hyprland/hypr/modules/environment.lua
  13. 0 0
      home/modules/desktop/hyprland/hypr/modules/input.lua
  14. 0 0
      home/modules/desktop/hyprland/hypr/modules/keybindings.lua
  15. 0 0
      home/modules/desktop/hyprland/hypr/modules/look_and_feel.lua
  16. 0 0
      home/modules/desktop/hyprland/hypr/modules/misc.lua
  17. 0 0
      home/modules/desktop/hyprland/hypr/modules/windows_and_workspaces.lua
  18. 0 0
      home/modules/desktop/hyprland/img/default.nix
  19. 0 0
      home/modules/desktop/hyprland/img/reef.png
  20. 0 0
      home/modules/desktop/hyprland/img/tux-fly.gif
  21. 0 0
      home/modules/desktop/hyprland/img/tux-race.gif
  22. 0 0
      home/modules/desktop/hyprland/shells/dankmaterialshell/clsettings.json
  23. 0 0
      home/modules/desktop/hyprland/shells/dankmaterialshell/default.nix
  24. 0 0
      home/modules/desktop/hyprland/shells/dankmaterialshell/plugin_settings.json
  25. 0 0
      home/modules/desktop/hyprland/shells/dankmaterialshell/settings.json
  26. 0 0
      home/modules/desktop/hyprland/theming/breeze-dark.nix
  27. 0 0
      home/modules/desktop/hyprland/theming/notwaita.nix
  28. 0 0
      home/modules/desktop/mango/default.nix
  29. 0 0
      home/modules/desktop/sway/bg/default.nix
  30. 0 0
      home/modules/desktop/sway/bg/reef-2.png
  31. 0 0
      home/modules/desktop/sway/bg/reef.png
  32. 0 0
      home/modules/desktop/sway/default.nix
  33. 0 0
      home/modules/desktop/sway/m3-quickshell/default.nix
  34. 0 0
      home/modules/desktop/sway/m3-quickshell/shell.qml
  35. 0 0
      home/modules/desktop/sway/scripts.nix
  36. 0 0
      home/modules/desktop/sway/sway.nix
  37. 0 0
      home/modules/desktop/sway/theming/breeze-dark.nix
  38. 0 0
      home/modules/desktop/sway/theming/notwaita.nix
  39. 0 0
      home/modules/desktop/sway/ui/eww/calendar/calendar.scss
  40. 0 0
      home/modules/desktop/sway/ui/eww/calendar/calendar.yuck
  41. 0 0
      home/modules/desktop/sway/ui/eww/calendar/default.nix
  42. 0 0
      home/modules/desktop/sway/ui/eww/default.nix
  43. 0 0
      home/modules/desktop/sway/ui/eww/network/default.nix
  44. 0 0
      home/modules/desktop/sway/ui/eww/network/network.scss
  45. 0 0
      home/modules/desktop/sway/ui/eww/network/network.yuck
  46. 0 0
      home/modules/desktop/sway/ui/eww/network/scripts/available_wifi.py
  47. 0 0
      home/modules/desktop/sway/ui/eww/network/scripts/connect_wifi.sh
  48. 0 0
      home/modules/desktop/sway/ui/eww/network/scripts/connected.py
  49. 0 0
      home/modules/desktop/sway/ui/eww/network/scripts/devices.py
  50. 0 0
      home/modules/desktop/sway/ui/mako.nix
  51. 0 0
      home/modules/desktop/sway/ui/waybar/default.nix
  52. 0 0
      home/modules/desktop/sway/ui/waybar/style.nix
  53. 0 0
      home/modules/desktop/sway/ui/wofi/default.nix
  54. 0 0
      home/modules/desktop/sway/ui/wofi/style.nix
  55. 3 6
      home/modules/system/home-base.nix
  56. 0 54
      hosts/dellaptop/configuration.nix
  57. 0 45
      hosts/dellaptop/hardware.nix
  58. 0 6
      hosts/dellaptop/iso.nix
  59. 4 2
      hosts/ideapad/home/default.nix
  60. 12 11
      hosts/ideapad/nixos/default.nix
  61. 0 0
      hosts/ideapad/nixos/hardware.nix
  62. 0 33
      hosts/nixstation/configuration.nix
  63. 6 12
      hosts/nixstation/home/default.nix
  64. 28 0
      hosts/nixstation/nixos/default.nix
  65. 0 0
      hosts/nixstation/nixos/hardware.nix
  66. 0 82
      nixos/flavors/desktop/mango/default.nix
  67. 0 22
      nixos/flavors/desktop/mango/greeter-default.nix
  68. 0 0
      nixos/modules/desktop/hyprland/default.nix
  69. 0 0
      nixos/modules/desktop/hyprland/greeter-default.nix
  70. 0 0
      nixos/modules/desktop/sway/default.nix
  71. 0 0
      nixos/modules/desktop/sway/greeter-default.nix
  72. 0 0
      nixos/modules/hardware/biometric/elan-fingerprint.nix
  73. 0 0
      nixos/modules/hardware/bluetooth/default.nix
  74. 0 0
      nixos/modules/hardware/gpu/nvidia-open.nix
  75. 0 0
      nixos/modules/hardware/gpu/nvidia.nix
  76. 0 0
      nixos/modules/hardware/networking/bcm4360.nix
  77. 0 0
      nixos/modules/hardware/networking/default.nix
  78. 0 0
      nixos/modules/hardware/sound/default.nix
  79. 0 0
      nixos/modules/system/iso-base.nix
  80. 12 0
      nixos/modules/system/nixos-base.nix
  81. 0 0
      nixos/modules/system/users.nix
  82. 0 0
      nixos/profiles/development/default.nix
  83. 0 0
      nixos/profiles/gaming/default.nix
  84. 0 0
      nixos/profiles/school/default.nix
  85. 0 0
      nixos/profiles/school/ntnu-vpn.nix
  86. 0 0
      nixos/profiles/school/smb4k.nix
  87. 0 0
      nixos/profiles/workstation/boot-splash.nix
  88. 0 0
      nixos/profiles/workstation/default.nix
  89. 0 0
      nixos/profiles/workstation/inputs.nix

+ 0 - 6
config/hosts.nix

@@ -8,12 +8,6 @@ in
     arch = "x86_64-linux";
     user = users.default;
   };
-  dellaptop = {
-    hostname = "dellaptop";
-    dir = "dellaptop";
-    arch = "x86_64-linux";
-    user = users.default;  
-  };
   ideapad = {
     hostname = "ideapad";
     dir = "ideapad";

+ 4 - 13
flake.nix

@@ -62,7 +62,7 @@
           };
           modules = [
             nix-flatpak.nixosModules.nix-flatpak
-            ./hosts/${host.dir}/configuration.nix
+            ./hosts/${host.dir}/nixos
             { nixpkgs.overlays = overlays; }
             home-manager.nixosModules.home-manager
             {
@@ -70,7 +70,7 @@
               home-manager.useGlobalPkgs = true;
               home-manager.useUserPackages = true;
               home-manager.backupFileExtension = "backup";
-              home-manager.users."${host.user}" = import ./hosts/${host.dir}/home.nix;
+              home-manager.users."${host.user}" = import ./hosts/${host.dir}/home;
             }
           ] ++ modules;
         };
@@ -93,11 +93,6 @@
         nixpkgs = inputs.nixpkgs;
         home-manager = inputs.home-manager;
       };
-      nixosConfigurations."${hosts.dellaptop.hostname}" = mkNixOSConfigurations {
-        host = hosts.dellaptop;
-        nixpkgs = inputs.nixpkgs;
-        home-manager = inputs.home-manager;
-      };
       nixosConfigurations."${hosts.ideapad.hostname}" = mkNixOSConfigurations {
         host = hosts.ideapad;
         nixpkgs = inputs.nixpkgs;
@@ -108,10 +103,6 @@
         host = hosts.nixstation;
         nixpkgs = inputs.nixpkgs;
       };
-      nixosConfigurations."${hosts.dellaptop.hostname}-iso" = mkISOConfiguration {
-        host = hosts.dellaptop;
-        nixpkgs = inputs.nixpkgs;
-      };
       nixosConfigurations."${hosts.ideapad.hostname}-iso" = mkISOConfiguration {
         host = hosts.ideapad;
         nixpkgs = inputs.nixpkgs;
@@ -122,8 +113,8 @@
         nixpkgs = inputs.nixpkgs;
         home-manager = inputs.home-manager;
       };
-      homeConfigurations."${hosts.dellaptop.user}@${hosts.dellaptop.hostname}" = mkHomeConfigurations {
-        host = hosts.dellaptop;
+      homeConfigurations."${hosts.ideapad.user}@${hosts.ideapad.hostname}" = mkHomeConfigurations {
+        host = hosts.ideapad;
         nixpkgs = inputs.nixpkgs;
         home-manager = inputs.home-manager;
       };

+ 0 - 9
home/flavors/desktop/hyprland/default.nix

@@ -1,9 +0,0 @@
-{ pkgs, lib, ... }:
-{
-  imports = [
-    ../../../features/desktop/hyprland
-    ../../../features/application/bashrc.nix
-    ../../../features/application/alacritty.nix
-    ../../../features/application/fish.nix
-  ];
-}

+ 0 - 8
home/flavors/desktop/mango/default.nix

@@ -1,8 +0,0 @@
-{ pkgs, lib, ... }:
-{
-  imports = [
-    ../../../features/desktop/mango
-    ../../../features/application/bashrc.nix
-    ../../../features/application/alacritty.nix
-  ];
-}

+ 0 - 8
home/flavors/desktop/sway/default.nix

@@ -1,8 +0,0 @@
-{ pkgs, lib, ... }:
-{
-  imports = [
-    ../../../features/desktop/sway
-    ../../../features/application/bashrc.nix
-    ../../../features/application/alacritty.nix
-  ];
-}

+ 0 - 0
home/features/application/alacritty.nix → home/modules/configs/alacritty.nix


+ 0 - 0
home/features/application/bashrc.nix → home/modules/configs/bashrc.nix


+ 0 - 0
home/features/application/fish.nix → home/modules/configs/fish.nix


+ 0 - 0
home/features/desktop/hyprland/default.nix → home/modules/desktop/hyprland/default.nix


+ 0 - 0
home/features/desktop/hyprland/hypr/hyprland.lua → home/modules/desktop/hyprland/hypr/hyprland.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/autostart.lua → home/modules/desktop/hyprland/hypr/modules/autostart.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/environment.lua → home/modules/desktop/hyprland/hypr/modules/environment.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/input.lua → home/modules/desktop/hyprland/hypr/modules/input.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/keybindings.lua → home/modules/desktop/hyprland/hypr/modules/keybindings.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/look_and_feel.lua → home/modules/desktop/hyprland/hypr/modules/look_and_feel.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/misc.lua → home/modules/desktop/hyprland/hypr/modules/misc.lua


+ 0 - 0
home/features/desktop/hyprland/hypr/modules/windows_and_workspaces.lua → home/modules/desktop/hyprland/hypr/modules/windows_and_workspaces.lua


+ 0 - 0
home/features/desktop/hyprland/img/default.nix → home/modules/desktop/hyprland/img/default.nix


+ 0 - 0
home/features/desktop/hyprland/img/reef.png → home/modules/desktop/hyprland/img/reef.png


+ 0 - 0
home/features/desktop/hyprland/img/tux-fly.gif → home/modules/desktop/hyprland/img/tux-fly.gif


+ 0 - 0
home/features/desktop/hyprland/img/tux-race.gif → home/modules/desktop/hyprland/img/tux-race.gif


+ 0 - 0
home/features/desktop/hyprland/shells/dankmaterialshell/clsettings.json → home/modules/desktop/hyprland/shells/dankmaterialshell/clsettings.json


+ 0 - 0
home/features/desktop/hyprland/shells/dankmaterialshell/default.nix → home/modules/desktop/hyprland/shells/dankmaterialshell/default.nix


+ 0 - 0
home/features/desktop/hyprland/shells/dankmaterialshell/plugin_settings.json → home/modules/desktop/hyprland/shells/dankmaterialshell/plugin_settings.json


+ 0 - 0
home/features/desktop/hyprland/shells/dankmaterialshell/settings.json → home/modules/desktop/hyprland/shells/dankmaterialshell/settings.json


+ 0 - 0
home/features/desktop/hyprland/theming/breeze-dark.nix → home/modules/desktop/hyprland/theming/breeze-dark.nix


+ 0 - 0
home/features/desktop/hyprland/theming/notwaita.nix → home/modules/desktop/hyprland/theming/notwaita.nix


+ 0 - 0
home/features/desktop/mango/default.nix → home/modules/desktop/mango/default.nix


+ 0 - 0
home/features/desktop/sway/bg/default.nix → home/modules/desktop/sway/bg/default.nix


+ 0 - 0
home/features/desktop/sway/bg/reef-2.png → home/modules/desktop/sway/bg/reef-2.png


+ 0 - 0
home/features/desktop/sway/bg/reef.png → home/modules/desktop/sway/bg/reef.png


+ 0 - 0
home/features/desktop/sway/default.nix → home/modules/desktop/sway/default.nix


+ 0 - 0
home/features/desktop/sway/m3-quickshell/default.nix → home/modules/desktop/sway/m3-quickshell/default.nix


+ 0 - 0
home/features/desktop/sway/m3-quickshell/shell.qml → home/modules/desktop/sway/m3-quickshell/shell.qml


+ 0 - 0
home/features/desktop/sway/scripts.nix → home/modules/desktop/sway/scripts.nix


+ 0 - 0
home/features/desktop/sway/sway.nix → home/modules/desktop/sway/sway.nix


+ 0 - 0
home/features/desktop/sway/theming/breeze-dark.nix → home/modules/desktop/sway/theming/breeze-dark.nix


+ 0 - 0
home/features/desktop/sway/theming/notwaita.nix → home/modules/desktop/sway/theming/notwaita.nix


+ 0 - 0
home/features/desktop/sway/ui/eww/calendar/calendar.scss → home/modules/desktop/sway/ui/eww/calendar/calendar.scss


+ 0 - 0
home/features/desktop/sway/ui/eww/calendar/calendar.yuck → home/modules/desktop/sway/ui/eww/calendar/calendar.yuck


+ 0 - 0
home/features/desktop/sway/ui/eww/calendar/default.nix → home/modules/desktop/sway/ui/eww/calendar/default.nix


+ 0 - 0
home/features/desktop/sway/ui/eww/default.nix → home/modules/desktop/sway/ui/eww/default.nix


+ 0 - 0
home/features/desktop/sway/ui/eww/network/default.nix → home/modules/desktop/sway/ui/eww/network/default.nix


+ 0 - 0
home/features/desktop/sway/ui/eww/network/network.scss → home/modules/desktop/sway/ui/eww/network/network.scss


+ 0 - 0
home/features/desktop/sway/ui/eww/network/network.yuck → home/modules/desktop/sway/ui/eww/network/network.yuck


+ 0 - 0
home/features/desktop/sway/ui/eww/network/scripts/available_wifi.py → home/modules/desktop/sway/ui/eww/network/scripts/available_wifi.py


+ 0 - 0
home/features/desktop/sway/ui/eww/network/scripts/connect_wifi.sh → home/modules/desktop/sway/ui/eww/network/scripts/connect_wifi.sh


+ 0 - 0
home/features/desktop/sway/ui/eww/network/scripts/connected.py → home/modules/desktop/sway/ui/eww/network/scripts/connected.py


+ 0 - 0
home/features/desktop/sway/ui/eww/network/scripts/devices.py → home/modules/desktop/sway/ui/eww/network/scripts/devices.py


+ 0 - 0
home/features/desktop/sway/ui/mako.nix → home/modules/desktop/sway/ui/mako.nix


+ 0 - 0
home/features/desktop/sway/ui/waybar/default.nix → home/modules/desktop/sway/ui/waybar/default.nix


+ 0 - 0
home/features/desktop/sway/ui/waybar/style.nix → home/modules/desktop/sway/ui/waybar/style.nix


+ 0 - 0
home/features/desktop/sway/ui/wofi/default.nix → home/modules/desktop/sway/ui/wofi/default.nix


+ 0 - 0
home/features/desktop/sway/ui/wofi/style.nix → home/modules/desktop/sway/ui/wofi/style.nix


+ 3 - 6
hosts/dellaptop/home.nix → home/modules/system/home-base.nix

@@ -1,12 +1,9 @@
-{ config, pkgs, lib, ... }:
+{ config, pkgs, ... }:
+
 let
-  users = import ../../config/users.nix;
+  users = import ../../../config/users.nix;
 in
 {
-  imports = [
-    ../../home/flavors/desktop/hyprland
-  ];
-
   news.display = "silent";
 
   home = {

+ 0 - 54
hosts/dellaptop/configuration.nix

@@ -1,54 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-let 
-  hosts = import ../../config/hosts.nix;
-in
-{
-  imports = [
-    ./hardware.nix
-
-    ../../nixos/hardware/networking
-    ../../nixos/hardware/gpu/nvidia.nix
-    ../../nixos/hardware/sound
-    ../../nixos/hardware/bluetooth
-    ../../nixos/flavors/desktop/hyprland
-    ../../nixos/flavors/desktop/hyprland/greeter-default.nix
-    ../../nixos/flavors/application/workstation
-    ../../nixos/flavors/application/development
-    ../../nixos/flavors/application/gaming
-    ../../nixos/flavors/application/school
-    ../../nixos/features/system/users.nix
-  ];
-
-  boot.kernelParams = [
-    "resume=UUID=b0e53493-71b7-4adc-bc9a-37c16ed9672b"
-  ];
-
-  nixpkgs.config.allowUnfree = true;
-  hardware.enableAllFirmware = true;
-
-  nix.settings.experimental-features = [ "nix-command" "flakes" ];
-
-  networking.hostName = hosts.dellaptop.hostname;
-
-  hardware.nvidia = {
-    powerManagement = {
-      enable = true;
-      finegrained = true;
-    };
-
-    prime = {
-      offload = {
-        enable = true;
-        enableOffloadCmd = true;
-      };
-
-      intelBusId = "PCI:0:2:0";
-      nvidiaBusId = "PCI:2:0:0";
-    };
-  };
-
-  boot.loader.systemd-boot.enable = true;
-  boot.loader.efi.canTouchEfiVariables = true;
-  system.stateVersion = "26.05";
-}

+ 0 - 45
hosts/dellaptop/hardware.nix

@@ -1,45 +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 = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-intel" ];
-  boot.extraModulePackages = [ ];
-
-  fileSystems."/" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-    };
-
-  fileSystems."/home" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-      options = [ "subvol=home" ];
-    };
-
-  fileSystems."/nix" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-      options = [ "subvol=nix" ];
-    };
-
-  fileSystems."/boot" =
-    { device = "/dev/disk/by-uuid/0996-8DC7";
-      fsType = "vfat";
-      options = [ "fmask=0077" "dmask=0077" ];
-    };
-
-  swapDevices =
-    [ { device = "/dev/disk/by-uuid/b0e53493-71b7-4adc-bc9a-37c16ed9672b"; }
-    ];
-
-  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}

+ 0 - 6
hosts/dellaptop/iso.nix

@@ -1,6 +0,0 @@
-{ ... }:
-{
-  imports = [
-    ../../nixos/features/system/iso-base.nix
-  ];
-}

+ 4 - 2
hosts/ideapad/home.nix → hosts/ideapad/home/default.nix

@@ -1,10 +1,12 @@
 { config, pkgs, lib, ... }:
 let
-  users = import ../../config/users.nix;
+  users = import ../../../config/users.nix;
 in
 {
   imports = [
-    ../../home/flavors/desktop/hyprland
+    ../../../home/modules/system/home-base.nix
+
+    ../../../home/modules/desktop/hyprland
   ];
 
   news.display = "silent";

+ 12 - 11
hosts/ideapad/configuration.nix → hosts/ideapad/nixos/default.nix

@@ -7,17 +7,18 @@ in
   imports = [
     ./hardware.nix
 
-    ../../nixos/hardware/networking
-    ../../nixos/hardware/sound
-    ../../nixos/hardware/bluetooth
-    ../../nixos/hardware/biometric/elan-fingerprint.nix
-    ../../nixos/flavors/desktop/hyprland
-    ../../nixos/flavors/desktop/hyprland/greeter-default.nix
-    ../../nixos/flavors/application/workstation
-    ../../nixos/flavors/application/development
-    ../../nixos/flavors/application/gaming
-    ../../nixos/flavors/application/school
-    ../../nixos/features/system/users.nix
+    ../../../nixos/modules/system/nixos-base.nix
+    ../../../nixos/modules/system/users.nix
+    ../../../nixos/modules/hardware/networking
+    ../../../nixos/modules/hardware/sound
+    ../../../nixos/modules/hardware/bluetooth
+    ../../../nixos/modules/hardware/biometric/elan-fingerprint.nix
+    ../../../nixos/modules/desktop/hyprland
+    ../../../nixos/modules/desktop/hyprland/greeter-default.nix
+    ../../../nixos/modules/application/workstation
+    ../../../nixos/modules/application/development
+    ../../../nixos/modules/application/gaming
+    ../../../nixos/modules/application/school
   ];
 
   boot.kernelParams = [

+ 0 - 0
hosts/ideapad/hardware.nix → hosts/ideapad/nixos/hardware.nix


+ 0 - 33
hosts/nixstation/configuration.nix

@@ -1,33 +0,0 @@
-{ config, pkgs, lib, inputs, ... }:
-
-let 
-  hosts = import ../../config/hosts.nix;
-in
-{
-  imports = [
-    ./hardware.nix
-
-    ../../nixos/hardware/gpu/nvidia.nix
-    ../../nixos/hardware/networking/bcm4360.nix
-    ../../nixos/hardware/sound
-    ../../nixos/hardware/bluetooth
-    ../../nixos/flavors/desktop/hyprland
-    ../../nixos/flavors/desktop/hyprland/greeter-default.nix
-    ../../nixos/flavors/application/workstation
-    ../../nixos/flavors/application/development
-    ../../nixos/flavors/application/gaming
-    ../../nixos/flavors/application/school
-    ../../nixos/features/system/users.nix
-  ];
-
-  nixpkgs.config.allowUnfree = true;
-  hardware.enableAllFirmware = true;
-
-  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 = "26.05";
-}

+ 6 - 12
hosts/nixstation/home.nix → hosts/nixstation/home/default.nix

@@ -1,19 +1,13 @@
 { config, pkgs, ... }:
-let
-  users = import ../../config/users.nix;
-in
+
 {
   imports = [
-    ../../home/flavors/desktop/hyprland
-  ];
-
-  news.display = "silent";
+    ../../../home/modules/system/home-base.nix
 
-  home = {
-    username = users.default;
-    homeDirectory = "/home/${users.default}";
-    stateVersion = "26.05";
-  };
+    ../../../home/modules/desktop/hyprland
+    ../../../home/modules/configs/alacritty.nix
+    ../../../home/modules/configs/fish.nix
+  ];
 
   custom.hyprExtras = {
     monitors = ''

+ 28 - 0
hosts/nixstation/nixos/default.nix

@@ -0,0 +1,28 @@
+{ config, pkgs, lib, inputs, ... }:
+
+let 
+  hosts = import ../../../config/hosts.nix;
+in
+{
+  imports = [
+    ./hardware.nix
+
+    ../../../nixos/modules/system/nixos-base.nix
+    ../../../nixos/modules/system/users.nix
+
+    ../../../nixos/profiles/workstation
+    ../../../nixos/profiles/development
+    ../../../nixos/profiles/gaming
+    ../../../nixos/profiles/school
+
+    ../../../nixos/modules/hardware/gpu/nvidia.nix
+    ../../../nixos/modules/hardware/networking/bcm4360.nix
+    ../../../nixos/modules/hardware/sound
+    ../../../nixos/modules/hardware/bluetooth
+
+    ../../../nixos/modules/desktop/hyprland
+    ../../../nixos/modules/desktop/hyprland/greeter-default.nix
+  ];
+  
+  networking.hostName = hosts.nixstation.hostname;
+}

+ 0 - 0
hosts/nixstation/hardware.nix → hosts/nixstation/nixos/hardware.nix


+ 0 - 82
nixos/flavors/desktop/mango/default.nix

@@ -1,82 +0,0 @@
-{ config, pkgs, lib, inputs, ... }:
-
-{
-  imports = [
-    inputs.mango.nixosModules.mango
-  ];
-
-  environment.systemPackages = with pkgs; [
-    cliphist
-    wl-clipboard
-    hyprpicker
-    wtype
-
-    mission-center
-    nomacs
-    alacritty
-    vlc
-
-    kdePackages.kdenlive
-    kdePackages.ark
-    kdePackages.dolphin
-    kdePackages.qtsvg 
-    kdePackages.kio
-    kdePackages.kio-fuse
-    kdePackages.kio-extras
-    kdePackages.ksshaskpass
-  ];
-
-  programs.kdeconnect.enable = true;
-
-  environment.variables = {
-    GDK_BACKEND = "wayland";
-    XDG_SESSION_TYPE = "wayland";
-    WLR_DRM_NO_ATOMIC = "1";
-    NIXOS_OZONE_WL = "1";
-    WLR_RENDERER = "vulkan";
-    WLR_NO_HARDWARE_CURSORS = "1";
-    ELECTRON_OZONE_PLATFORM_HINT = "wayland";
-  };
-
-  xdg.portal = {
-    enable = true;
-    extraPortals = with pkgs; [
-      xdg-desktop-portal-gtk
-      xdg-desktop-portal-wlr
-    ];
-
-    wlr.enable = true;
-
-    config = {
-      common = {
-        "org.freedesktop.impl.portal.Screencast" = "mango";
-        "org.freedesktop.impl.portal.Screenshot" = "mango";
-      };
-    };
-  };
-
-  environment.sessionVariables = {
-    NIXOS_OZONE_WL = "1";
-    QT_QPA_PLATFORM = "wayland";
-    XDG_CURRENT_DESKTOP = "mango";
-    WLR_NO_HARDWARE_CURSORS = "1";
-  };
-
-  services.gnome.gnome-keyring.enable = true;
-  security.pam.services.login.enableGnomeKeyring = true;
-  security.pam.services.greetd.enableGnomeKeyring = true;
-
-  security.pam.services.login.enableKwallet = true;
-
-  systemd.user.services.gnome-keyring = {
-    wantedBy = [ "default.target" ];
-    serviceConfig = {
-      ExecStart = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --start --foreground --components=pkcs11,secrets,ssh";
-      Restart = "on-abort";
-    };
-  };
-
-  programs.mango = {
-    enable = true;
-  };
-}

+ 0 - 22
nixos/flavors/desktop/mango/greeter-default.nix

@@ -1,22 +0,0 @@
-{ config, pkgs, ... }:
-
-
-let
-  users = import ./../../../../config/users.nix;
-in
-{
-  environment.systemPackages = with pkgs; [
-    tuigreet
-  ];
-
-  security.pam.services.greetd.enableGnomeKeyring = true;
-  services.greetd = {
-    enable = true;
-    settings.default_session = {
-      command = ''
-        ${pkgs.tuigreet}/bin/tuigreet --time --cmd "mango"
-      '';
-      user = users.default;
-    };
-  };
-}

+ 0 - 0
nixos/flavors/desktop/hyprland/default.nix → nixos/modules/desktop/hyprland/default.nix


+ 0 - 0
nixos/flavors/desktop/hyprland/greeter-default.nix → nixos/modules/desktop/hyprland/greeter-default.nix


+ 0 - 0
nixos/flavors/desktop/sway/default.nix → nixos/modules/desktop/sway/default.nix


+ 0 - 0
nixos/flavors/desktop/sway/greeter-default.nix → nixos/modules/desktop/sway/greeter-default.nix


+ 0 - 0
nixos/hardware/biometric/elan-fingerprint.nix → nixos/modules/hardware/biometric/elan-fingerprint.nix


+ 0 - 0
nixos/hardware/bluetooth/default.nix → nixos/modules/hardware/bluetooth/default.nix


+ 0 - 0
nixos/hardware/gpu/nvidia-open.nix → nixos/modules/hardware/gpu/nvidia-open.nix


+ 0 - 0
nixos/hardware/gpu/nvidia.nix → nixos/modules/hardware/gpu/nvidia.nix


+ 0 - 0
nixos/hardware/networking/bcm4360.nix → nixos/modules/hardware/networking/bcm4360.nix


+ 0 - 0
nixos/hardware/networking/default.nix → nixos/modules/hardware/networking/default.nix


+ 0 - 0
nixos/hardware/sound/default.nix → nixos/modules/hardware/sound/default.nix


+ 0 - 0
nixos/features/system/iso-base.nix → nixos/modules/system/iso-base.nix


+ 12 - 0
nixos/modules/system/nixos-base.nix

@@ -0,0 +1,12 @@
+{ config, pkgs, lib, inputs, ... }:
+
+{
+  nixpkgs.config.allowUnfree = true;
+  hardware.enableAllFirmware = true;
+
+  nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+  system.stateVersion = "26.05";
+}

+ 0 - 0
nixos/features/system/users.nix → nixos/modules/system/users.nix


+ 0 - 0
nixos/flavors/application/development/default.nix → nixos/profiles/development/default.nix


+ 0 - 0
nixos/flavors/application/gaming/default.nix → nixos/profiles/gaming/default.nix


+ 0 - 0
nixos/flavors/application/school/default.nix → nixos/profiles/school/default.nix


+ 0 - 0
nixos/flavors/application/school/ntnu-vpn.nix → nixos/profiles/school/ntnu-vpn.nix


+ 0 - 0
nixos/flavors/application/school/smb4k.nix → nixos/profiles/school/smb4k.nix


+ 0 - 0
nixos/flavors/application/workstation/boot-splash.nix → nixos/profiles/workstation/boot-splash.nix


+ 0 - 0
nixos/flavors/application/workstation/default.nix → nixos/profiles/workstation/default.nix


+ 0 - 0
nixos/flavors/application/workstation/inputs.nix → nixos/profiles/workstation/inputs.nix