ezConfigs for smolboi
This commit is contained in:
parent
5dd5cc0c06
commit
0e0076c14c
4 changed files with 112 additions and 149 deletions
28
flake.nix
28
flake.nix
|
@ -93,34 +93,6 @@
|
|||
}
|
||||
);
|
||||
};
|
||||
nixosConfigurations = {
|
||||
smolboi = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-unstable = inputs.nixunstable.legacyPackages.x86_64-linux;
|
||||
};
|
||||
modules = [
|
||||
./systems/smolboi/configuration.nix
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-pc
|
||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||
inputs.nixos-hardware.nixosModules.gigabyte-b550
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = {
|
||||
pkgs-unstable = inputs.nixunstable.legacyPackages.x86_64-linux;
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.cdombroski = import ./systems/smolboi/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
|
|
|
@ -1,18 +1,45 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
ezModules,
|
||||
inputs,
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs-unstable = import inputs.nixunstable { inherit (pkgs.stdenv) system; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../nixos-modules
|
||||
../../nixos-modules/aarch64-emu.nix
|
||||
../../nixos-modules/smartd.nix
|
||||
../../nixos-modules/plymouth.nix
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-pc
|
||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||
inputs.nixos-hardware.nixosModules.gigabyte-b550
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit pkgs-unstable;
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.cdombroski = import ../configs/home.nix;
|
||||
}
|
||||
ezModules.aarch64-emu
|
||||
ezModules.smartd
|
||||
ezModules.plymouth
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
binfmt.registrations.appimage = {
|
||||
wrapInterpreterInShell = false;
|
||||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||
|
@ -22,22 +49,32 @@
|
|||
magicOrExtension = "\\x7fELF....AI\\x02";
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "smolboi"; # Define your hostname.
|
||||
networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
firewall.allowedTCPPorts = [ 22000 ];
|
||||
useDHCP = lib.mkDefault true;
|
||||
};
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"nix-2.16.2"
|
||||
];
|
||||
packageOverrides = pkgs: {
|
||||
steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ winetricks ]; };
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||
packageOverrides = pkgs: {
|
||||
steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ winetricks ]; };
|
||||
};
|
||||
};
|
||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
};
|
||||
|
||||
services = {
|
||||
|
@ -168,31 +205,64 @@
|
|||
};
|
||||
|
||||
fileSystems = {
|
||||
"/persist".options = [
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
"/nix".options = [
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"noatime"
|
||||
"defaults"
|
||||
];
|
||||
"/steam-library".options = [
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
"/home".options = [
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
"/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"size=2g"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
"/persist" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
neededForBoot = true;
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@nixos/root"
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@nixos/nix"
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"noatime"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
"/steam-library" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/8597952f-be42-4361-9be1-2c4af6ede9b8";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@home"
|
||||
"compress=lzo"
|
||||
"autodefrag"
|
||||
"discard=async"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/1ADE-808D";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
stylix = {
|
|
@ -1,79 +0,0 @@
|
|||
# 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 = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"size=2g"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/persist" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
neededForBoot = true;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nixos/root" ];
|
||||
};
|
||||
|
||||
fileSystems."/steam-library" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@steam-library" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/1ADE-808D";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/8597952f-be42-4361-9be1-2c4af6ede9b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/d0eb1b09-7fba-49e3-b802-d6fdd9073516";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nixos/nix" ];
|
||||
};
|
||||
|
||||
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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in a new issue