mirror of
				https://github.com/ItsDrike/nixdots
				synced 2025-11-04 01:56:35 +00:00 
			
		
		
		
	Compare commits
	
		
			8 commits
		
	
	
		
			8808ac6be4
			...
			36db61f255
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 36db61f255 | |||
| 05278242fe | |||
| e4c3ae78ff | |||
| 4cf6d51b79 | |||
| ad463e5f3f | |||
| dddbbb869a | |||
| d8513f4cdc | |||
| 9499e8943a | 
					 13 changed files with 220 additions and 32 deletions
				
			
		| 
						 | 
					@ -34,6 +34,7 @@ in
 | 
				
			||||||
        ./programs
 | 
					        ./programs
 | 
				
			||||||
        ./impermanence
 | 
					        ./impermanence
 | 
				
			||||||
        ./themes
 | 
					        ./themes
 | 
				
			||||||
 | 
					        ./services
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      config = {
 | 
					      config = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,8 +11,16 @@
 | 
				
			||||||
in {
 | 
					in {
 | 
				
			||||||
  config = mkIf (builtins.elem devType acceptedTypes) {
 | 
					  config = mkIf (builtins.elem devType acceptedTypes) {
 | 
				
			||||||
    home.packages = with pkgs; [
 | 
					    home.packages = with pkgs; [
 | 
				
			||||||
      trash-cli
 | 
					      libnotify # send desktop notifications
 | 
				
			||||||
      bitwarden-cli
 | 
					      imagemagick # create/edit images
 | 
				
			||||||
 | 
					      trash-cli # interface to freedesktop trashcan
 | 
				
			||||||
 | 
					      bitwarden-cli # pw manager
 | 
				
			||||||
 | 
					      slides # terminal based presentation tool
 | 
				
			||||||
 | 
					      brightnessctl # brightness control
 | 
				
			||||||
 | 
					      pulsemixer # manage audio (TUI)
 | 
				
			||||||
 | 
					      nix-tree # interactively browse nix store
 | 
				
			||||||
 | 
					      glow # render markdown
 | 
				
			||||||
 | 
					      ffmpeg # record, convert and stream audio and video
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,12 +21,15 @@
 | 
				
			||||||
    dnsutils # DNS utilities
 | 
					    dnsutils # DNS utilities
 | 
				
			||||||
    dig # DNS utilities
 | 
					    dig # DNS utilities
 | 
				
			||||||
    curl # CLI tool for transfering data with URLs
 | 
					    curl # CLI tool for transfering data with URLs
 | 
				
			||||||
 | 
					    lm_sensors # tools for reading hw sensors
 | 
				
			||||||
 | 
					    p7zip # 7zip fork with some improvements
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Rust replacements
 | 
					    # Rust replacements
 | 
				
			||||||
    procs # better ps
 | 
					    procs # better ps
 | 
				
			||||||
    ripgrep # better grep
 | 
					    ripgrep # better grep
 | 
				
			||||||
    fd # better find
 | 
					    fd # better find
 | 
				
			||||||
    du-dust # better du
 | 
					    du-dust # better du
 | 
				
			||||||
 | 
					    skim # fuzzy finder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Development
 | 
					    # Development
 | 
				
			||||||
    gcc # GNU C compiler
 | 
					    gcc # GNU C compiler
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,5 +4,7 @@ _: {
 | 
				
			||||||
    ./stremio.nix
 | 
					    ./stremio.nix
 | 
				
			||||||
    ./nomacs.nix
 | 
					    ./nomacs.nix
 | 
				
			||||||
    ./qbittorrent.nix
 | 
					    ./qbittorrent.nix
 | 
				
			||||||
 | 
					    ./mpv.nix
 | 
				
			||||||
 | 
					    ./obs.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										17
									
								
								home/packages/gui/mpv.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								home/packages/gui/mpv.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  osConfig,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: let
 | 
				
			||||||
 | 
					  inherit (lib) mkIf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cfg = osConfig.myOptions.home-manager.programs.applications.mpv;
 | 
				
			||||||
 | 
					in {
 | 
				
			||||||
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
 | 
					    home.packages = with pkgs; [
 | 
				
			||||||
 | 
					      mpv
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										19
									
								
								home/packages/gui/obs.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								home/packages/gui/obs.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  osConfig,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: let
 | 
				
			||||||
 | 
					  inherit (lib) mkIf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cfg = osConfig.myOptions.home-manager.programs.applications.obs;
 | 
				
			||||||
 | 
					in {
 | 
				
			||||||
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
 | 
					    home.packages = with pkgs; [
 | 
				
			||||||
 | 
					      obs-studio
 | 
				
			||||||
 | 
					      obs-cli
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,17 @@
 | 
				
			||||||
# Manage $XDG_CONFIG_HOME/mimeapps.list
 | 
					# Manage $XDG_CONFIG_HOME/mimeapps.list
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  xdg.mimeApps = {
 | 
					  xdg.mimeApps = let 
 | 
				
			||||||
    enable = true;
 | 
					 | 
				
			||||||
    associations.added = let
 | 
					 | 
				
			||||||
      browser = "firefox.desktop";
 | 
					      browser = "firefox.desktop";
 | 
				
			||||||
      textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser
 | 
					      textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser
 | 
				
			||||||
      fileManager = "pcmanfm-qt.desktop";
 | 
					      emailClient = browser;
 | 
				
			||||||
      archiveManager = "org.gnome.FileRoller.desktop";
 | 
					      pdfViewer = browser; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop)
 | 
				
			||||||
 | 
					      fileManager = "pcmanfm-qt.desktop"; # TODO: change
 | 
				
			||||||
 | 
					      archiveManager = "org.kde.ark.desktop";
 | 
				
			||||||
      imageViewer = "org.nomacs.ImageLounge.desktop";
 | 
					      imageViewer = "org.nomacs.ImageLounge.desktop";
 | 
				
			||||||
      videoPlayer = "mpv.desktop";
 | 
					      videoPlayer = "mpv.desktop";
 | 
				
			||||||
      audioPlayer = "mpv.desktop";
 | 
					      audioPlayer = "mpv.desktop";
 | 
				
			||||||
    in {
 | 
					
 | 
				
			||||||
 | 
					      associations = {
 | 
				
			||||||
        "text/html" = [browser];
 | 
					        "text/html" = [browser];
 | 
				
			||||||
        "x-scheme-handler/http" = [browser];
 | 
					        "x-scheme-handler/http" = [browser];
 | 
				
			||||||
        "x-scheme-handler/https" = [browser];
 | 
					        "x-scheme-handler/https" = [browser];
 | 
				
			||||||
| 
						 | 
					@ -23,6 +24,9 @@
 | 
				
			||||||
        "application/x-extension-xhtml" = [browser];
 | 
					        "application/x-extension-xhtml" = [browser];
 | 
				
			||||||
        "application/x-extension-xht" = [browser];
 | 
					        "application/x-extension-xht" = [browser];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        "application/pdf" = [pdfViewer];
 | 
				
			||||||
 | 
					        "x-scheme-handler/mailto" = [emailClient];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        "inode/directory" = [fileManager];
 | 
					        "inode/directory" = [fileManager];
 | 
				
			||||||
        "application/zip" = [archiveManager];
 | 
					        "application/zip" = [archiveManager];
 | 
				
			||||||
        "application/x-xz-compressed-tar" = [archiveManager];
 | 
					        "application/x-xz-compressed-tar" = [archiveManager];
 | 
				
			||||||
| 
						 | 
					@ -31,13 +35,26 @@
 | 
				
			||||||
        "audio/*" = [audioPlayer];
 | 
					        "audio/*" = [audioPlayer];
 | 
				
			||||||
        "video/*" = [videoPlayer];
 | 
					        "video/*" = [videoPlayer];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # The wildcard associations don't work everywhere, so we
 | 
				
			||||||
 | 
					        # still need specific ones
 | 
				
			||||||
 | 
					        "image/jpeg" = [imageViewer];
 | 
				
			||||||
 | 
					        "image/png" = [imageViewer];
 | 
				
			||||||
 | 
					        "image/svg+xml" = [imageViewer];
 | 
				
			||||||
 | 
					        "image/gif" = [imageViewer];
 | 
				
			||||||
 | 
					        "video/mp4" = [videoPlayer];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        "text/plain" = [textEditor];
 | 
					        "text/plain" = [textEditor];
 | 
				
			||||||
        "application/json" = [textEditor];
 | 
					        "application/json" = [textEditor];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        "x-scheme-handler/spotify" = ["spotify.desktop"];
 | 
					        "x-scheme-handler/spotify" = ["spotify.desktop"];
 | 
				
			||||||
        "x-scheme-handler/tg" = ["telegramdesktop.desktop"];
 | 
					        "x-scheme-handler/tg" = ["telegramdesktop.desktop"];
 | 
				
			||||||
 | 
					        "x-scheme-handler/discord" = ["vesktop.desktop"];
 | 
				
			||||||
        "x-scheme-handler/msteams" = ["teams.desktop"]; # I need it for school, don't judge me
 | 
					        "x-scheme-handler/msteams" = ["teams.desktop"]; # I need it for school, don't judge me
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					  in {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    associations.added = associations;
 | 
				
			||||||
 | 
					    defaultApplications = associations;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  home.sessionVariables = {
 | 
					  home.sessionVariables = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
_: {
 | 
					_: {
 | 
				
			||||||
  imports = [ ];
 | 
					  imports = [ 
 | 
				
			||||||
 | 
					    ./dunst.nix
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										100
									
								
								home/services/dunst.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								home/services/dunst.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,100 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  osConfig,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: let
 | 
				
			||||||
 | 
					  inherit (lib) mkIf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cfg = osConfig.myOptions.home-manager.services.dunst;
 | 
				
			||||||
 | 
					in {
 | 
				
			||||||
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
 | 
					    services.dunst = {
 | 
				
			||||||
 | 
					      enable = true;
 | 
				
			||||||
 | 
					      iconTheme = {
 | 
				
			||||||
 | 
					        package = config.gtk.iconTheme.package;
 | 
				
			||||||
 | 
					        name = config.gtk.iconTheme.name;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      settings = {
 | 
				
			||||||
 | 
					        global = {
 | 
				
			||||||
 | 
					          follow = "mouse";
 | 
				
			||||||
 | 
					          width = 270;
 | 
				
			||||||
 | 
					          height = 300;
 | 
				
			||||||
 | 
					          origin = "top-right";
 | 
				
			||||||
 | 
					          offset = "30x30";
 | 
				
			||||||
 | 
					          scale = 0;
 | 
				
			||||||
 | 
					          alignment = "left";
 | 
				
			||||||
 | 
					          vertical_alignment = "center";
 | 
				
			||||||
 | 
					          ellipsize = "middle";
 | 
				
			||||||
 | 
					          padding = 10;
 | 
				
			||||||
 | 
					          horizontal_padding = 10;
 | 
				
			||||||
 | 
					          text_icon_padding = 0;
 | 
				
			||||||
 | 
					          icon_position = "left";
 | 
				
			||||||
 | 
					          min_icon_size = 0;
 | 
				
			||||||
 | 
					          max_icon_size = 32;
 | 
				
			||||||
 | 
					          separator_height = 2;
 | 
				
			||||||
 | 
					          frame_width = 3;
 | 
				
			||||||
 | 
					          frame_color = "#27292c";
 | 
				
			||||||
 | 
					          separator_color = "frame";
 | 
				
			||||||
 | 
					          corner_radius = 0;
 | 
				
			||||||
 | 
					          transparency = 20;
 | 
				
			||||||
 | 
					          word_wrap = "yes";
 | 
				
			||||||
 | 
					          line_height = 0;
 | 
				
			||||||
 | 
					          notification_limit = 3;
 | 
				
			||||||
 | 
					          idle_threshold = 120;
 | 
				
			||||||
 | 
					          history_length = 20;
 | 
				
			||||||
 | 
					          show_age_threshold = 60;
 | 
				
			||||||
 | 
					          markup = "full";
 | 
				
			||||||
 | 
					          format = "<b>%a - %s</b>\\n%b";
 | 
				
			||||||
 | 
					          font = "JetBrainsMono Nerd Font 11";
 | 
				
			||||||
 | 
					          sort = "yes";
 | 
				
			||||||
 | 
					          shrink = "no";
 | 
				
			||||||
 | 
					          sticky_history = "yes";
 | 
				
			||||||
 | 
					          ignore_newline = "no";
 | 
				
			||||||
 | 
					          show_indicators = "yes";
 | 
				
			||||||
 | 
					          stack_duplicates = true;
 | 
				
			||||||
 | 
					          always_run_script = true;
 | 
				
			||||||
 | 
					          hide_duplicate_count = false;
 | 
				
			||||||
 | 
					          ignore_dbusclose = false;
 | 
				
			||||||
 | 
					          force_xwayland = false;
 | 
				
			||||||
 | 
					          force_xinerama = false;
 | 
				
			||||||
 | 
					          mouse_left_click = "do_action, open_url, close_current";
 | 
				
			||||||
 | 
					          mouse_middle_click = "context";
 | 
				
			||||||
 | 
					          mouse_right_click = "close_current";
 | 
				
			||||||
 | 
					          indicate_hidden = "yes";
 | 
				
			||||||
 | 
					          progress_bar = true;
 | 
				
			||||||
 | 
					          progress_bar_height = 30;
 | 
				
			||||||
 | 
					          progress_bar_frame_width = 1;
 | 
				
			||||||
 | 
					          progress_bar_min_width = 150;
 | 
				
			||||||
 | 
					          progress_bar_max_width = 300;
 | 
				
			||||||
 | 
					          title = "Dunst";
 | 
				
			||||||
 | 
					          class = "Dunst";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        fullscreen_delay_everything = {fullscreen = "delay";};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        urgency_low = {
 | 
				
			||||||
 | 
					          timeout = 5;
 | 
				
			||||||
 | 
					          background = "#1e2137fa";
 | 
				
			||||||
 | 
					          foreground = "#ffffff";
 | 
				
			||||||
 | 
					          highlight = "#fe6c5a";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        urgency_normal = {
 | 
				
			||||||
 | 
					          timeout = 10;
 | 
				
			||||||
 | 
					          background = "#141c21fa";
 | 
				
			||||||
 | 
					          foreground = "#ffffffff";
 | 
				
			||||||
 | 
					          highlight = "#fe6c5a";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        urgency_critical = {
 | 
				
			||||||
 | 
					          timeout = 0;
 | 
				
			||||||
 | 
					          background = "#dd130ddd";
 | 
				
			||||||
 | 
					          foreground = "#ffffffff";
 | 
				
			||||||
 | 
					          highlight = "#fe6c5a";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -70,6 +70,7 @@
 | 
				
			||||||
            # Applications
 | 
					            # Applications
 | 
				
			||||||
            ".config/spotify"
 | 
					            ".config/spotify"
 | 
				
			||||||
            ".config/vesktop"
 | 
					            ".config/vesktop"
 | 
				
			||||||
 | 
					            "./config/nomacs"
 | 
				
			||||||
            ".local/share/Smart Code ltd/Stremio"
 | 
					            ".local/share/Smart Code ltd/Stremio"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Tools
 | 
					            # Tools
 | 
				
			||||||
| 
						 | 
					@ -173,10 +174,16 @@
 | 
				
			||||||
            enable = true;
 | 
					            enable = true;
 | 
				
			||||||
            autoStart = true;
 | 
					            autoStart = true;
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
 | 
					          mpv.enable = true;
 | 
				
			||||||
          nomacs.enable = true;
 | 
					          nomacs.enable = true;
 | 
				
			||||||
          qbittorrent.enable = true;
 | 
					          qbittorrent.enable = true;
 | 
				
			||||||
 | 
					          obs.enable = true;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      services = {
 | 
				
			||||||
 | 
					        dunst.enable = true;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@ in
 | 
				
			||||||
    ./git.nix
 | 
					    ./git.nix
 | 
				
			||||||
    ./wms.nix
 | 
					    ./wms.nix
 | 
				
			||||||
    ./theme.nix
 | 
					    ./theme.nix
 | 
				
			||||||
 | 
					    ./services.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  options.myOptions.home-manager = {
 | 
					  options.myOptions.home-manager = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,6 +35,8 @@ in
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      nomacs.enable = mkEnableOption "Nomacs (Qt-based image viewer)";
 | 
					      nomacs.enable = mkEnableOption "Nomacs (Qt-based image viewer)";
 | 
				
			||||||
      qbittorrent.enable = mkEnableOption "Qbittorrent (Free software BitTorrent client)";
 | 
					      qbittorrent.enable = mkEnableOption "Qbittorrent (Free software BitTorrent client)";
 | 
				
			||||||
 | 
					      obs.enable = mkEnableOption "OBS (Free and oepn source software for video recording and live streaming)";
 | 
				
			||||||
 | 
					      mpv.enable = mkEnableOption "MPV (General-purpose media player)";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    tools = {
 | 
					    tools = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										9
									
								
								options/home/services.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								options/home/services.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					{ lib, ... }: with lib; let
 | 
				
			||||||
 | 
					  inherit (lib) mkEnableOption mkOption types;
 | 
				
			||||||
 | 
					in
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  options.myOptions.home-manager.services = {
 | 
				
			||||||
 | 
					    dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue