summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
committerJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
commit7b79203f54853733d4fae88943829d0e24e6e49f (patch)
treea352d199fad7453332b9308a6295164157729f27 /modules/desktop/apps
parent184bd30bcb303104a4981ac742d8f8961c5477e7 (diff)
downloadnix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.gz
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.bz2
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.zip
massive overhaul
Diffstat (limited to 'modules/desktop/apps')
-rw-r--r--modules/desktop/apps/browsers/firefox.nix67
-rw-r--r--modules/desktop/apps/editors/neovim.nix42
-rw-r--r--modules/desktop/apps/flatpak.nix21
-rw-r--r--modules/desktop/apps/games/steam.nix34
-rw-r--r--modules/desktop/apps/mpd.nix39
-rw-r--r--modules/desktop/apps/mpv.nix29
-rw-r--r--modules/desktop/apps/newsboat.nix27
-rw-r--r--modules/desktop/apps/terminals/kitty.nix54
8 files changed, 313 insertions, 0 deletions
diff --git a/modules/desktop/apps/browsers/firefox.nix b/modules/desktop/apps/browsers/firefox.nix
new file mode 100644
index 0000000..3c647f1
--- /dev/null
+++ b/modules/desktop/apps/browsers/firefox.nix
@@ -0,0 +1,67 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ firefoxConf = config.modules.desktop.apps.browsers.firefox;
+ arkenfox = {
+ owner = "arkenfox";
+ repo = "user.js";
+ version = "117.0";
+ };
+in
+{
+ options.modules.desktop.apps.browsers.firefox = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+ config = lib.mkIf (firefoxConf.enable) {
+ env.MOZ_DBUS_REMOTE = "1";
+ home.packages = [pkgs.xdg-utils];
+
+ home.manager.programs.firefox = {
+ enable = true;
+ package = pkgs.firefox;
+ profiles."default" = {
+ extraConfig = builtins.readFile
+ ( builtins.fetchTarball {
+ url = "https://github.com/${arkenfox.owner}/${arkenfox.repo}/archive/refs/tags/${arkenfox.version}.tar.gz";
+ sha256="1pll4fbdn2390n05902l3pkg4rizxghkakpzi1r9z1b7blmk1x4s";
+ } + "/user.js");
+ search = {
+ force = true;
+ default = "DuckDuckGo";
+ engines = {
+ "Nix Packages" = {
+ urls = [{
+ template = "https://search.nixos.org/packages";
+ params = [
+ { name = "type"; value = "packages"; }
+ { name = "query"; value = "{searchTerms}"; }
+ ];
+ }];
+ definedAliases = [ "@np" ];
+ };
+ "NixOS Wiki" = {
+ urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
+ iconUpdateURL = "https://nixos.wiki/favicon.png";
+ updateInterval = 24 * 60 * 60 * 1000;
+ definedAliases = [ "@nw" ];
+ };
+ };
+ };
+ };
+ };
+
+ modules.desktop.defaultApplications.apps.browser = rec {
+ package = pkgs.firefox;
+ install = false;
+ cmd = "${package}/bin/firefox";
+ desktop = "firefox";
+ };
+ };
+}
diff --git a/modules/desktop/apps/editors/neovim.nix b/modules/desktop/apps/editors/neovim.nix
new file mode 100644
index 0000000..77857a2
--- /dev/null
+++ b/modules/desktop/apps/editors/neovim.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ nvimConf = config.modules.desktop.apps.editors.neovim;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.editors.neovim = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (nvimConf.enable) {
+
+ home.manager.xdg.configFile."nvim/init.vim".source = "${configDir}/nvim/init.vim";
+ home.manager.xdg.configFile."nvim/lua/init.lua".source = "${configDir}/nvim/init.lua";
+ home.manager.xdg.configFile."nvim/lua/plugins.lua".source = "${configDir}/nvim/plugins.lua";
+
+ modules.desktop.defaultApplications.apps.editor = rec {
+ package = pkgs.neovim;
+ install = false;
+ cmd = "${package}/bin/nvim";
+ desktop = "nvim";
+ };
+
+ home.packages = [
+
+ ];
+
+ home.manager.programs.neovim = {
+ enable = true;
+ viAlias = true;
+ vimAlias = true;
+ withNodeJs = true;
+ };
+ };
+}
diff --git a/modules/desktop/apps/flatpak.nix b/modules/desktop/apps/flatpak.nix
new file mode 100644
index 0000000..30e2363
--- /dev/null
+++ b/modules/desktop/apps/flatpak.nix
@@ -0,0 +1,21 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ flatpakConf = config.modules.desktop.apps.flatpak;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.flatpak = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (flatpakConf.enable) {
+ services.flatpak.enable = true;
+ };
+}
diff --git a/modules/desktop/apps/games/steam.nix b/modules/desktop/apps/games/steam.nix
new file mode 100644
index 0000000..50b5c62
--- /dev/null
+++ b/modules/desktop/apps/games/steam.nix
@@ -0,0 +1,34 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ gamesConf = config.modules.desktop.apps.games;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.games = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ steam.enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf (gamesConf.enable) {
+ home.packages = [
+ pkgs.steam-run
+ ];
+
+ programs.steam = lib.mkIf (gamesConf.steam.enable) {
+ enable = true;
+ remotePlay.openFirewall = true;
+ dedicatedServer.openFirewall = true;
+ gamescopeSession.enable = true;
+ };
+ };
+}
diff --git a/modules/desktop/apps/mpd.nix b/modules/desktop/apps/mpd.nix
new file mode 100644
index 0000000..e7af8c3
--- /dev/null
+++ b/modules/desktop/apps/mpd.nix
@@ -0,0 +1,39 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ mpdConfig = config.modules.desktop.apps.mpd;
+in
+{
+ options.modules.desktop.apps.mpd = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (mpdConfig.enable) {
+ home.packages = [
+ pkgs.mpc-cli
+ pkgs.ncmpcpp
+ ];
+
+ services.mpd = {
+ enable = true;
+ musicDirectory = /home/jon/mus;
+ extraConfig = ''
+audio_output {
+ type "pipewire"
+ name "Pipewire Output"
+}
+ '';
+ user = "jon";
+ };
+ systemd.services.mpd.environment = {
+ XDG_RUNTIME_DIR = "/run/user/1000";
+ };
+ };
+}
diff --git a/modules/desktop/apps/mpv.nix b/modules/desktop/apps/mpv.nix
new file mode 100644
index 0000000..96f9c87
--- /dev/null
+++ b/modules/desktop/apps/mpv.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ mpvConfig = config.modules.desktop.apps.mpv;
+in
+{
+ options.modules.desktop.apps.mpv = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (mpvConfig.enable) {
+ home.packages = [
+ pkgs.mpv
+ ];
+ modules.desktop.defaultApplications.apps.video = rec {
+ package = pkgs.mpv;
+ install = false;
+ cmd = "${package}/bin/mpv";
+ desktop = "mpv";
+ };
+ };
+}
diff --git a/modules/desktop/apps/newsboat.nix b/modules/desktop/apps/newsboat.nix
new file mode 100644
index 0000000..e0980d0
--- /dev/null
+++ b/modules/desktop/apps/newsboat.nix
@@ -0,0 +1,27 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ newsboatConfig = config.modules.desktop.apps.newsboat;
+ defaultApps = config.modules.desktop.defaultApplications.apps;
+in
+{
+ options.modules.desktop.apps.newsboat = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (newsboatConfig.enable) {
+ home.manager.programs.newsboat = {
+ enable = true;
+ extraConfig = ''
+macro y set browser "${defaultApps.video.cmd} %u" ; open-in-browser ; set browser "${defaultApps.browser.cmd} %u"
+'';
+ };
+ };
+}
diff --git a/modules/desktop/apps/terminals/kitty.nix b/modules/desktop/apps/terminals/kitty.nix
new file mode 100644
index 0000000..b2339c9
--- /dev/null
+++ b/modules/desktop/apps/terminals/kitty.nix
@@ -0,0 +1,54 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ kittyConf = config.modules.desktop.apps.terminals.kitty;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.terminals.kitty = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (kittyConf.enable) {
+ modules.desktop.defaultApplications.apps.terminal = rec {
+ package = pkgs.kitty;
+ install = false;
+ cmd = "${package}/bin/kitty";
+ desktop = "kitty";
+ };
+
+ home.manager.programs.kitty = {
+ enable = true;
+ font = {
+ name = "FiraCode Nerd Font";
+ size = 12;
+ };
+ settings = {
+ repaint_delay = 10;
+ input_delay = 3;
+ sync_to_monitor = true;
+
+ remember_window_size = false;
+ initial_window_width = 640;
+ initial_window_height = 480;
+ enabled_layouts = "*";
+
+ tab_bar_min_tabs = 2;
+ tab_bar_edge = "bottom";
+ tab_bar_style = "powerline";
+ tab_powerline_style = "slanted";
+ tab_title_template = "{title}{' :{}'.format(num_windows) if num_windows > 1 else ''}";
+
+ background_opacity = "0.8";
+ };
+ extraConfig = ''include ./theme.conf'';
+ };
+ home.manager.xdg.configFile."kitty/theme.conf".source = "${configDir}/kitty/themes/mocha.conf";
+ };
+}