Working on reshuffling
This commit is contained in:
+107
-108
@@ -101,45 +101,24 @@ The Nix flake definition for Droidnix.
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{
|
outputs = inputs@{ flake-parts, nixpkgs, home-manager, stylix, ... }:
|
||||||
flake-parts,
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
emacs-overlay,
|
|
||||||
zen-browser,
|
|
||||||
hyprland,
|
|
||||||
stylix,
|
|
||||||
import-tree,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
|
||||||
# Declare supported systems for flake-parts
|
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
# Import dendritic/flake modules here
|
|
||||||
imports = [
|
|
||||||
(import-tree ./generated/modules) # Only mySystem.* stuff
|
|
||||||
];
|
|
||||||
|
|
||||||
# Define NixOS configurations for hosts
|
|
||||||
flake = {
|
flake = {
|
||||||
nixosConfigurations.traveldroid =
|
nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem {
|
||||||
nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
# Host-specific configuration (NixOS context)
|
# Host module imports all reusable modules internally
|
||||||
./generated/hosts/traveldroid/traveldroid.nix
|
./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
|
||||||
# Boot configuration (NixOS context)
|
# Optional host-specific things
|
||||||
./generated/hosts/traveldroid/boot.nix
|
./generated/hosts/traveldroid/boot.nix
|
||||||
|
./generated/hosts/traveldroid/hardware-configuration.nix
|
||||||
# Stylix NixOS module
|
];
|
||||||
stylix.nixosModules.default
|
};
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -386,97 +365,117 @@ in
|
|||||||
** =generated/hosts/traveldroid/boot.nix=
|
** =generated/hosts/traveldroid/boot.nix=
|
||||||
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
# ./generated/hosts/traveldroid/traveldroid.nix
|
# ./generated/hosts/traveldroid/traveldroid.nix
|
||||||
{ config, pkgs, lib, ... }:
|
# ./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
coreEnabled = config.mySystem.system.core.enable or false;
|
# Import all reusable modules under ./generated/modules
|
||||||
in lib.mkIf coreEnabled {
|
modulesDir = ../../modules; # adjust path relative to this host file
|
||||||
boot = {
|
importedModules = builtins.attrValues (import modulesDir { inherit inputs; });
|
||||||
initrd = {
|
in
|
||||||
verbose = false;
|
{
|
||||||
kernelModules = [ ];
|
# Define the NixOS configuration for this host
|
||||||
|
flake.nixosConfigurations.traveldroid =
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
] ++ importedModules ++ [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# Host-specific settings
|
||||||
|
({ config, ... }: {
|
||||||
|
networking.hostName = "traveldroid";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"systemd.mask=dev-tpm0.device"
|
||||||
|
"systemd.mask=dev-tpmrm0.device"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Optional: TPM/other features
|
||||||
|
# systemd.tpm2.enable = false;
|
||||||
|
|
||||||
|
# User-defined modules / system features
|
||||||
|
mySystem = {
|
||||||
|
system.core.enable = true;
|
||||||
|
|
||||||
|
# Hardware toggles
|
||||||
|
hardware.nvidia.enable = false;
|
||||||
|
|
||||||
|
# Desktop environment modules
|
||||||
|
desktop = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
noctalia.enable = true;
|
||||||
|
stylix.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraModulePackages = [ ];
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernelParams = [ "silent" ];
|
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
plymouth.enable = true;
|
|
||||||
supportedFilesystems = [ "ntfs" ];
|
|
||||||
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
systemd-boot.configurationLimit = 10;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
timeout = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
||||||
** =generated/hosts/traveldroid/traveldroid.nix=
|
** =generated/hosts/traveldroid/traveldroid.nix=
|
||||||
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ inputs, config, ... }:
|
{ inputs, ... }:
|
||||||
|
|
||||||
{
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
flake.nixosConfigurations."traveldroid" = inputs.nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
|
|
||||||
modules =
|
# Optional: pass inputs to modules
|
||||||
[
|
specialArgs = { inherit inputs; };
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
] ++
|
|
||||||
(builtins.attrValues config.flake.nixosModules) ++
|
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
({ ... }: {
|
modules = [
|
||||||
networking.hostName = "traveldroid";
|
inputs.home-manager.nixosModules.home-manager
|
||||||
system.stateVersion = "25.11";
|
]
|
||||||
|
++ builtins.attrValues (import-tree ./generated/modules)
|
||||||
|
++ [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
boot = {
|
# Host-specific hardware and system settings
|
||||||
loader = {
|
({ config, lib, ... }: {
|
||||||
grub = {
|
networking.hostName = "traveldroid";
|
||||||
enable = true;
|
system.stateVersion = "25.11";
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
efi.canTouchEfiVariables = true;
|
boot.loader.grub = {
|
||||||
};
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
boot.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# initrd.systemd.tpm2.enable = false;
|
boot.kernelParams = [
|
||||||
kernelParams = [
|
"systemd.mask=dev-tpm0.device"
|
||||||
"systemd.mask=dev-tpm0.device"
|
"systemd.mask=dev-tpmrm0.device"
|
||||||
"systemd.mask=dev-tpmrm0.device"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# systemd.tpm2.enable = false;
|
|
||||||
|
|
||||||
# Enable various user-defined modules
|
|
||||||
mySystem = {
|
|
||||||
# Turn on the core system
|
|
||||||
system.core.enable = true;
|
|
||||||
|
|
||||||
# Hardware-specific modules
|
|
||||||
hardware.nvidia.enable = false;
|
|
||||||
|
|
||||||
# Define Environment
|
|
||||||
desktop = {
|
|
||||||
hyprland.enable = true;
|
|
||||||
noctalia.enable = true;
|
|
||||||
stylix.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
# User-defined features
|
||||||
|
mySystem.system.core.enable = true;
|
||||||
|
|
||||||
|
# Desktop environment features
|
||||||
|
desktop.hyprland.enable = true;
|
||||||
|
desktop.noctalia.enable = true;
|
||||||
|
desktop.stylix.enable = true;
|
||||||
|
|
||||||
|
# Hardware overrides (host-specific)
|
||||||
|
hardware.nvidia.enable = false;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|||||||
+12
-33
@@ -29,45 +29,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{
|
outputs = inputs@{ flake-parts, nixpkgs, home-manager, stylix, ... }:
|
||||||
flake-parts,
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
emacs-overlay,
|
|
||||||
zen-browser,
|
|
||||||
hyprland,
|
|
||||||
stylix,
|
|
||||||
import-tree,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
|
||||||
# Declare supported systems for flake-parts
|
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
# Import dendritic/flake modules here
|
|
||||||
imports = [
|
|
||||||
(import-tree ./generated/modules) # Only mySystem.* stuff
|
|
||||||
];
|
|
||||||
|
|
||||||
# Define NixOS configurations for hosts
|
|
||||||
flake = {
|
flake = {
|
||||||
nixosConfigurations.traveldroid =
|
nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem {
|
||||||
nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
# Host-specific configuration (NixOS context)
|
# Host module imports all reusable modules internally
|
||||||
./generated/hosts/traveldroid/traveldroid.nix
|
./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
|
||||||
# Boot configuration (NixOS context)
|
# Optional host-specific things
|
||||||
./generated/hosts/traveldroid/boot.nix
|
./generated/hosts/traveldroid/boot.nix
|
||||||
|
./generated/hosts/traveldroid/hardware-configuration.nix
|
||||||
# Stylix NixOS module
|
];
|
||||||
stylix.nixosModules.default
|
};
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,62 @@
|
|||||||
# ./generated/hosts/traveldroid/traveldroid.nix
|
# ./generated/hosts/traveldroid/traveldroid.nix
|
||||||
{ config, pkgs, lib, ... }:
|
# ./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
coreEnabled = config.mySystem.system.core.enable or false;
|
# Import all reusable modules under ./generated/modules
|
||||||
in lib.mkIf coreEnabled {
|
modulesDir = ../../modules; # adjust path relative to this host file
|
||||||
boot = {
|
importedModules = builtins.attrValues (import modulesDir { inherit inputs; });
|
||||||
initrd = {
|
in
|
||||||
verbose = false;
|
{
|
||||||
kernelModules = [ ];
|
# Define the NixOS configuration for this host
|
||||||
|
flake.nixosConfigurations.traveldroid =
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
] ++ importedModules ++ [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# Host-specific settings
|
||||||
|
({ config, ... }: {
|
||||||
|
networking.hostName = "traveldroid";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"systemd.mask=dev-tpm0.device"
|
||||||
|
"systemd.mask=dev-tpmrm0.device"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Optional: TPM/other features
|
||||||
|
# systemd.tpm2.enable = false;
|
||||||
|
|
||||||
|
# User-defined modules / system features
|
||||||
|
mySystem = {
|
||||||
|
system.core.enable = true;
|
||||||
|
|
||||||
|
# Hardware toggles
|
||||||
|
hardware.nvidia.enable = false;
|
||||||
|
|
||||||
|
# Desktop environment modules
|
||||||
|
desktop = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
noctalia.enable = true;
|
||||||
|
stylix.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraModulePackages = [ ];
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernelParams = [ "silent" ];
|
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
plymouth.enable = true;
|
|
||||||
supportedFilesystems = [ "ntfs" ];
|
|
||||||
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
systemd-boot.configurationLimit = 10;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
timeout = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,46 @@
|
|||||||
{ inputs, config, ... }:
|
{ inputs, ... }:
|
||||||
|
|
||||||
{
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
flake.nixosConfigurations."traveldroid" = inputs.nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
|
|
||||||
modules =
|
# Optional: pass inputs to modules
|
||||||
[
|
specialArgs = { inherit inputs; };
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
] ++
|
|
||||||
(builtins.attrValues config.flake.nixosModules) ++
|
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
({ ... }: {
|
modules = [
|
||||||
networking.hostName = "traveldroid";
|
inputs.home-manager.nixosModules.home-manager
|
||||||
system.stateVersion = "25.11";
|
]
|
||||||
|
++ builtins.attrValues (import-tree ./generated/modules)
|
||||||
|
++ [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
boot = {
|
# Host-specific hardware and system settings
|
||||||
loader = {
|
({ config, lib, ... }: {
|
||||||
grub = {
|
networking.hostName = "traveldroid";
|
||||||
enable = true;
|
system.stateVersion = "25.11";
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
efi.canTouchEfiVariables = true;
|
boot.loader.grub = {
|
||||||
};
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
boot.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# initrd.systemd.tpm2.enable = false;
|
boot.kernelParams = [
|
||||||
kernelParams = [
|
"systemd.mask=dev-tpm0.device"
|
||||||
"systemd.mask=dev-tpm0.device"
|
"systemd.mask=dev-tpmrm0.device"
|
||||||
"systemd.mask=dev-tpmrm0.device"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# systemd.tpm2.enable = false;
|
|
||||||
|
|
||||||
# Enable various user-defined modules
|
|
||||||
mySystem = {
|
|
||||||
# Turn on the core system
|
|
||||||
system.core.enable = true;
|
|
||||||
|
|
||||||
# Hardware-specific modules
|
|
||||||
hardware.nvidia.enable = false;
|
|
||||||
|
|
||||||
# Define Environment
|
|
||||||
desktop = {
|
|
||||||
hyprland.enable = true;
|
|
||||||
noctalia.enable = true;
|
|
||||||
stylix.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
# User-defined features
|
||||||
|
mySystem.system.core.enable = true;
|
||||||
|
|
||||||
|
# Desktop environment features
|
||||||
|
desktop.hyprland.enable = true;
|
||||||
|
desktop.noctalia.enable = true;
|
||||||
|
desktop.stylix.enable = true;
|
||||||
|
|
||||||
|
# Hardware overrides (host-specific)
|
||||||
|
hardware.nvidia.enable = false;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user