mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 12:40:13 +00:00
start to split nix into modules
This commit is contained in:
6
modules/applications/keybase.nix
Normal file
6
modules/applications/keybase.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
};
|
||||
}
|
9
modules/gaming/common.nix
Normal file
9
modules/gaming/common.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, ... }: {
|
||||
|
||||
config = {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
14
modules/gaming/leagueoflegends.nix
Normal file
14
modules/gaming/leagueoflegends.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ./lutris.nix ];
|
||||
|
||||
config = {
|
||||
|
||||
# League of Legends anti-cheat
|
||||
boot.kernel.sysctl = { "abi.vsyscall32" = 0; };
|
||||
|
||||
environment.systemPackages = with pkgs; [ openssl dconf ];
|
||||
|
||||
};
|
||||
}
|
9
modules/gaming/lutris.nix
Normal file
9
modules/gaming/lutris.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [ ./common.nix ];
|
||||
|
||||
config = { environment.systemPackages = with pkgs; [ lutris amdvlk wine ]; };
|
||||
|
||||
}
|
10
modules/gaming/steam.nix
Normal file
10
modules/gaming/steam.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
imports = [ ./common.nix ];
|
||||
|
||||
config = {
|
||||
hardware.steam-hardware.enable = true;
|
||||
environment.systemPackages = with pkgs; [ steam ];
|
||||
};
|
||||
|
||||
}
|
28
modules/system/doas.nix
Normal file
28
modules/system/doas.nix
Normal file
@ -0,0 +1,28 @@
|
||||
# Replace sudo with doas
|
||||
|
||||
{ config, ... }: {
|
||||
|
||||
config = {
|
||||
security = {
|
||||
|
||||
# Remove sudo
|
||||
sudo.enable = false;
|
||||
|
||||
# Add doas
|
||||
doas = {
|
||||
enable = true;
|
||||
|
||||
# No password required
|
||||
wheelNeedsPassword = false;
|
||||
|
||||
# Pass environment variables from user to root
|
||||
# Also requires removing password here
|
||||
extraRules = [{
|
||||
groups = [ "wheel" ];
|
||||
noPass = true;
|
||||
keepEnv = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
modules/system/timezone.nix
Normal file
14
modules/system/timezone.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
# Service to determine location for time zone
|
||||
services.geoclue2.enable = true;
|
||||
location = { provider = "geoclue2"; };
|
||||
|
||||
# Enable local time based on time zone
|
||||
services.localtime.enable = true;
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user