mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-05-02 11:49:33 +00:00
~
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
062c447374
commit
c38f040574
21 changed files with 5 additions and 4 deletions
81
nixos/home/base.nix
Normal file
81
nixos/home/base.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
nixpkgs.overlays = import ../overlays.nix inputs;
|
||||
|
||||
home = {
|
||||
stateVersion = "24.11";
|
||||
username = "rae";
|
||||
homeDirectory = "/home/rae";
|
||||
sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
TERM = "kitty";
|
||||
};
|
||||
file = {
|
||||
".twmrc".source = ../../configs/twm;
|
||||
".local/share/themes".source = ../../configs/openbox/themes;
|
||||
};
|
||||
};
|
||||
xdg.configFile = {
|
||||
"openbox".source = ../../configs/openbox;
|
||||
"rmpc".source = ../../configs/rmpc;
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
set -g fish_greeting
|
||||
'';
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "roxwize";
|
||||
userEmail = "rae@roxwize.xyz";
|
||||
};
|
||||
kitty = {
|
||||
enable = true;
|
||||
font.name = "Fira Code";
|
||||
themeFile = "mayukai";
|
||||
};
|
||||
rofi = {
|
||||
enable = true;
|
||||
font = "Fira Code Light 11";
|
||||
terminal = "kitty";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
flameshot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
showStartupLaunchMessage = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/mnt/world/music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "main"
|
||||
}
|
||||
log_file "/tmp/mpd.log"
|
||||
'';
|
||||
};
|
||||
mpdris2 = {
|
||||
enable = true;
|
||||
mpd.musicDirectory = "/mnt/world/music";
|
||||
multimediaKeys = true;
|
||||
notifications = true;
|
||||
};
|
||||
mpris-proxy.enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme.name = "Posy's Cursor";
|
||||
theme.name = "io.elementary.stylesheet.blueberry";
|
||||
};
|
||||
}
|
33
nixos/home/dconf.nix
Normal file
33
nixos/home/dconf.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ ... }: {
|
||||
dconf.settings = {
|
||||
"io/elementary/code/settings" = {
|
||||
font = "Fira Code Light 10";
|
||||
use-system-font = false;
|
||||
};
|
||||
"net/launchpad/plank/docks/dock1" = {
|
||||
dock-items = [
|
||||
"gala-multitaskingview.dockitem"
|
||||
"firefox.dockitem"
|
||||
"io.elementary.terminal.dockitem"
|
||||
"codium.dockitem"
|
||||
"io.elementary.settings.dockitem"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file://" + builtins.toString /home/rae/.dotfiles/assets/wallpapers/current;
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
accent-color = "blue";
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = ":minimize,maximize,close";
|
||||
};
|
||||
"org/pantheon/desktop/gala/appearance" = {
|
||||
button-layout = ":minimize,maximize,close";
|
||||
};
|
||||
"org/pantheon/desktop/gala/behavior" = {
|
||||
hotcorner-bottomright = "show-workspace-view";
|
||||
};
|
||||
};
|
||||
}
|
12
nixos/home/default.nix
Normal file
12
nixos/home/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./base.nix
|
||||
|
||||
./dconf.nix
|
||||
./firefox.nix
|
||||
./neovim.nix
|
||||
./polybar.nix
|
||||
./vscode.nix
|
||||
./yambar.nix
|
||||
];
|
||||
}
|
143
nixos/home/firefox.nix
Normal file
143
nixos/home/firefox.nix
Normal file
|
@ -0,0 +1,143 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
ExtensionUpdate = false;
|
||||
FirefoxHome = {
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
SponsoredPocket = false;
|
||||
};
|
||||
FirefoxSuggest = {
|
||||
SponsoredSuggestions = false;
|
||||
};
|
||||
};
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
canvasblocker
|
||||
catppuccin-gh-file-explorer
|
||||
indie-wiki-buddy
|
||||
privacy-badger
|
||||
stylus
|
||||
tabliss
|
||||
ublock-origin
|
||||
user-agent-string-switcher
|
||||
violentmonkey
|
||||
];
|
||||
settings = {
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.newtabpage.activity-stream.default.sites" = "https://en.wikipedia.org/";
|
||||
"browser.newtabpage.activity-stream.discoverystream.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
|
||||
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "dark-beach";
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.topSitesRows" = 2;
|
||||
"browser.newtabpage.pinned" = [
|
||||
{
|
||||
url = "https://discord.com/app/";
|
||||
label = "Discord";
|
||||
}
|
||||
{
|
||||
url = "https://en.wikipedia.org/";
|
||||
label = "Wikipedia";
|
||||
}
|
||||
];
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"font.name.monospace.x-western" = "Fira Code";
|
||||
"layout.css.prefers-color-scheme.content-override" = 0;
|
||||
};
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "CUPS interface";
|
||||
url = "http://127.0.0.1:631/";
|
||||
}
|
||||
{
|
||||
name = "Pinky & Pepper Forever";
|
||||
url = "https://www.silversprocket.net/2020/05/02/pinky-and-pepper-forever-by-eddy-atoms-part-1-of-2/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Nix sites";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "NixOS search";
|
||||
url = "https://search.nixos.org/packages";
|
||||
}
|
||||
{
|
||||
name = "Home Manager search";
|
||||
url = "https://home-manager-options.extranix.com/";
|
||||
}
|
||||
{
|
||||
name = "NUR search";
|
||||
url = "https://nur.nix-community.org/";
|
||||
}
|
||||
{
|
||||
name = "NixOS wiki";
|
||||
url = "https://nixos.wiki/";
|
||||
}
|
||||
{
|
||||
name = "Nix functions";
|
||||
url = "https://teu5us.github.io/nix-lib.html";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
search = {
|
||||
default = "DuckDuckGo";
|
||||
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";
|
||||
};
|
||||
"Home Manager options" = {
|
||||
urls = [{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{ name = "release"; value = "release-24.11"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
};
|
||||
"Manpages" = {
|
||||
urls = [{
|
||||
template = "https://www.mankier.com/";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
};
|
||||
|
||||
"Bing".metaData.hidden = true;
|
||||
"Google".metaData.hidden = true;
|
||||
};
|
||||
order = [ "DuckDuckGo" "Nix packages" ];
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
63
nixos/home/neovim.nix
Normal file
63
nixos/home/neovim.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
cmp_luasnip
|
||||
cmp-nvim-lsp
|
||||
luasnip
|
||||
nvim-cmp
|
||||
nvim-lspconfig
|
||||
rustaceanvim
|
||||
vim-just
|
||||
vim-sleuth
|
||||
vim-wakatime
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.number = true
|
||||
|
||||
-- cmp
|
||||
local cmp = require("cmp")
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
mapping = {
|
||||
['<C-up>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-down>'] = cmp.mapping.select_next_item(),
|
||||
['<C-space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<tab>'] = cmp.mapping.confirm { select = true }
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }
|
||||
})
|
||||
}
|
||||
|
||||
local caps = vim.tbl_deep_extend(
|
||||
"force",
|
||||
vim.lsp.protocol.make_client_capabilities(),
|
||||
require("cmp_nvim_lsp").default_capabilities(),
|
||||
{ workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } }
|
||||
)
|
||||
|
||||
-- lspconfig
|
||||
local lc = require("lspconfig")
|
||||
|
||||
lc.nil_ls.setup {
|
||||
autostart = true,
|
||||
capabilities = caps,
|
||||
cmd = { "nil" }
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
100
nixos/home/polybar.nix
Normal file
100
nixos/home/polybar.nix
Normal file
|
@ -0,0 +1,100 @@
|
|||
{ ... }: {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
script = "polybar &";
|
||||
settings =
|
||||
let
|
||||
background = "#0000";
|
||||
foreground = "#030910";
|
||||
color0 = "#d9eafd";
|
||||
color1 = "#bcccdc";
|
||||
color2 = "#9aa6b2";
|
||||
in {
|
||||
"global/wm" = {
|
||||
margin-top = 2;
|
||||
margin-bottom = 2;
|
||||
};
|
||||
"bar/top" = {
|
||||
background = background;
|
||||
foreground = foreground;
|
||||
width = "100%";
|
||||
height = 32;
|
||||
font-0 = "GohuFont:style=Regular:size=11:antialias=false;3";
|
||||
modules-left = "xworkspaces audio";
|
||||
modules-right = "cpu memory date";
|
||||
module-margin = 1;
|
||||
offset-y = 14;
|
||||
padding = 2;
|
||||
bottom = true;
|
||||
dpi-x = 96;
|
||||
dpi-y = 96;
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
label = "CPU: %percentage%%";
|
||||
label-background = color0;
|
||||
label-padding = 2;
|
||||
interval = 2;
|
||||
};
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
label = "RAM: %percentage_used%%";
|
||||
label-background = color1;
|
||||
label-padding = 2;
|
||||
interval = 2;
|
||||
};
|
||||
"module/xwindow" = {
|
||||
type = "internal/xwindow";
|
||||
label-active-font = 0;
|
||||
};
|
||||
"module/xworkspaces" = {
|
||||
type = "internal/xworkspaces";
|
||||
enable-scroll = false;
|
||||
label-active = "%name%";
|
||||
label-active-background = color1;
|
||||
label-active-padding = 1;
|
||||
label-occupied = "%name%";
|
||||
label-occupied-background = color2;
|
||||
label-occupied-padding = 1;
|
||||
label-empty = "%name%";
|
||||
label-empty-foreground = "#fff";
|
||||
label-empty-padding = 1;
|
||||
label-urgent = "%name%";
|
||||
label-urgent-background = color0;
|
||||
label-urgent-padding = 1;
|
||||
};
|
||||
"module/audio" = {
|
||||
type = "internal/alsa";
|
||||
master-soundcard = "hw:1";
|
||||
master-mixer = "Master";
|
||||
format-volume = "<label-volume>";
|
||||
format-muted = "<label-muted>";
|
||||
label-volume = "VOL: %percentage%%";
|
||||
label-muted = "VOL: 0%";
|
||||
label-volume-background = color0;
|
||||
label-volume-padding = 2;
|
||||
label-muted-background = color0;
|
||||
label-muted-padding = 2;
|
||||
click-right = "pavucontrol";
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BAT0";
|
||||
adapter = "ADP1";
|
||||
label-charging = "BAT: %percentage%%++";
|
||||
label-discharging = "BAT: %percentage%%";
|
||||
label-background = color1;
|
||||
label-padding = 2;
|
||||
};
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
date = "%b %d %y";
|
||||
time = "%I:%M %p";
|
||||
label-background = color2;
|
||||
label-padding = 2;
|
||||
interval = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
55
nixos/home/vscode.nix
Normal file
55
nixos/home/vscode.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
editorconfig.editorconfig
|
||||
esbenp.prettier-vscode
|
||||
jnoortheen.nix-ide
|
||||
llvm-vs-code-extensions.vscode-clangd
|
||||
mesonbuild.mesonbuild
|
||||
ms-vscode.live-server
|
||||
rust-lang.rust-analyzer
|
||||
skellock.just
|
||||
vadimcn.vscode-lldb
|
||||
wakatime.vscode-wakatime
|
||||
];
|
||||
userSettings =
|
||||
let
|
||||
df = lang: formatter: {
|
||||
name = "[" + lang + "]";
|
||||
value = {
|
||||
"editor.defaultFormatter" = formatter;
|
||||
};
|
||||
};
|
||||
in {
|
||||
"editor.fontFamily" = "'Fira Code Light', monospace";
|
||||
# "editor.fontLigatures" = true;
|
||||
"editor.formatOnSave" = false;
|
||||
"editor.indentSize" = 4;
|
||||
"editor.tabSize" = 4;
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"mesonbuild.buildFolder" = "build";
|
||||
"prettier.tabWidth" = 4;
|
||||
"prettier.trailingComma" = "none";
|
||||
"prettier.singleAttributePerLine" = false;
|
||||
"prettier.useEditorConfig" = true;
|
||||
"svelte.enable-ts-plugin" = true;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"workbench.activityBar.iconClickBehavior" = "toggle";
|
||||
"workbench.activityBar.location" = "bottom";
|
||||
"workbench.colorTheme" = "Catppuccin Frappé";
|
||||
"workbench.iconTheme" = "catppuccin-frappe";
|
||||
} // builtins.listToAttrs [
|
||||
(df "css" "esbenp.prettier-vscode")
|
||||
(df "html" "esbenp.prettier-vscode")
|
||||
(df "typescript" "esbenp.prettier-vscode")
|
||||
(df "javascript" "esbenp.prettier-vscode")
|
||||
];
|
||||
};
|
||||
}
|
85
nixos/home/yambar.nix
Normal file
85
nixos/home/yambar.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.yambar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bar = {
|
||||
location = "top";
|
||||
height = 18;
|
||||
background = "00000088";
|
||||
font = "GohuFont:style=Regular:pixelsize=11";
|
||||
margin = 16;
|
||||
spacing = 3;
|
||||
|
||||
left = [
|
||||
{
|
||||
# https://codeberg.org/dnkl/yambar/issues/53#issuecomment-264088
|
||||
script = {
|
||||
#? or /run/current-system/sw/bin/playerctl
|
||||
path = "${pkgs.playerctl}/bin/playerctl";
|
||||
args = [
|
||||
"--follow"
|
||||
"metadata"
|
||||
"--format"
|
||||
''
|
||||
status|string|{{status}}
|
||||
artist|string|{{artist}}
|
||||
title|string|{{title}}
|
||||
''
|
||||
];
|
||||
content.map.conditions = {
|
||||
"status == Playing && artist != \"\"" = {
|
||||
string.text = "{artist} - {title}";
|
||||
};
|
||||
"status == Playing && artist == \"\"" = {
|
||||
string.text = "{title}";
|
||||
};
|
||||
"status != Playing" = {
|
||||
string.text = "god's in his heaven | all's right with the world";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
battery = {
|
||||
name = "BAT0";
|
||||
content.map.conditions."state != unknown".string.text = "bat {capacity}% |";
|
||||
};
|
||||
}
|
||||
{
|
||||
pipewire = {
|
||||
content.map.conditions."type == sink".string = {
|
||||
text = "vol {cubic_volume}% |";
|
||||
on-click = {
|
||||
left = "pavucontrol";
|
||||
wheel-up = "amixer sset Master 1%+";
|
||||
wheel-down = "amixer sset Master 1%-";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
cpu = {
|
||||
poll-interval = 2000;
|
||||
content.map.conditions."id < 0".string.text = "cpu {cpu}%";
|
||||
};
|
||||
}
|
||||
{
|
||||
mem = {
|
||||
poll-interval = 2000;
|
||||
content.string.text = "ram {percent_used}% |";
|
||||
};
|
||||
}
|
||||
{
|
||||
clock = {
|
||||
date-format = "%b %d %y";
|
||||
time-format = "%I:%M %p";
|
||||
content.string.text = "{date} {time}";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue