Reshuffling stuff
This commit is contained in:
+54
-17
@@ -72,39 +72,76 @@ The Nix flake definition for Droidnix.
|
|||||||
#+BEGIN_SRC nix :tangle flake.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle flake.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{
|
{
|
||||||
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
|
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
import-tree.url = "github:vic/import-tree";
|
import-tree.url = "github:vic/import-tree";
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
url = "github:nix-community/stylix";
|
url = "github:nix-community/stylix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
emacs-overlay = {
|
emacs-overlay = {
|
||||||
url = "github:nix-community/emacs-overlay";
|
url = "github:nix-community/emacs-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
url = "github:youwen5/zen-browser-flake";
|
url = "github:youwen5/zen-browser-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{flake-parts, self, nixpkgs,home-manager, emacs-overlay, zen-browser, hyprland, stylix, import-tree,...}:
|
outputs = inputs@{
|
||||||
flake-parts.lib.mkFlake { inherit inputs; }
|
flake-parts,
|
||||||
{
|
self,
|
||||||
# flake-parts requires you to define systems
|
nixpkgs,
|
||||||
systems = [ "x86_64-linux" ];
|
home-manager,
|
||||||
imports = [
|
emacs-overlay,
|
||||||
(import-tree ./generated/modules) # Auto-loads your modules
|
zen-browser,
|
||||||
./generated/hosts/traveldroid/traveldroid.nix # Explicitly load grouped host
|
hyprland,
|
||||||
];
|
stylix,
|
||||||
|
import-tree,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
|
||||||
|
# Declare supported systems for flake-parts
|
||||||
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
|
# Import dendritic/flake modules here
|
||||||
|
imports = [
|
||||||
|
(import-tree ./generated/modules) # Only mySystem.* stuff
|
||||||
|
];
|
||||||
|
|
||||||
|
# Define NixOS configurations for hosts
|
||||||
|
flake = {
|
||||||
|
nixosConfigurations.traveldroid =
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
# Host-specific configuration (NixOS context)
|
||||||
|
./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
|
||||||
|
# Boot configuration (NixOS context)
|
||||||
|
./generated/hosts/traveldroid/boot.nix
|
||||||
|
|
||||||
|
# Stylix NixOS module
|
||||||
|
stylix.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@@ -339,8 +376,8 @@ in
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =generated/modules/system/boot.nix=
|
** =generated/hosts/traveldroid/boot.nix=
|
||||||
#+BEGIN_SRC nix :tangle generated/modules/system/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, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
|||||||
+52
-15
@@ -1,36 +1,73 @@
|
|||||||
{
|
{
|
||||||
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
|
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
import-tree.url = "github:vic/import-tree";
|
import-tree.url = "github:vic/import-tree";
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
url = "github:nix-community/stylix";
|
url = "github:nix-community/stylix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
emacs-overlay = {
|
emacs-overlay = {
|
||||||
url = "github:nix-community/emacs-overlay";
|
url = "github:nix-community/emacs-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
url = "github:youwen5/zen-browser-flake";
|
url = "github:youwen5/zen-browser-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{flake-parts, self, nixpkgs,home-manager, emacs-overlay, zen-browser, hyprland, stylix, import-tree,...}:
|
outputs = inputs@{
|
||||||
flake-parts.lib.mkFlake { inherit inputs; }
|
flake-parts,
|
||||||
{
|
self,
|
||||||
# flake-parts requires you to define systems
|
nixpkgs,
|
||||||
systems = [ "x86_64-linux" ];
|
home-manager,
|
||||||
imports = [
|
emacs-overlay,
|
||||||
(import-tree ./generated/modules) # Auto-loads your modules
|
zen-browser,
|
||||||
./generated/hosts/traveldroid/traveldroid.nix # Explicitly load grouped host
|
hyprland,
|
||||||
];
|
stylix,
|
||||||
|
import-tree,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
|
||||||
|
# Declare supported systems for flake-parts
|
||||||
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
|
# Import dendritic/flake modules here
|
||||||
|
imports = [
|
||||||
|
(import-tree ./generated/modules) # Only mySystem.* stuff
|
||||||
|
];
|
||||||
|
|
||||||
|
# Define NixOS configurations for hosts
|
||||||
|
flake = {
|
||||||
|
nixosConfigurations.traveldroid =
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
# Host-specific configuration (NixOS context)
|
||||||
|
./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
|
||||||
|
# Boot configuration (NixOS context)
|
||||||
|
./generated/hosts/traveldroid/boot.nix
|
||||||
|
|
||||||
|
# Stylix NixOS module
|
||||||
|
stylix.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# ./generated/hosts/traveldroid/traveldroid.nix
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
coreEnabled = config.mySystem.system.core.enable or false;
|
||||||
|
in lib.mkIf coreEnabled {
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user