reduced kernel logs and formatted the files

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-19 14:51:46 +02:00
parent 839b7404cf
commit 3ba0464f5f
Signed by: semere
GPG key ID: 7FC937214DF30488
10 changed files with 186 additions and 94 deletions

View file

@ -12,38 +12,48 @@
}; };
}; };
outputs = { self, nixpkgs, home-manager, ... }: outputs =
let {
lib = nixpkgs.lib; self,
userVars = import ./vars.nix; nixpkgs,
home-manager,
...
}:
let
lib = nixpkgs.lib;
userVars = import ./vars.nix;
hostsDir = ./hosts; hostsDir = ./hosts;
hostNames = builtins.attrNames ( hostNames = builtins.attrNames (
lib.filterAttrs (name: type: type == "directory") (builtins.readDir hostsDir) lib.filterAttrs (name: type: type == "directory") (builtins.readDir hostsDir)
); );
nixosConfigurations = lib.genAttrs hostNames (name: nixosConfigurations = lib.genAttrs hostNames (
let name:
hostConfig = import (./hosts + "/${name}"); let
in hostConfig = import (./hosts + "/${name}");
lib.nixosSystem { in
system = hostConfig.system; lib.nixosSystem {
specialArgs = { inherit userVars; }; system = hostConfig.system;
modules = [ hostConfig.configModule ] ++ [ specialArgs = { inherit userVars; };
home-manager.nixosModules.home-manager modules = [
{ hostConfig.configModule
home-manager = { ]
useGlobalPkgs = true; ++ [
useUserPackages = true; home-manager.nixosModules.home-manager
extraSpecialArgs = { inherit userVars; }; {
backupFileExtension = "backup"; home-manager = {
}; useGlobalPkgs = true;
} useUserPackages = true;
]; extraSpecialArgs = { inherit userVars; };
} backupFileExtension = "backup";
); };
in }
{ ];
inherit nixosConfigurations; }
}; );
in
{
inherit nixosConfigurations;
};
} }

View file

@ -1,21 +1,28 @@
{ {
system = "x86_64-linux"; system = "x86_64-linux";
configModule = { config, lib, pkgs, ... }: { configModule =
imports = [ {
./hardware-configuration.nix config,
../../modules lib,
]; pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
../../modules
];
networking.hostName = "nabro"; networking.hostName = "nabro";
dotfiles = { dotfiles = {
core.enable = true; core.enable = true;
user.enable = true; user.enable = true;
desktop.enable = true; desktop.enable = true;
dev.enable = true; dev.enable = true;
shell.enable = true; shell.enable = true;
zsh.enable = true; zsh.enable = true;
helix.enable = true; helix.enable = true;
};
}; };
};
} }

View file

@ -1,14 +1,26 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -18,37 +30,41 @@
"resume_offset=2017177" "resume_offset=2017177"
]; ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/mapper/cryproot"; device = "/dev/mapper/cryproot";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" ]; options = [ "subvol=root" ];
}; };
boot.initrd.luks.devices."cryproot".device = "/dev/disk/by-uuid/e667143a-7965-4f53-bf2b-e91a3c9c4c13"; boot.initrd.luks.devices."cryproot".device =
"/dev/disk/by-uuid/e667143a-7965-4f53-bf2b-e91a3c9c4c13";
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/mapper/cryproot"; device = "/dev/mapper/cryproot";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" ]; options = [ "subvol=home" ];
}; };
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/mapper/cryproot"; device = "/dev/mapper/cryproot";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" ]; options = [ "subvol=nix" ];
}; };
fileSystems."/swap" = fileSystems."/swap" = {
{ device = "/dev/mapper/cryproot"; device = "/dev/mapper/cryproot";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=swap" ]; options = [ "subvol=swap" ];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/AB4A-C5EA"; device = "/dev/disk/by-uuid/AB4A-C5EA";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
}; "fmask=0022"
"dmask=0022"
];
};
swapDevices = [ swapDevices = [
{ {

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.dotfiles.core; cfg = config.dotfiles.core;
@ -12,6 +17,17 @@ in
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.consoleLogLevel = 0;
boot.initrd.verbose = false;
boot.kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@ -21,7 +37,10 @@ in
nix = { nix = {
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true; auto-optimise-store = true;
}; };
gc = { gc = {

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
imports = [ imports = [

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, userVars, ... }: {
config,
lib,
pkgs,
userVars,
...
}:
let let
cfg = config.dotfiles.desktop; cfg = config.dotfiles.desktop;
@ -28,13 +34,16 @@ in
]; ];
fonts.fontconfig.defaultFonts = { fonts.fontconfig.defaultFonts = {
monospace = [ "JetBrainsMono Nerd Font" "Noto Sans Mono" ]; monospace = [
"JetBrainsMono Nerd Font"
"Noto Sans Mono"
];
emoji = [ "Noto Color Emoji" ]; emoji = [ "Noto Color Emoji" ];
}; };
hardware.graphics.enable = true; hardware.graphics.enable = true;
security.polkit.enable = true; security.polkit.enable = true;
security.pam.services.swaylock = {}; security.pam.services.swaylock = { };
services.getty.autologinUser = "${userVars.username}"; services.getty.autologinUser = "${userVars.username}";
@ -87,8 +96,15 @@ in
lock = "${pkgs.swaylock-effects}/bin/swaylock -f"; lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
}; };
timeouts = [ timeouts = [
{ timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; } {
{ timeout = 600; command = "${pkgs.wlopm}/bin/wlopm --off '*'"; resumeCommand = "${pkgs.wlopm}/bin/wlopm --on '*'"; } timeout = 300;
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
}
{
timeout = 600;
command = "${pkgs.wlopm}/bin/wlopm --off '*'";
resumeCommand = "${pkgs.wlopm}/bin/wlopm --on '*'";
}
]; ];
}; };

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.dotfiles.dev; cfg = config.dotfiles.dev;

View file

@ -1,12 +1,18 @@
{ config, lib, pkgs, userVars, ... }: {
config,
lib,
pkgs,
userVars,
...
}:
let let
cfg = config.dotfiles.shell; cfg = config.dotfiles.shell;
shellDir = ./.; shellDir = ./.;
otherShellFiles = builtins.filter otherShellFiles = builtins.filter (
(name: name != "default.nix" && lib.strings.hasSuffix ".nix" name) name: name != "default.nix" && lib.strings.hasSuffix ".nix" name
(builtins.attrNames (builtins.readDir shellDir)); ) (builtins.attrNames (builtins.readDir shellDir));
importedModules = map (file: shellDir + "/${file}") otherShellFiles; importedModules = map (file: shellDir + "/${file}") otherShellFiles;
in in
{ {
@ -55,7 +61,6 @@ in
pinentry.package = pkgs.pinentry-qt; pinentry.package = pkgs.pinentry-qt;
}; };
}; };
}; };
} }

View file

@ -35,7 +35,10 @@ in
auto-info = true; auto-info = true;
rulers = [ 80 ]; rulers = [ 80 ];
bufferline = "multiple"; bufferline = "multiple";
shell = [ "zsh" "-c" ]; shell = [
"zsh"
"-c"
];
jump-label-alphabet = "asdfghjklqwertyuiopzxcvbnm"; jump-label-alphabet = "asdfghjklqwertyuiopzxcvbnm";
cursor-shape = { cursor-shape = {

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, userVars, ... }: {
config,
lib,
pkgs,
userVars,
...
}:
let let
cfg = config.dotfiles.user; cfg = config.dotfiles.user;