summaryrefslogblamecommitdiff
path: root/nixpkgs/kusanagi.nix
blob: 6f43dc906f36a4a30ae006fcafcca2b8fdbd15d1 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                                                     
                             
 
                                 




                            
 


                                      
                     






                                                                       
 


                                                     

     

                                            


                                     
                                                                                                    

                                                                                                           

                                                                                                         











                                            
                                           
                                          
                                                                    

    
                                                        
 


























                                                                                
                                               


                                                    

    

                                               
 

                                          



                                                             
 





                                              
                                                                     

 
{ pkgs, ... }:
let
  nurSrc = builtins.fetchTarball {
    url =
      "https://github.com/nix-community/NUR/archive/687ed97c4379e9ad1346fc673e3e0fc88210de14.tar.gz";
    sha256 = "sha256:0pxljc5bzcwb8c43qmm5l49p03snq7piqnshglqday2dw6cfcd6l";
  };
in {
  imports = [ ./common.nix ];

  programs.bash.profileExtra = ''
    function mklink {
      if [ ! -L "$2" ]; then
        ln -sfv "$1" "$2"
      fi
    }

    mklink /Z/lx/Downloads ~/Downloads

    mklink /Z/lx/app/openssh ~/.ssh
    mkdir -p ~/.gnupg
    mklink /Z/lx/app/gnupg/pubring.kbx ~/.gnupg/pubring.kbx
    mklink /Z/lx/app/gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg
    mklink /Z/lx/app/gnupg/private-keys-v1.d ~/.gnupg/private-keys-v1.d
    mklink /Z/lx/app/cargo ~/.cargo

    mklink /Z/lx/app/arduino/Arduino ~/Arduino
    mklink /Z/lx/app/arduino/.arduino15 ~/.arduino15

    mkdir -p ~/.local/share/Steam
    mklink /Z/lx/app/steam/.steam ~/.steam
    mklink /Z/lx/app/steam/Steam ~/.local/share/Steam
  '';

  programs.bash.shellAliases.z = "cd /Z/lx";

  home.file = {
    ".config/icewm/toolbar".text = ''
      prog "Terminal" xterm st
      prog "File manager" ${pkgs.chicago95}/share/icons/Chicago95/places/24/folder.png pcmanfm /Z/lx
      prog "Qutebrowser" ${pkgs.qutebrowser}/share/icons/hicolor/32x32/apps/qutebrowser.png qutebrowser
      prog "Firefox" ${pkgs.firefox}/share/icons/hicolor/32x32/apps/firefox.png ${pkgs.firefox}/bin/firefox
      # prog "Thunderbird" ${pkgs.thunderbird}/share/icons/hicolor/32x32/apps/thunderbird.png thunderbird
      prog "Music" ${pkgs.sonixd}/share/icons/hicolor/32x32/apps/sonixd.png sonixd
    '';
    ".gtkrc-2.0".text = ''
      gtk-theme-name = "Chicago95"
      gtk-icon-theme-name = "Chicago95"
    '';
    ".config/gtk-3.0/settings.ini".text = ''
      [Settings]
      gtk-icon-theme-name = Chicago95
      gtk-theme-name = Chicago95
    '';
  };

  nixpkgs.config.packageOverrides = pkgs: {
    nur = import nurSrc { inherit pkgs; };
    chicago95 = import ../nixos/pkg_chicago95.nix { inherit pkgs; };
  };

  home.packages = with pkgs; [ chicago95 xfce.tumbler ];

  home.file.".config/qutebrowser/quickmarks".source = ../qutebrowser/quickmarks;

  programs.firefox.enable = true;
  programs.firefox.profiles.default = {
    isDefault = true;
    extensions = with pkgs.nur.repos.rycee.firefox-addons; [
      ublock-origin
      privacy-badger
      startpage-private-search
    ];
    settings = {
      "extensions.autoDisableScopes" = 0;
      "extensions.enabledScopes" = 15;
    };
  };

  xdg.desktopEntries.llpp = {
    name = "llpp";
    genericName = "PDF viewer";
    exec = "llpp %f";
    terminal = false;
    categories = [ "Graphics" "Viewer" ];
    mimeType = [ "application/pdf" "application/x-pdf" ];
    type = "Application";
  };
  xdg.mimeApps.enable = true;
  xdg.mimeApps.defaultApplications = {
    "application/pdf" = [ "epdfview.desktop" ];
    "image/jpeg" = [ "org.xfce.ristretto.desktop" ];
    "image/png" = [ "org.xfce.ristretto.desktop" ];
    "text/plain" = [ "leafpad.desktop" ];
  };

  home.homeDirectory = "/home/lx";
  xdg.userDirs.download = "/home/lx/Downloads";

  gtk.gtk3.bookmarks = [ "file:///Z/lx" ];

  services.gpg-agent.enable = true;
  services.gpg-agent.enableSshSupport = false;
  services.gpg-agent.pinentryFlavor = "qt";
  services.gpg-agent.extraConfig = "no-allow-external-cache";

  programs.keychain = {
    enable = true;
    enableBashIntegration = true;
    keys = [ "/Z/lx/app/openssh/id_ed25519" ];
  };

  services.syncthing.extraOptions = [ "--home=/Z/lx/app/syncthing" ];
}