attempt modularilty

This commit is contained in:
ringofstorms 2024-03-31 19:39:48 -05:00
parent 3f7c2eccc2
commit 73f883e6a4
5 changed files with 156 additions and 12 deletions

View file

@ -10,7 +10,6 @@ in
imports =
[
# Include the results of the hardware scan.
# Note we need to be in the /etc/nixos directory with this entire config repo for this relative path to work
(/${settings.systemsDir}/${settings.system.hostname}/hardware-configuration.nix)
# home manager import
(import "${home-manager}/nixos")

View file

@ -0,0 +1,81 @@
{ config, lib, pkgs, settings, ... } @ args:
{
imports =
[
(settings.usersDir + "/root/configuration.nix")
(settings.usersDir + "/josh/configuration.nix")
];
# Use the systemd-boot EFI boot loader.
boot.loader = {
systemd-boot = {
enable = true;
consoleMode = "keep";
};
timeout = 5;
efi = {
canTouchEfiVariables = true;
};
};
# We want connectivity
networking.networkmanager.enable = true;
hardware.bluetooth.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.package = pkgs.pulseaudioFull;
hardware.enableAllFirmware = true;
# I want this globally even for root so doing it outside of home manager
services.xserver.xkbOptions = "caps:escape";
console = {
earlySetup = true;
packages = with pkgs; [ terminus_font ];
# We want to be able to read the screen so use a 32 sized font...
# font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
useXkbConfig = true; # use xkb.options in tty. (caps -> escape)
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
22 # sshd
];
# networking.firewall.allowedUDPPorts = [ ... ];
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
services.xserver.enable = true;
services.xserver.displayManager.gdm = {
enable = true;
autoSuspend = false;
};
services.xserver.desktopManager.gnome.enable = true;
services.gnome.core-utilities.enable = false;
# List packages installed in system profile. To search, run:
# $ nix search wget
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
# extras, more for my neovim setup TODO move these into a more isolated place for nvim setup? Should be its own flake probably
cargo
rustc
nodejs_21
python313
# ripgrep # now in common
nodePackages.cspell
];
# does for all shells. Can use `programs.zsh.shellAliases` for specific ones
environment.shellAliases = {
wifi = "nmtui";
};
}

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" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
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.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}