mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
move more modules to common section
This commit is contained in:
parent
df96ff6cea
commit
5b9058935d
@ -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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
13
modules/applications/default.nix
Normal file
13
modules/applications/default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [
|
||||
./1password.nix
|
||||
./alacritty.nix
|
||||
./calibre.nix
|
||||
./discord.nix
|
||||
./firefox.nix
|
||||
./media.nix
|
||||
./qbittorrent.nix
|
||||
];
|
||||
|
||||
}
|
5
modules/editor/default.nix
Normal file
5
modules/editor/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [ ./neovim ./notes.nix ];
|
||||
|
||||
}
|
@ -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; };
|
||||
|
@ -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 ];
|
||||
};
|
||||
|
||||
|
@ -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 ];
|
||||
|
@ -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 ]; };
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user