Working on reshuffling
This commit is contained in:
+77
-78
@@ -101,43 +101,22 @@ 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,88 +365,57 @@ 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 = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
|
||||||
** =generated/hosts/traveldroid/traveldroid.nix=
|
|
||||||
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html
|
|
||||||
{ inputs, config, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations."traveldroid" = inputs.nixpkgs.lib.nixosSystem {
|
# Define the NixOS configuration for this host
|
||||||
|
flake.nixosConfigurations.traveldroid =
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
] ++
|
] ++ importedModules ++ [
|
||||||
(builtins.attrValues config.flake.nixosModules) ++
|
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
({ ... }: {
|
# Host-specific settings
|
||||||
|
({ config, ... }: {
|
||||||
networking.hostName = "traveldroid";
|
networking.hostName = "traveldroid";
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
boot = {
|
boot.loader.grub = {
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
efi.canTouchEfiVariables = 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"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
|
# Optional: TPM/other features
|
||||||
# systemd.tpm2.enable = false;
|
# systemd.tpm2.enable = false;
|
||||||
|
|
||||||
# Enable various user-defined modules
|
# User-defined modules / system features
|
||||||
mySystem = {
|
mySystem = {
|
||||||
# Turn on the core system
|
|
||||||
system.core.enable = true;
|
system.core.enable = true;
|
||||||
|
|
||||||
# Hardware-specific modules
|
# Hardware toggles
|
||||||
hardware.nvidia.enable = false;
|
hardware.nvidia.enable = false;
|
||||||
|
|
||||||
# Define Environment
|
# Desktop environment modules
|
||||||
desktop = {
|
desktop = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
noctalia.enable = true;
|
noctalia.enable = true;
|
||||||
@@ -480,6 +428,57 @@ in lib.mkIf coreEnabled {
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
||||||
|
** =generated/hosts/traveldroid/traveldroid.nix=
|
||||||
|
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
# Optional: pass inputs to modules
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
]
|
||||||
|
++ builtins.attrValues (import-tree ./generated/modules)
|
||||||
|
++ [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# Host-specific hardware and system settings
|
||||||
|
({ config, lib, ... }: {
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
** =generated/hosts/traveldroid/hardware-configuration.nix=
|
** =generated/hosts/traveldroid/hardware-configuration.nix=
|
||||||
1. Boot into NixOS Live ISO or your installed system.
|
1. Boot into NixOS Live ISO or your installed system.
|
||||||
2. Open a terminal.
|
2. Open a terminal.
|
||||||
|
|||||||
+6
-27
@@ -29,43 +29,22 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraModulePackages = [ ];
|
boot.efi.canTouchEfiVariables = true;
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernelParams = [ "silent" ];
|
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
boot.kernelParams = [
|
||||||
plymouth.enable = true;
|
"systemd.mask=dev-tpm0.device"
|
||||||
supportedFilesystems = [ "ntfs" ];
|
"systemd.mask=dev-tpmrm0.device"
|
||||||
|
];
|
||||||
|
|
||||||
loader = {
|
# Optional: TPM/other features
|
||||||
systemd-boot.enable = true;
|
# systemd.tpm2.enable = false;
|
||||||
systemd-boot.configurationLimit = 10;
|
|
||||||
efi.canTouchEfiVariables = true;
|
# User-defined modules / system features
|
||||||
timeout = 5;
|
mySystem = {
|
||||||
|
system.core.enable = true;
|
||||||
|
|
||||||
|
# Hardware toggles
|
||||||
|
hardware.nvidia.enable = false;
|
||||||
|
|
||||||
|
# Desktop environment modules
|
||||||
|
desktop = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
noctalia.enable = true;
|
||||||
|
stylix.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|
||||||
|
# Optional: pass inputs to modules
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
]
|
||||||
] ++
|
++ builtins.attrValues (import-tree ./generated/modules)
|
||||||
(builtins.attrValues config.flake.nixosModules) ++
|
++ [
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
({ ... }: {
|
# Host-specific hardware and system settings
|
||||||
|
({ config, lib, ... }: {
|
||||||
networking.hostName = "traveldroid";
|
networking.hostName = "traveldroid";
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
boot = {
|
boot.loader.grub = {
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
};
|
};
|
||||||
|
boot.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
efi.canTouchEfiVariables = true;
|
boot.kernelParams = [
|
||||||
};
|
|
||||||
|
|
||||||
# initrd.systemd.tpm2.enable = false;
|
|
||||||
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;
|
# User-defined features
|
||||||
|
mySystem.system.core.enable = true;
|
||||||
|
|
||||||
# Enable various user-defined modules
|
# Desktop environment features
|
||||||
mySystem = {
|
desktop.hyprland.enable = true;
|
||||||
# Turn on the core system
|
desktop.noctalia.enable = true;
|
||||||
system.core.enable = true;
|
desktop.stylix.enable = true;
|
||||||
|
|
||||||
# Hardware-specific modules
|
# Hardware overrides (host-specific)
|
||||||
hardware.nvidia.enable = false;
|
hardware.nvidia.enable = false;
|
||||||
|
|
||||||
# Define Environment
|
|
||||||
desktop = {
|
|
||||||
hyprland.enable = true;
|
|
||||||
noctalia.enable = true;
|
|
||||||
stylix.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user