completely ripping off fufexan in hopes of fixing things

This commit is contained in:
cnst
2024-07-30 21:41:28 +02:00
parent d0cf745c41
commit 7e6787ff38
17 changed files with 549 additions and 249 deletions

View File

@@ -37,44 +37,19 @@ in {
imports = [
inputs.home-manager.nixosModules.home-manager
./imports.nix
./system.nix
./hardware-configuration.nix
./substituters.nix
];
home-manager.users.cnst = import ../../../home/users/cnst/home.nix;
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
environment.systemPackages = [pkgs.scx];
nix = {
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
warn-dirty = false;
experimental-features = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json";
# for direnv GC roots
keep-derivations = true;
keep-outputs = true;
trusted-users = ["root" "@wheel"];
};
};
# Bootloader
boot.loader = {
systemd-boot.enable = lib.mkForce false;
efi.canTouchEfiVariables = true;
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.kernelParams = [
"amd_pstate=active"
"quiet"
"splash"
];
environment.sessionVariables = {
FLAKE = "/home/cnst/.nix-config";

View File

@@ -9,28 +9,17 @@
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = ["amdgpu"];
};
kernelModules = ["kvm-amd"];
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
consoleLogLevel = 3;
kernelParams = [
"amd_pstate=active"
"quiet"
"splash"
];
extraModulePackages = [];
};
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";

View File

@@ -1,6 +1,8 @@
{
inputs,
outputs,
lib,
config,
...
}: {
programs = {
@@ -12,6 +14,27 @@
};
};
nix = {
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json";
# for direnv GC roots
keep-derivations = true;
keep-outputs = true;
trusted-users = ["root" "@wheel"];
};
};
security = {
rtkit.enable = true;
pam.services.hyprlock = {};
@@ -20,13 +43,7 @@
environment.localBinInPath = true;
console.useXkbConfig = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs;
};
};
nixpkgs = {
overlays = [
(_: prev: {

74
nixos/hosts/default.nix Normal file
View File

@@ -0,0 +1,74 @@
{
self,
inputs,
homeImports,
...
}: {
flake.nixosConfigurations = let
# shorten paths
inherit (inputs.nixpkgs.lib) nixosSystem;
mod = "${self}/nixos";
# get the basic config to build on top of
inherit (import "${self}/nixos") desktop laptop;
# get these into the module system
specialArgs = {inherit inputs self;};
in {
cnix = nixosSystem {
inherit specialArgs;
modules =
desktop
++ [
./cnix
"${mod}/core/lanzaboote.nix"
"${mod}/core/network/cnix.nix"
"${mod}/hardware/cnix.nix"
"${mod}/services/blueman"
"${mod}/services/xserver/cnix.nix"
"${mod}/extra/gaming.nix"
"${mod}/extra/android"
"${mod}/extra/workstation"
{
home-manager = {
users.cnst.imports = homeImports."cnst@cnix";
extraSpecialArgs = specialArgs;
};
}
# inputs.agenix.nixosModules.default
inputs.chaotic.nixosModules.default
];
};
# rog = nixosSystem {
# inherit specialArgs;
# modules =
# laptop
# ++ [
# ./rog
# "${mod}/core/lanzaboote.nix"
# "${mod}/programs/gamemode.nix"
# "${mod}/programs/hyprland.nix"
# "${mod}/programs/games.nix"
# "${mod}/services/kanata"
# {home-manager.users.mihai.imports = homeImports."mihai@rog";}
# ];
# };
# kiiro = nixosSystem {
# inherit specialArgs;
# modules =
# desktop
# ++ [
# ./kiiro
# {home-manager.users.mihai.imports = homeImports.server;}
# ];
# };
};
}