feat: add printer stuff

This commit is contained in:
2024-02-03 18:03:54 +01:00
parent da3501c0ee
commit e671e2e081
10 changed files with 164 additions and 29 deletions

26
home/clean-home-dir.nix Normal file
View File

@@ -0,0 +1,26 @@
{config, ...}: {
xdg.enable = true;
xdg.userDirs.enable = true;
home.sessionVariables = {
HISTFILE = "${config.xdg.stateHome}/bash/history";
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/config";
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
_JAVA_OPTGRADLE_USER_HOMEIONS = ''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
PYTHON_HISTORY = "${config.xdg.stateHome}/python/history";
PYTHONCACHEPREFIX = "${config.xdg.cacheHome}/python";
PYTHONUSERBASE = "${config.xdg.dataHome}/python";
WGETRC = "${config.xdg.configHome}/wgetrc";
XCOMPOSEFILE = "${config.xdg.configHome}/X11/xcompose";
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
};
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
programs.gpg.homedir = "${config.xdg.configHome}/gnupg";
xdg.configFile.wgetrc.text = ''
hsts-file="${config.xdg.cacheHome}/wget-hsts"
'';
}

View File

@@ -10,16 +10,11 @@
inherit username stateVersion;
homeDirectory = "/home/${username}";
};
xdg.userDirs = {
enable = true;
extraConfig = {
XDG_PROJECTS_DIR = "${home.homeDirectory}/Projects";
};
};
imports = [
inputs.ags.homeManagerModules.default
inputs.nixvim.homeManagerModules.nixvim
inputs.anyrun.homeManagerModules.default
./clean-home-dir.nix
./programs/neovide.nix
./packages
./programs

View File

@@ -17,6 +17,8 @@
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1"
"__GL_GSYNC_ALLOWED,0"
"__GL_VRR_ALLOWED,0"
"NIXOS_OZONE_WL,1"
# Fixes black screen on Jellyfin
# https://github.com/jellyfin/jellyfin-media-player/issues/165#issuecomment-1569842393

View File

@@ -9,7 +9,6 @@
libxcrypt
# browsers
firefox-wayland
chromium
brave
@@ -60,6 +59,11 @@
avalonia-ilspy
ghidra
# 3d printing
lpc21isp
dfu-util
cura
# gaming
steam
oversteer

View File

@@ -1,21 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
pkgs,
}:
stdenv.mkDerivation rec {
name = "firefox-gnome-theme";
version = "116.0.0";
src = fetchFromGitHub {
owner = "rafaelmardojai";
repo = "firefox-gnome-theme";
sparseCheckout = ["scripts"];
rev = "v116";
sha256 = "0IS5na2WRSNWNygHhmZOcXhdrx2aFhCDQY8XVVeHf8Q=";
};
installPhase = ''
mkdir -p $out/bin
cp scripts/install-by-curl.sh $out/bin/install-firefox-gnome-theme
'';
}

View File

@@ -5,6 +5,8 @@
git = import ./git.nix;
lazygit.enable = true;
nixvim = import ./nixvim.nix {inherit pkgs;};
firefox = import ./firefox.nix {inherit pkgs;};
gpg.enable = true;
btop = {
enable = true;
settings = {

80
home/programs/firefox.nix Normal file
View File

@@ -0,0 +1,80 @@
{pkgs}: {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
Pocket = false;
Snippets = false;
TopSites = true;
Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
};
profiles.default = {
id = 0;
name = "default";
isDefault = true;
bookmarks = [
{
name = "Monkeytype";
url = "https://monkeytype.com/";
}
{
name = "YouTube";
url = "https://youtube.com/";
}
];
search = {
force = true;
default = "Google";
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
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"];
};
"Wikipedia (en)".metaData.alias = "@wiki";
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
ublacklist
sponsorblock
bitwarden
];
};
}