mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
split modules into user modules
This commit is contained in:
parent
38cc658ca0
commit
f445393c87
29 changed files with 70 additions and 78 deletions
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.bash;
|
cfg = config.modules.user.bash;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.bash = { enable = mkEnableOption "bash"; };
|
{ options.modules.user.bash = { enable = mkEnableOption "user.bash"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.modules.git;
|
let cfg = config.modules.user.git;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.git = { enable = mkEnableOption "git"; };
|
{ options.modules.user.git = { enable = mkEnableOption "user.git"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs = {
|
programs = {
|
||||||
git = {
|
git = {
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gpg;
|
cfg = config.modules.user.gpg;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gpg = { enable = mkEnableOption "gpg"; };
|
{ options.modules.user.gpg = { enable = mkEnableOption "user.gpg"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,3 @@
|
||||||
{ lib, config, ... }:
|
{
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.modules.gui;
|
|
||||||
|
|
||||||
in
|
|
||||||
{ options.modules.gui = { enable = mkEnableOption "gui"; };
|
|
||||||
imports = [ ./desktopEnvironments ];
|
imports = [ ./desktopEnvironments ];
|
||||||
config = mkIf cfg.enable {
|
|
||||||
modules = {
|
|
||||||
sway.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.sway;
|
cfg = config.modules.user.gui.sway;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.sway = { enable = mkEnableOption "sway"; };
|
{ options.modules.user.gui.sway = { enable = mkEnableOption "user.gui.sway"; };
|
||||||
imports = [ ../modules ];
|
imports = [ ../../modules ];
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
|
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
|
||||||
programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
|
programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.alacritty;
|
cfg = config.modules.user.gui.alacritty;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.alacritty = { enable = mkEnableOption "gui.alacritty"; };
|
{ options.modules.user.gui.alacritty = { enable = mkEnableOption "user.gui.alacritty"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.browsers;
|
cfg = config.modules.user.gui.browsers;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.browsers = { enable = mkEnableOption "gui.browsers"; };
|
{ options.modules.user.gui.browsers = { enable = mkEnableOption "user.gui.browsers"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.corn;
|
cfg = config.modules.user.gui.corn;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.corn = { enable = mkEnableOption "gui.corn"; };
|
{ options.modules.user.gui.corn = { enable = mkEnableOption "user.gui.corn"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
trezor-suite
|
trezor-suite
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.fun;
|
cfg = config.modules.user.gui.fun;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.fun = { enable = mkEnableOption "gui.fun"; };
|
{ options.modules.user.gui.fun = { enable = mkEnableOption "user.gui.fun"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.neovim;
|
cfg = config.modules.user.gui.neovim;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.neovim = { enable = mkEnableOption "gui.neovim"; };
|
{ options.modules.user.gui.neovim = { enable = mkEnableOption "user.gui.neovim"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.utils;
|
cfg = config.modules.user.gui.utils;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.utils = { enable = mkEnableOption "gui.utils"; };
|
{ options.modules.user.gui.utils = { enable = mkEnableOption "user.gui.utils"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.btop.enable = true;
|
programs.btop.enable = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.gui.writing;
|
cfg = config.modules.user.gui.writing;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.gui.writing = { enable = mkEnableOption "gui.writing"; };
|
{ options.modules.user.gui.writing = { enable = mkEnableOption "user.gui.writing"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
mdbook
|
mdbook
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.security;
|
cfg = config.modules.user.security;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.security = { enable = mkEnableOption "security"; };
|
{ options.modules.user.security = { enable = mkEnableOption "user.security"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.utils;
|
cfg = config.modules.user.utils;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.utils = { enable = mkEnableOption "utils"; };
|
{ options.modules.user.utils = { enable = mkEnableOption "user.utils"; };
|
||||||
imports = [ ./modules ];
|
imports = [ ./modules ];
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.utils.dev;
|
cfg = config.modules.user.utils.dev;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.utils.dev = { enable = mkEnableOption "utils.dev"; };
|
{ options.modules.user.utils.dev = { enable = mkEnableOption "user.utils.dev"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nix-init
|
nix-init
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.utils.email;
|
cfg = config.modules.user.utils.email;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.utils.email = { enable = mkEnableOption "utils.email"; };
|
{ options.modules.user.utils.email = { enable = mkEnableOption "user.utils.email"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.aerc = {
|
programs.aerc = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.utils.irc;
|
cfg = config.modules.user.utils.irc;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.utils.irc = { enable = mkEnableOption "utils.irc"; };
|
{ options.modules.user.utils.irc = { enable = mkEnableOption "user.utils.irc"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
weechat
|
weechat
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.utils.vim;
|
cfg = config.modules.user.utils.vim;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.utils.vim = { enable = mkEnableOption "utils.vim"; };
|
{ options.modules.user.utils.vim = { enable = mkEnableOption "user.utils.vim"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -20,27 +20,29 @@
|
||||||
home.homeDirectory = "/home/${config.user.name}";
|
home.homeDirectory = "/home/${config.user.name}";
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
bash.enable = true;
|
user = {
|
||||||
git.enable = true;
|
bash.enable = true;
|
||||||
gpg.enable = true;
|
git.enable = true;
|
||||||
security.enable = true;
|
gpg.enable = true;
|
||||||
|
security.enable = true;
|
||||||
|
|
||||||
utils = {
|
utils = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dev.enable = true;
|
dev.enable = true;
|
||||||
irc.enable = true;
|
irc.enable = true;
|
||||||
vim.enable = false;
|
vim.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
enable = true;
|
sway.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
browsers.enable = true;
|
browsers.enable = true;
|
||||||
corn.enable = true;
|
corn.enable = true;
|
||||||
fun.enable = true;
|
fun.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
utils.enable = true;
|
utils.enable = true;
|
||||||
writing.enable = true;
|
writing.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,19 @@
|
||||||
home.homeDirectory = "/home/${config.user.name}";
|
home.homeDirectory = "/home/${config.user.name}";
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
bash.enable = true;
|
user = {
|
||||||
git.enable = true;
|
bash.enable = true;
|
||||||
gpg.enable = true;
|
git.enable = true;
|
||||||
gui.enable = false;
|
gpg.enable = true;
|
||||||
security.enable = true;
|
gui.enable = false;
|
||||||
utils = {
|
security.enable = true;
|
||||||
enable = true;
|
utils = {
|
||||||
dev.enable = true;
|
enable = true;
|
||||||
email.enable = true;
|
dev.enable = true;
|
||||||
irc.enable = true;
|
email.enable = true;
|
||||||
vim.enable = true;
|
irc.enable = true;
|
||||||
|
vim.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue