Compare commits

...

4 Commits

Author SHA1 Message Date
henrov f13ddf453f regenerated nixes 2026-03-06 23:27:43 +01:00
henrov 86bc5cc20f Copy-error 2026-03-06 23:27:11 +01:00
henrov f07e34f39c Renewed flake.nix 2026-03-06 23:25:37 +01:00
henrov f341ab27c6 Added boot.nix 2026-03-06 23:23:15 +01:00
4 changed files with 501 additions and 348 deletions
+364 -296
View File
File diff suppressed because it is too large Load Diff
+71 -10
View File
@@ -365,22 +365,37 @@ The Nix flake definition for Droidnix.
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = inputs@{ nixpkgs, home-manager, emacs-overlay, catppuccin, zen-browser, hyprland, ... }: outputs =
inputs@{
nixpkgs,
home-manager,
emacs-overlay,
catppuccin,
zen-browser,
hyprland,
...
}:
let let
lib = nixpkgs.lib; lib = nixpkgs.lib;
system = lib.system.system; system = "x86_64-linux"; # Define the system explicitly
user = import ./assets/flake/users/henrov.nix; user = import ./assets/flake/users/henrov.nix;
machines = ["traveldroid" "maindroid"]; machines = [
"traveldroid"
"maindroid"
];
in in
{ {
nixosConfigurations = lib.genAttrs machines (machine: lib.nixosSystem { nixosConfigurations = lib.genAttrs machines (
machine:
lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
# Import machine-specific configurations # Import machine-specific configurations
./assets/flake/machines/${machine}/top.nix ./assets/flake/machines/${machine}/top.nix
# Home Manager and theme modules # Home Manager and theme modules
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user inputs; }; home-manager.extraSpecialArgs = { inherit user inputs; };
@@ -388,14 +403,14 @@ The Nix flake definition for Droidnix.
inputs.catppuccin.nixosModules.catppuccin inputs.catppuccin.nixosModules.catppuccin
]; ];
specialArgs = { inherit user inputs; }; specialArgs = { inherit user inputs; };
}); }
);
devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix {
inherit (nixpkgs) mkShell; inherit (nixpkgs) mkShell;
}; };
}; };
} }
#+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
@@ -426,16 +441,62 @@ mkShell {
** =assets/flake/machines/traveldroid/top.nix= ** =assets/flake/machines/traveldroid/top.nix=
This code defines the machine to build. Just search and replace traveldroid to provision another machine. This code defines the machine to build. Just search and replace traveldroid to provision another machine.
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/top.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/top.nix :noweb tangle :mkdirp yes :eval never-html
{ config, pkgs, lib, user, inputs, ... }: {
config,
pkgs,
lib,
user,
inputs,
...
}:
{ {
# Import all other configurations # Import all other configurations
imports = [ imports = [
./boot.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
options = {
wm = lib.mkOption {
type = lib.types.str;
default = "hyprland";
description = "Type of window manager to use";
};
};
config = {
# Minimal settings that must be defined here # Minimal settings that must be defined here
networking.hostName = "traveldroid"; networking.hostName = "traveldroid";
wm.type = "hyprland"; # Define the window manager type here, mangowc will be made possible in the nerar future. wm.type = "hyprland"; # Define the window manager type here, mangowc will be made possible in the near future.
# In generated/top.nix the chpice fopr a window manager will be effectuated };
}
#+END_SRC
** =assets/flake/machines/traveldroid/boot.nix=
This file has most of the settings the control how the computer boots up.
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html
{ pkgs, ... } :
{
boot = {
initrd = {
verbose = false; # its a lot of logs. dont need it, unless we do.
kernelModules = [ ]; # no kernel modules on boot
};
extraModulePackages = [ ]; # no extra packages on boot either
kernelPackages = pkgs.linuxPackages_latest; # latest greatest linux kernel
kernelParams = [ "silent" ]; # quiet those logs
consoleLogLevel = 0; # quiten more logs
plymouth.enable = true; # graphical boot animation instead
supportedFilesystems = [ "ntfs" ]; # should see the ntfs (windows)
loader = {
systemd-boot.enable = true; # systemd-boot
systemd-boot.configurationLimit = 10;
efi.canTouchEfiVariables = true; # allow editing efi to edit the boot loader
timeout = 5; # grub timeout to make a selection
};
};
} }
#+END_SRC #+END_SRC
@@ -0,0 +1,25 @@
{ pkgs, ... } :
{
boot = {
initrd = {
verbose = false; # its a lot of logs. dont need it, unless we do.
kernelModules = [ ]; # no kernel modules on boot
};
extraModulePackages = [ ]; # no extra packages on boot either
kernelPackages = pkgs.linuxPackages_latest; # latest greatest linux kernel
kernelParams = [ "silent" ]; # quiet those logs
consoleLogLevel = 0; # quiten more logs
plymouth.enable = true; # graphical boot animation instead
supportedFilesystems = [ "ntfs" ]; # should see the ntfs (windows)
loader = {
systemd-boot.enable = true; # systemd-boot
systemd-boot.configurationLimit = 10;
efi.canTouchEfiVariables = true; # allow editing efi to edit the boot loader
timeout = 5; # grub timeout to make a selection
};
};
}
@@ -9,9 +9,9 @@
{ {
# Import all other configurations # Import all other configurations
imports = [ imports = [
./boot.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
options = { options = {
wm = lib.mkOption { wm = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@@ -19,7 +19,6 @@
description = "Type of window manager to use"; description = "Type of window manager to use";
}; };
}; };
config = { config = {
# Minimal settings that must be defined here # Minimal settings that must be defined here
networking.hostName = "traveldroid"; networking.hostName = "traveldroid";