-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home-manager/desktop: convert it to module
- Loading branch information
1 parent
b070bac
commit 71eb43c
Showing
7 changed files
with
142 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
{ | ||
imports = [ | ||
./cli | ||
./desktop.nix | ||
./desktop | ||
./emacs | ||
./i3 | ||
./kitty.nix | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ config, pkgs, lib, ... }: | ||
|
||
{ | ||
options.home-manager.desktop.chromium.enable = lib.mkEnableOption "Chromium config" // { | ||
default = config.home-manager.desktop.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.chromium.enable { | ||
programs.chromium = { | ||
enable = true; | ||
package = pkgs.chromium.override { | ||
enableWideVine = true; | ||
}; | ||
extensions = [ | ||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin | ||
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; } # vimium-c | ||
]; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ config, pkgs, lib, ... }: | ||
|
||
{ | ||
imports = [ | ||
./chromium.nix | ||
./firefox.nix | ||
]; | ||
|
||
options.home-manager.desktop.enable = lib.mkDefaultOption "desktop config"; | ||
|
||
config = lib.mkIf config.home-manager.desktop.enable { | ||
home.packages = with pkgs; [ | ||
android-file-transfer | ||
audacious | ||
(calibre.override { unrarSupport = true; }) | ||
(cinnamon.nemo-with-extensions.override { extensions = with cinnamon; [ nemo-fileroller ]; }) | ||
desktop-file-utils | ||
ffmpeg | ||
gammastep | ||
gimp | ||
gnome.evince | ||
gnome.file-roller | ||
gnome.gnome-disk-utility | ||
gthumb | ||
inkscape | ||
libreoffice-fresh | ||
open-browser | ||
(mcomix.override { unrarSupport = true; }) | ||
pavucontrol | ||
pinta | ||
qalculate-gtk | ||
vlc | ||
xclip | ||
xdotool | ||
xdragon | ||
xorg.xdpyinfo | ||
xorg.xhost | ||
xorg.xkill | ||
xorg.xset | ||
zoom-us | ||
]; | ||
|
||
services = { | ||
easyeffects.enable = true; | ||
udiskie = { | ||
enable = true; | ||
tray = "always"; | ||
}; | ||
}; | ||
|
||
xdg = { | ||
# Some applications like to overwrite this file, so let's just force it | ||
configFile."mimeapps.list".force = true; | ||
|
||
mimeApps = { | ||
enable = true; | ||
defaultApplications = { | ||
"application/pdf" = "org.gnome.Evince.desktop"; | ||
"image/gif" = "org.gnome.gThumb.desktop"; | ||
"image/jpeg" = "org.gnome.gThumb.desktop"; | ||
"image/png" = "org.gnome.gThumb.desktop"; | ||
"inode/directory" = "nemo.desktop"; | ||
"text/html" = "open-browser.desktop"; | ||
"text/plain" = "emacs.desktop"; | ||
"text/x-makefile" = "emacs.desktop"; | ||
"x-scheme-handler/about" = "open-browser.desktop"; | ||
"x-scheme-handler/http" = "open-browser.desktop"; | ||
"x-scheme-handler/https" = "open-browser.desktop"; | ||
"x-scheme-handler/unknown" = "open-browser.desktop"; | ||
}; | ||
}; | ||
|
||
userDirs = { | ||
enable = true; | ||
createDirectories = true; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ config, lib, osConfig, ... }: | ||
|
||
let | ||
inherit (config.home) username; | ||
subpixelRender = (osConfig.fonts.fontconfig.antialias or false) && | ||
(osConfig.fonts.fontconfig.subpixel.rgba != "none"); | ||
in | ||
{ | ||
options.home-manager.desktop.firefox.enable = lib.mkEnableOption "Firefox config" // { | ||
default = config.home-manager.desktop.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.firefox.enable { | ||
programs.firefox = { | ||
enable = true; | ||
profiles.${username} = { | ||
settings = { | ||
# disable annoyinh Ctrl+Q shortcut | ||
"browser.quitShortcut.disabled" = true; | ||
# enable hw video acceleration, if supported | ||
"media.ffmpeg.vaapi.enabled" = true; | ||
# handpicked settings from: https://github.com/arkenfox/user.js/blob/master/user.js | ||
# ads | ||
"browser.newtabpage.activity-stream.showSponsored" = false; | ||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false; | ||
"extensions.htmlaboutaddons.recommendations.enabled" = false; | ||
"browser.urlbar.suggest.quicksuggest.sponsored" = false; | ||
# telemetry | ||
"datareporting.policy.dataSubmissionEnable" = false; | ||
"datareporting.healthreport.uploadEnabled" = false; | ||
"app.shield.optoutstudies.enabled" = false; | ||
"app.normandy.enabled" = false; | ||
"browser.tabs.crashReporting.sendReport" = false; | ||
} // lib.optionalAttrs subpixelRender { | ||
# https://pandasauce.org/get-fonts-done/ | ||
"gfx.text.subpixel-position.force-enabled" = true; | ||
"gfx.webrender.quality.force-subpixel-aa-where-possible" = true; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.