lilith-pad

This commit is contained in:
Spectre 2025-03-16 00:08:37 +01:00
parent 3d1a754d06
commit 7c51db8359
6 changed files with 55 additions and 32 deletions

View file

@ -56,21 +56,17 @@
} @ inputs: let
inherit (nixpkgs) lib;
systemFromHardwareConf =
hostname:
let
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
args = builtins.functionArgs hardware // { lib.mkDefault = lib.id; };
in
systemFromHardwareConf = hostname: let
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
args = builtins.functionArgs hardware // {lib.mkDefault = lib.id;};
in
(hardware args).nixpkgs.hostPlatform;
importNixpkgs = system: nixpkgs:
let
config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
in
import nixpkgs { inherit system config; };
importNixpkgs = system: nixpkgs: let
config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
in
import nixpkgs {inherit system config;};
makeHost = host: system:
lib.nixosSystem {
@ -83,14 +79,13 @@
./system
{networking.hostName = host;}
./home
./home
];
};
in {
nixosConfigurations = lib.pipe ./hosts [
builtins.readDir
(lib.filterAttrs (_: type: type == "directory"))
# (lib.filterAttrs (name: _: builtins.pathExists ./hosts/${name}/default.nix && builtins.pathExists ./hosts/${name}/hardware.nix && builtins.pathExists ./hosts/${name}/config.nix))
(builtins.mapAttrs (name: _: makeHost name (systemFromHardwareConf name)))
];
};

View file

@ -0,0 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/080fa116-424e-4079-a2a6-658a230e2721";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/40E8-A12D";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,3 +0,0 @@
{
system = "x86_64-linux";
}

View file

@ -1,22 +1,20 @@
{ config, lib, ...}: {
{lib, ...}: let
mkHostOverride = lib.mkOverride 75;
in {
system.stateVersion = "24.11";
desktop.enable = true;
gaming.enable = true;
nfs.client.enable = true;
auto_styling.enable = true;
home-manager.users."lilith".wayland.windowManager.hyprland.settings = {
input.kb_layout = lib.mkForce "us";
input.kb_layout = mkHostOverride "us";
monitor = lib.mkForce [
monitor = mkHostOverride [
"DP-3, 3840x2160, 0x0, 1.5"
"DP-4, 2560x1440, 2560x0, 1"
",preferred,auto,1"
];
};
}

View file

@ -1,4 +1,4 @@
{ zen-browser, ...}: {
{...}: {
imports = [
./audio.nix
./bluetooth.nix
@ -15,6 +15,5 @@
./syncthing.nix
./users.nix
./zsh.nix
zen-browser.nixosModules.zen-browser
];
}

View file

@ -1,4 +1,4 @@
{ lib, ...}: {
{...}: {
nix = {
gc = {
automatic = true;
@ -12,8 +12,4 @@
trusted-users = ["root" "@wheel"];
};
};
# nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (lib.getName pkg) [
# "steam"
# ]);
}