Compare commits
2 commits
4211520d26
...
1c632d6245
Author | SHA1 | Date | |
---|---|---|---|
1c632d6245 | |||
43f4c0539d |
8 changed files with 162 additions and 120 deletions
home
|
@ -1,10 +0,0 @@
|
|||
[Aa]rch*)
|
||||
read_ascii 4 <<- EOF
|
||||
${c6} /\\
|
||||
${c6} / \\
|
||||
${c6} /\\ \\
|
||||
${c4} / ^ w ^\\
|
||||
${c4} / ,, \\
|
||||
${c4} / | | \\
|
||||
${c4} /_-'' ''-_\\
|
||||
EOF
|
|
@ -1,42 +1,51 @@
|
|||
# locale
|
||||
# =================================================================== LOCALE ==
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_COLLATE=C
|
||||
|
||||
# ================================================================== PROFILE ==
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
export LIBSEAT_BACKEND=logind
|
||||
|
||||
# Guix
|
||||
. "$HOME/.guix-home/setup-environment"
|
||||
"$HOME/.guix-home/on-first-login"
|
||||
export GUIX_PROFILE
|
||||
|
||||
# NixOS
|
||||
if [ -f "/run/current-system/profile/etc/profile.d/nix.sh" ]; then
|
||||
source /run/current-system/profile/etc/profile.d/nix.sh
|
||||
fi
|
||||
|
||||
# ~/.local
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"
|
||||
|
||||
# =================================================================== CONFIG ==
|
||||
|
||||
# wayland
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
export WLR_NO_HARDWARE_CURSORS=0
|
||||
export GDK_BACKEND=wayland,x11
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export CLUTTER_BACKEND=wayland
|
||||
export ELM_DISPLAY=wl
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
||||
export QT_QPA_PLATFORM="wayland;xcb"
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# xdg
|
||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export LIBSEAT_BACKEND=logind
|
||||
export GDK_BACKEND=wayland,x11
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
|
||||
# java
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
# mozilla
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
|
||||
# qt
|
||||
export QT_QPA_PLATFORM="wayland;xcb"
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# programs
|
||||
export TERMINAL=kitty
|
||||
export EDITOR=nvim
|
||||
export CC=$(which gcc)
|
||||
export LD=$(which gcc)
|
||||
|
||||
# nvidia
|
||||
#export LIBVA_DRIVER_NAME=nvidia
|
||||
#export GBM_BACKEND=nvidia-drm
|
||||
#export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
#export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
#export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
|
||||
# nvk
|
||||
#export MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||
#export NOUVEAU_USE_ZINK=1
|
||||
export CC="$(which gcc)"
|
||||
export LD="$(which gcc)"
|
||||
|
||||
# ricing
|
||||
export QT_QPA_PLATFORM_THEME=gtk2
|
||||
|
@ -44,32 +53,21 @@ export GTK_THEME=Orchis-Teal-Dark
|
|||
export XCURSOR_THEME=Adwaita
|
||||
export XCURSOR_SIZE=24
|
||||
|
||||
# guix
|
||||
export GUIX_PROFILE=$HOME/.guix-profile
|
||||
$HOME/.guix-home/on-first-login
|
||||
. $HOME/.guix-home/setup-environment
|
||||
|
||||
# nix
|
||||
export NIX_PROFILE=$HOME/.nix-profile
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$NIX_PROFILE/share
|
||||
export PATH=$PATH:$NIX_PROFILE/bin
|
||||
export LIBRARY_PATH=$LIBRARY_PATH:$NIX_PROFILE/lib
|
||||
|
||||
# local
|
||||
export LOCAL_PROFILE=$HOME/.local
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$LOCAL_PROFILE/share
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$LOCAL_PROFILE/share/flatpak/exports/share
|
||||
export PATH=$PATH:$LOCAL_PROFILE/bin
|
||||
|
||||
# certs
|
||||
export SSL_CERT_FILE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt
|
||||
export SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs
|
||||
|
||||
# ==================================================================== ENTRY ==
|
||||
|
||||
# dont prompt tmux to start
|
||||
# another graphical env
|
||||
if [ -n "$TMUX" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# prompt the user logging in (me)
|
||||
# for which graphical env i want to use
|
||||
|
||||
clear
|
||||
printf "\t\n\t\n\t\n\t\n"
|
||||
printf "\tPlease select an environment...\n"
|
||||
|
|
|
@ -15,31 +15,31 @@
|
|||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nixgl,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
overlays = [
|
||||
nixgl.overlay
|
||||
];
|
||||
username = "freya";
|
||||
in {
|
||||
homeConfigurations."freya" =
|
||||
homeConfigurations.${username} =
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
{nixpkgs.overlays = overlays;}
|
||||
./home.nix
|
||||
{
|
||||
({
|
||||
_module.args = {
|
||||
inherit nixgl;
|
||||
};
|
||||
}
|
||||
nixpkgs.overlays = [ nixgl.overlay ];
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./programs
|
||||
./programs/firefox.nix
|
||||
./programs/home-manager.nix
|
||||
];
|
||||
|
||||
news.display = "silent";
|
||||
fonts.fontconfig.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
username = "freya";
|
||||
homeDirectory = "/home/freya";
|
||||
stateVersion = "25.05";
|
||||
|
||||
packages = with pkgs; [
|
||||
# shell
|
||||
starship
|
||||
|
@ -27,13 +25,7 @@
|
|||
rust-analyzer
|
||||
cargo
|
||||
clippy
|
||||
# unity
|
||||
unityhub
|
||||
# libs
|
||||
openssl
|
||||
libgcc
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./firefox.nix
|
||||
];
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, nixgl, ... }:
|
||||
let
|
||||
# quick variables to specify
|
||||
# locked true/false
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
|
@ -8,39 +10,60 @@
|
|||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
|
||||
# path to nixGL binary (needed for webGL)
|
||||
nixGL = "${nixgl.packages.${pkgs.system}.nixGLIntel}/bin/nixGLIntel";
|
||||
my-firefox = (pkgs.firefox.override {
|
||||
extraPrefs = ''
|
||||
//
|
||||
|
||||
// Automatically click cookiebanners although uBlock Origin might block them
|
||||
lockPref("cookiebanners.bannerClicking.enabled", true);
|
||||
lockPref("cookiebanners.service.mode", 2);
|
||||
lockPref("cookiebanners.service.mode.privateBrowsing", 2);
|
||||
# modify firefox base package AND wrapper
|
||||
# - set user prefs
|
||||
# - fix webGL
|
||||
my-firefox = (pkgs.firefox.override { # start wrapper override
|
||||
|
||||
// DNT although PrivacyBadger from policy handles this
|
||||
lockPref("privacy.donottrackheader.enabled", true);
|
||||
lockPref("privacy.donottrackheader.value", 1);
|
||||
# file: mozilla.cfg
|
||||
# modifies user prefs that firefox would normally not
|
||||
# let me hardcode. i want to hardcode them.
|
||||
extraPrefs = ''//
|
||||
|
||||
// New sidebar
|
||||
lockPref("sidebar.revamp", true);
|
||||
lockPref("sidebar.verticalTabs", true);
|
||||
lockPref("sidebar.visibility", "always-show");
|
||||
lockPref("sidebar.main.tools", "");
|
||||
// Automatically click cookiebanners although uBlock Origin might block them
|
||||
lockPref("cookiebanners.bannerClicking.enabled", true);
|
||||
lockPref("cookiebanners.service.mode", 2);
|
||||
lockPref("cookiebanners.service.mode.privateBrowsing", 2);
|
||||
|
||||
//
|
||||
'';
|
||||
}).overrideAttrs (old: {
|
||||
// DNT although PrivacyBadger from policy handles this
|
||||
lockPref("privacy.donottrackheader.enabled", true);
|
||||
lockPref("privacy.donottrackheader.value", 1);
|
||||
|
||||
// New sidebar
|
||||
lockPref("sidebar.revamp", true);
|
||||
lockPref("sidebar.verticalTabs", true);
|
||||
lockPref("sidebar.visibility", "always-show");
|
||||
lockPref("sidebar.main.tools", "history,bookmarks");
|
||||
|
||||
//'';
|
||||
|
||||
}) # end wrapper override
|
||||
.overrideAttrs (old: { # start base package override
|
||||
|
||||
# modify run (build) command for firefox so that
|
||||
# we can always have nixGL be called first before firefox
|
||||
# ... this fixes webGL on GNU/Guix. this is likely not needed if you
|
||||
# are just running nixOS
|
||||
buildCommand = old.buildCommand + ''
|
||||
sed -i "s#firefox-wrapped\"#firefox-wrapped\" \"${nixGL}\"#1" "$out/bin/firefox"
|
||||
'';
|
||||
});
|
||||
}); # end base package override
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
|
||||
# enable firefox and
|
||||
# pass in our custom (modified) package from above
|
||||
enable = true;
|
||||
package = my-firefox;
|
||||
|
||||
# set firefox policies that i want
|
||||
# (all that can be modified by firefox policy templates)
|
||||
# see: https://mozilla.github.io/policy-templates/
|
||||
policies = {
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
|
@ -208,12 +231,19 @@
|
|||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/foxyproxy-standard/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Redirector
|
||||
"redirector@einaregilsson.com" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/redirector/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
|
||||
# about:config Preferences
|
||||
# ... set policies that cannot be set using policies.json directly
|
||||
Preferences = {
|
||||
# theme
|
||||
# allow userChrom.css
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true;
|
||||
# dark theme
|
||||
"extensions.activeThemeID" = {
|
||||
Value = "firefox-compact-dark@mozilla.org";
|
||||
Status = "locked";
|
||||
|
@ -224,12 +254,12 @@
|
|||
};
|
||||
# homepage
|
||||
"browser.startup.homepage" = {
|
||||
Value = " about:home";
|
||||
Value = "about:home";
|
||||
Status = "locked";
|
||||
};
|
||||
"browser.newtabpage.enabed" = lock-true;
|
||||
"browser.newtabpage.url" = {
|
||||
Value = " about:home";
|
||||
Value = "about:home";
|
||||
Status = "locked";
|
||||
};
|
||||
# autofill
|
||||
|
@ -270,6 +300,7 @@
|
|||
"dom.webgpu.enabled" = lock-true;
|
||||
"media.eme.enabled" = lock-true;
|
||||
# user messaging
|
||||
# ... disable shit that is annoying
|
||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||
|
@ -313,6 +344,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
# create profile for me :3
|
||||
profiles = {
|
||||
"freya" = {
|
||||
search = {
|
||||
|
@ -326,18 +358,31 @@
|
|||
"Twitter".metaData.hidden = true;
|
||||
};
|
||||
};
|
||||
|
||||
# firefox doesnt make styling the toolbar easy using about:config
|
||||
# since its just a massive json string. so i did it here in css.
|
||||
userChrome = ''
|
||||
#sidebar-header { display:none !important; }
|
||||
#sidebar-search-container { display:none !important; }
|
||||
#firefox-view-button {
|
||||
visibility: collapse;
|
||||
}
|
||||
#alltabs-button {
|
||||
visibility: collapse;
|
||||
}
|
||||
#tabbrowser-tabs {
|
||||
border-inline-start: none !important;
|
||||
}
|
||||
/* sidebar hack to flip contents the way i want them (arrows on the left) */
|
||||
#nav-bar-customization-target {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
/* remove broken padding from sidebar hack */
|
||||
#unified-extensions-button {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
/* remove padding beside search bar */
|
||||
toolbarspring {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* remove overflow menu and everything in it */
|
||||
#nav-bar-overflow-button,
|
||||
#firefox-view-button,
|
||||
#alltabs-button {
|
||||
visibility: collapse;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
7
home/nix/programs/home-manager.nix
Normal file
7
home/nix/programs/home-manager.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
15
home/nix/programs/nix-ld.nix
Normal file
15
home/nix/programs/nix-ld.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs , ... }:
|
||||
|
||||
{
|
||||
programs.nix-ld = {
|
||||
# Enable Nix ld to allow precompiled executables not set for NixOS to run
|
||||
enable = true;
|
||||
|
||||
# Sets up all the libraries to load
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
openssl
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue