move more modules to common section

This commit is contained in:
Noah Masur 2022-05-22 19:43:46 -04:00
parent df96ff6cea
commit 5b9058935d
9 changed files with 131 additions and 125 deletions

View File

@ -1,5 +1,18 @@
{ config, lib, pkgs, ... }: {
imports = [
../modules/hardware
../modules/system
../modules/graphical
../modules/shell
../modules/gaming
../modules/applications
../modules/editor
../modules/mail/himalaya.nix
];
config = {
nix.extraOptions = "experimental-features = nix-command flakes";
home-manager.useGlobalPkgs = true;
@ -7,4 +20,6 @@
environment.systemPackages = with pkgs; [ git vim wget curl ];
};
}

View File

@ -12,24 +12,12 @@ nixpkgs.lib.nixosSystem {
gui.enable = true;
gui.compositor.enable = true;
nixpkgs.overlays = [ nur.overlay ];
gaming.leagueoflegends = true;
gaming.steam = true;
}
./hardware-configuration.nix
../common.nix
../../modules/hardware
../../modules/system
../../modules/graphical
../../modules/shell
../../modules/gaming
../../modules/mail/himalaya.nix
../../modules/services/keybase.nix
../../modules/services/gnupg.nix
../../modules/applications/firefox.nix
../../modules/applications/alacritty.nix
../../modules/applications/media.nix
../../modules/applications/1password.nix
../../modules/applications/discord.nix
../../modules/applications/calibre.nix
../../modules/editor/neovim
../../modules/editor/notes.nix
];
}

View File

@ -1,5 +1,6 @@
{ config, pkgs, ... }: {
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
home-manager.users.${config.user} = {
xsession.windowManager.i3.config.terminal = "alacritty";
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";
@ -84,4 +85,5 @@
};
};
};
};
}

View File

@ -0,0 +1,13 @@
{ ... }: {
imports = [
./1password.nix
./alacritty.nix
./calibre.nix
./discord.nix
./firefox.nix
./media.nix
./qbittorrent.nix
];
}

View File

@ -0,0 +1,5 @@
{ ... }: {
imports = [ ./neovim ./notes.nix ];
}

View File

@ -1,15 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.leagueoflegends;
options.gaming.leagueoflegends = lib.mkEnableOption "League of Legends";
in {
options.modules.gaming.leagueoflegends = {
enable = mkEnableOption "League of Legends";
};
config = mkIf cfg.enable {
config = lib.mkIf config.gaming.leagueoflegends {
# League of Legends anti-cheat
boot.kernel.sysctl = { "abi.vsyscall32" = 0; };

View File

@ -1,13 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.lutris;
options.gaming.lutris = lib.mkEnableOption "Lutris";
in {
options.modules.gaming.lutris = { enable = mkEnableOption "Lutris"; };
config = mkIf cfg.enable {
config = lib.mkIf (config.gaming.lutris || config.gaming.leagueoflegends) {
environment.systemPackages = with pkgs; [ lutris amdvlk wine ];
};

View File

@ -1,13 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.steam;
options.gaming.steam = lib.mkEnableOption "Steam";
in {
options.modules.gaming.steam = { enable = mkEnableOption "Steam"; };
config = mkIf cfg.enable {
config = lib.mkIf config.gaming.steam {
hardware.steam-hardware.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ steam ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: {
{ config, pkgs, lib, ... }: {
home-manager.users.${config.user} = {
programs.gpg.enable = true;
@ -10,7 +10,7 @@
maxCacheTtlSsh = 34560000; # Can never reset
pinentryFlavor = "tty";
};
home.packages = with pkgs; [ pinentry ];
home = lib.mkIf config.gui.enable { packages = with pkgs; [ pinentry ]; };
};
}