split nixos config

This commit is contained in:
2024-05-15 17:08:53 -04:00
parent 0517ca059e
commit ed7df00704
10 changed files with 120 additions and 116 deletions

View File

@@ -0,0 +1,4 @@
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

5
modules/nixos/env.nix Normal file
View File

@@ -0,0 +1,5 @@
{
environment.variables = {
EDITOR = "nvim";
};
}

33
modules/nixos/i3.nix Normal file
View File

@@ -0,0 +1,33 @@
{ pkgs, ... }:
{
environment.pathsToLink = [ "/libexec" ];
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
feh
arandr
];
};
layout = "us";
xkbVariant = "";
};
}

6
modules/nixos/nix-ld.nix Normal file
View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [];
}

3
modules/nixos/nm.nix Normal file
View File

@@ -0,0 +1,3 @@
{
networking.networkmanager.enable = true;
}

11
modules/nixos/nvidia.nix Normal file
View File

@@ -0,0 +1,11 @@
{
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
hardware.nvidia.modesetting.enable = true;
services.xserver.videoDrivers = [ "nvidia "];
}

9
modules/nixos/sound.nix Normal file
View File

@@ -0,0 +1,9 @@
{
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

9
modules/nixos/steam.nix Normal file
View File

@@ -0,0 +1,9 @@
{
programs = {
steam = {
enable = true;
gamescopeSession.enable = true;
};
gamemode.enable = true;
};
}

27
modules/nixos/user.nix Normal file
View File

@@ -0,0 +1,27 @@
{ pkgs, ... }:
{
programs.zsh.enable = true;
nix.settings = {
trusted-users = ["mthomson"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
users.users.mthomson = {
shell = pkgs.zsh;
isNormalUser = true;
description = "Michael Thomson";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
}