lilith-pad
This commit is contained in:
parent
3d1a754d06
commit
7c51db8359
6 changed files with 55 additions and 32 deletions
25
flake.nix
25
flake.nix
|
|
@ -56,21 +56,17 @@
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
systemFromHardwareConf =
|
systemFromHardwareConf = hostname: let
|
||||||
hostname:
|
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
|
||||||
let
|
args = builtins.functionArgs hardware // {lib.mkDefault = lib.id;};
|
||||||
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
|
in
|
||||||
args = builtins.functionArgs hardware // { lib.mkDefault = lib.id; };
|
|
||||||
in
|
|
||||||
(hardware args).nixpkgs.hostPlatform;
|
(hardware args).nixpkgs.hostPlatform;
|
||||||
|
|
||||||
importNixpkgs = system: nixpkgs:
|
importNixpkgs = system: nixpkgs: let
|
||||||
let
|
config.allowUnfreePredicate = pkg:
|
||||||
config.allowUnfreePredicate =
|
builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
|
||||||
pkg:
|
in
|
||||||
builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
|
import nixpkgs {inherit system config;};
|
||||||
in
|
|
||||||
import nixpkgs { inherit system config; };
|
|
||||||
|
|
||||||
makeHost = host: system:
|
makeHost = host: system:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
|
|
@ -83,14 +79,13 @@
|
||||||
./system
|
./system
|
||||||
{networking.hostName = host;}
|
{networking.hostName = host;}
|
||||||
|
|
||||||
./home
|
./home
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = lib.pipe ./hosts [
|
nixosConfigurations = lib.pipe ./hosts [
|
||||||
builtins.readDir
|
builtins.readDir
|
||||||
(lib.filterAttrs (_: type: type == "directory"))
|
(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)))
|
(builtins.mapAttrs (name: _: makeHost name (systemFromHardwareConf name)))
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
38
hosts/lilith-pad/hardware-configuration.nix
Normal file
38
hosts/lilith-pad/hardware-configuration.nix
Normal 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;
|
||||||
|
}
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
system = "x86_64-linux";
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +1,20 @@
|
||||||
{ config, lib, ...}: {
|
{lib, ...}: let
|
||||||
|
mkHostOverride = lib.mkOverride 75;
|
||||||
|
in {
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
nfs.client.enable = true;
|
nfs.client.enable = true;
|
||||||
auto_styling.enable = true;
|
auto_styling.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
home-manager.users."lilith".wayland.windowManager.hyprland.settings = {
|
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-3, 3840x2160, 0x0, 1.5"
|
||||||
"DP-4, 2560x1440, 2560x0, 1"
|
"DP-4, 2560x1440, 2560x0, 1"
|
||||||
",preferred,auto,1"
|
",preferred,auto,1"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ zen-browser, ...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./audio.nix
|
./audio.nix
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
|
|
@ -15,6 +15,5 @@
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
zen-browser.nixosModules.zen-browser
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ...}: {
|
{...}: {
|
||||||
nix = {
|
nix = {
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
@ -12,8 +12,4 @@
|
||||||
trusted-users = ["root" "@wheel"];
|
trusted-users = ["root" "@wheel"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (lib.getName pkg) [
|
|
||||||
# "steam"
|
|
||||||
# ]);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue