Work on modularizing nix config
This commit is contained in:
parent
437ea5ce33
commit
4f0185bc89
12
env/laptop/hardware.nix
vendored
12
env/laptop/hardware.nix
vendored
|
@ -8,12 +8,10 @@
|
|||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "resume=/swapfile" "resume_offset=874496" ];
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
|
||||
|
@ -25,13 +23,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
priority = 0;
|
||||
size = 16000;
|
||||
}
|
||||
];
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
|
96
env/nix/machines/third.nix
vendored
Normal file
96
env/nix/machines/third.nix
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../profiles/laptop.nix
|
||||
../modules/systemd-boot-efi.nix
|
||||
../modules/intel.nix
|
||||
];
|
||||
|
||||
networking.hostName "third.lyte.dev";
|
||||
|
||||
fonts.fonts = with pkgs; [ iosevka ];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
};
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
# extraConfig = "
|
||||
# load-module module-switch-on-connect
|
||||
# ";
|
||||
};
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
mtr.enable = true;
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "curses";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
users.users.daniel = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
shell = pkgs.fish;
|
||||
home = "/home/daniel/.home";
|
||||
packages = with pkgs; [
|
||||
steam
|
||||
pulsemixer
|
||||
file
|
||||
appimage-run
|
||||
kitty
|
||||
sway waybar mako wl-clipboard
|
||||
firefox-devedition-bin
|
||||
fzf
|
||||
fortune
|
||||
dmenu
|
||||
ranger
|
||||
pass
|
||||
brightnessctl
|
||||
vulkan-tools # TODO: vulkan?
|
||||
rustup
|
||||
clang
|
||||
pavucontrol
|
||||
pamixer
|
||||
strongswan
|
||||
gnumake
|
||||
elixir
|
||||
docker docker-compose
|
||||
postgresql
|
||||
htop
|
||||
google-cloud-sdk
|
||||
slurp grim
|
||||
unzip
|
||||
automake
|
||||
autoconf
|
||||
ncurses
|
||||
];
|
||||
};
|
||||
}
|
10
env/nix/modules/intel.nix
vendored
Normal file
10
env/nix/modules/intel.nix
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
};
|
||||
}
|
5
env/nix/modules/network-manager.nix
vendored
Normal file
5
env/nix/modules/network-manager.nix
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networkmanager.enable = true;
|
||||
}
|
10
env/nix/modules/systemd-boot-efi.nix
vendored
Normal file
10
env/nix/modules/systemd-boot-efi.nix
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
4
env/nix/personal-machine.nix
vendored
4
env/nix/personal-machine.nix
vendored
|
@ -122,6 +122,10 @@
|
|||
htop
|
||||
google-cloud-sdk
|
||||
slurp grim
|
||||
unzip
|
||||
automake
|
||||
autoconf
|
||||
ncurses
|
||||
];
|
||||
};
|
||||
|
||||
|
|
27
env/nix/profiles/base.nix
vendored
Normal file
27
env/nix/profiles/base.nix
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console.keyMap = "us";
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
fish bash
|
||||
tmux
|
||||
neovim
|
||||
networkmanager
|
||||
wget curl
|
||||
rsync
|
||||
w3m
|
||||
git
|
||||
pciutils usbutils binutils
|
||||
ripgrep sd fd
|
||||
];
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
};
|
||||
}
|
7
env/nix/profiles/laptop.nix
vendored
Normal file
7
env/nix/profiles/laptop.nix
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./base.nix
|
||||
];
|
||||
}
|
Reference in a new issue