refactor: inputs/ --> {sys,home}/

This commit is contained in:
ooks-io 2024-05-26 14:57:35 +12:00
parent 8f22a24963
commit f77c627980
225 changed files with 77 additions and 88 deletions

View file

@ -0,0 +1,42 @@
{ lib, config, ... }:
let
cfg = config.profiles.base;
inherit (lib) mkDefault;
in
{
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
systemd.user.startServices = mkDefault "sd-switch";
homeModules = {
config = {
home.enable = true;
userDirs.enable = true;
mimeApps.enable = true;
};
console = {
editor.helix = {
enable = true;
default = true;
};
prompt.starship.enable = true;
shell = {
fish.enable = true;
bash.enable = true;
};
multiplexer.zellij.enable = true;
utility = {
ssh.enable = true;
nixIndex.enable = true;
git.enable = true;
tools.enable = true;
};
};
};
};
}

View file

42
home/profile/default.nix Normal file
View file

@ -0,0 +1,42 @@
{ lib, config, ... }:
let
profileEnabler = let
reducer = l: r: {"${r}".enable = true;} // l;
in
builtins.foldl' reducer {} config.activeProfiles;
in
{
imports = [
./base
./hyprland
#./creative
./productivity
./gaming
./themes
];
options = {
activeProfiles = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
profiles = {
base = {
enable = lib.mkEnableOption "Enable the base profile";
};
hyprland = {
enable = lib.mkEnableOption "Enable the hyprland profile";
};
gaming = {
enable = lib.mkEnableOption "Enable the gaming profile";
};
productivity = {
enable = lib.mkEnableOption "Enable the productivity profile";
};
};
};
config.profiles = profileEnabler;
}

View file

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profiles.gaming;
in
{
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
homeModules.desktop = {
gaming = {
lutris.enable = false;
};
};
home.packages = with pkgs; [
bottles
winetricks
protontricks
protonup-qt
wineWowPackages.full
];
};
}

View file

@ -0,0 +1,69 @@
{ config, lib, ... }:
let
cfg = config.profiles.hyprland;
in
{
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
homeModules.desktop = {
wayland = {
enable = true;
windowManager.hyprland = {
enable = true;
extras = {
hyprcapture.enable = true;
hyprshade.enable = true;
};
};
lockscreen.hyprlock.enable = true;
notification.mako.enable = true;
bar.waybar.enable = true;
launcher.rofi.enable = true;
utility = {
tools.enable = true;
gammastep.enable = true;
};
};
security.polkit = "pantheon";
communication = {
discord.enable = true;
};
creative = {
audio = {
audacity.enable = true;
};
};
browser.firefox= {
enable = true;
default = true;
};
terminal = {
foot = {
enable = true;
default = true;
};
};
media = {
music.tui.enable = true;
music.easyeffects.enable = true;
image.imv.enable = true;
video = {
mpv.enable = true;
youtube.enable = true;
jellyfin.enable = true;
};
};
};
};
}

View file

@ -0,0 +1,20 @@
{ config, lib, ... }:
let
cfg = config.profiles.productivity;
in
{
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
homeModules.desktop = {
productivity = {
obsidian.enable = true;
zathura.enable = true;
office.enable = true;
};
};
};
}

View file

@ -0,0 +1,29 @@
{ lib, config, ... }:
# let
# cfg = config.theme;
# in
{
imports = [
./minimal
./phone
];
options.theme = {
minimal.enable = lib.mkEnableOption "enable minimal theme";
phone.enable = lib.mkEnableOption "Enable phone theme";
};
# config = {
# assertions = [
# {
# assertion =
# (lib.length (lib.filter (x: x) [
# cfg.minimal or false
# cfg.OTHERTHEMEHERE or false
# ]) <= 1);
# }
# ];
# };
}

View file

@ -0,0 +1,42 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.theme.minimal;
inherit (inputs.nix-colors) colorSchemes;
in
{
imports = [ inputs.nix-colors.homeManagerModule ];
config = lib.mkIf cfg.enable {
colorscheme = colorSchemes.gruvbox-material-dark-soft;
home.file.".colorscheme".text = config.colorscheme.slug;
home.sessionVariables.COLOR_SCHEME = "${config.colorscheme.slug}";
homeModules.theme = {
fonts.enable = true;
fonts.regular = {
family = "Fira Sans";
package = pkgs.fira;
};
fonts.monospace = {
family = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
};
cursor.enable = true;
cursor = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 22;
};
wallpaper = {
enable = true;
};
gtk.enable = true;
qt.enable = true;
};
};
}

View file

@ -0,0 +1,28 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.theme.phone;
inherit (inputs.nix-colors) colorSchemes;
in
{
imports = [ inputs.nix-colors.homeManagerModule ];
config = lib.mkIf cfg.enable {
colorscheme = colorSchemes.gruvbox-material-dark-soft;
home.file.".colorscheme".text = config.colorscheme.slug;
home.sessionVariables.COLOR_SCHEME = "${config.colorscheme.slug}";
homeModules.theme = {
fonts.enable = true;
fonts.regular = {
family = "Fira Sans";
package = pkgs.fira;
};
fonts.monospace = {
family = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
};
};
};
}