1
Fork 0

A billion changes, but I'm finally on this new config!

This commit is contained in:
Matei Adriel 2023-01-12 20:49:08 +01:00
parent 8b12288df6
commit c211604042
No known key found for this signature in database
29 changed files with 338 additions and 163 deletions

View file

@ -23,5 +23,6 @@
neofetch # Display system information
unzip # For working with .zip files
unrar # For extracting shit from rars
sloc # Useless but fun line of code counter
];
}

View file

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
let base16-alacritty = pkgs.fetchFromGitHub {
owner = "aarowill";
repo = "base16-alacritty";
sha256 = "0zibl9kzazckkyzb6j0iabrl82r1kgwg8ndqpy7dz0kwmj42wfx0";
rev = "914727e48ebf3eab1574e23ca0db0ecd0e5fe9d0";
};
in
{
programs.alacritty = {
enable = true;
settings = {
import = [ (config.scheme base16-alacritty) ];
window.decorations = "none";
window.padding = {
x = 4;
y = 4;
};
fonts.normal.family = config.fontProfiles.monospace.family;
env = { TERM = "xterm-256color"; };
working_directory = "${config.home.homeDirectory}/Projects/";
};
};
}

View file

@ -0,0 +1,107 @@
{ pkgs, ... }:
let
mkBasicSearchEngine = { aliases, url, param }: {
urls = [{
template = url;
params = [
{ name = param; value = "{searchTerms}"; }
];
}];
definedAliases = aliases;
};
mkNixPackagesEngine = { aliases, type }:
let basicEngine = mkBasicSearchEngine
{
aliases = aliases;
url = "https://search.nixos.org/${type}";
param = "query";
};
in
basicEngine // {
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
};
in
{
programs.firefox = {
enable = true;
profiles.adrielus = {
# Unique user id
id = 0;
# Make this the default user
isDefault = true;
# Forcefully replace the search configuration
search.force = true;
# Set default search engine
search.default = "Google";
# Specify custom search engines
search.engines = {
"Nix Packages" = mkNixPackagesEngine {
aliases = [ "@np" "@nix-packages" ];
type = "packages";
};
"Nix options" = mkNixPackagesEngine {
aliases = [ "@no" "@nix-options" ];
type = "options";
};
# Purescript packages
"Pursuit" = mkBasicSearchEngine {
url = "https://pursuit.purescript.org/search";
param = "s";
aliases = [ "@ps" "@pursuit" ];
};
"Wikipedia" = mkBasicSearchEngine {
url = "https://en.wikipedia.org/wiki/Special:Search";
param = "search";
aliases = [ "@wk" "@wikipedia" ];
};
"Github" = mkBasicSearchEngine {
url = "https://github.com/search";
param = "q";
aliases = [ "@gh" "@github" ];
};
"Youtube" = mkBasicSearchEngine {
url = "https://www.youtube.com/results";
param = "search_query";
aliases = [ "@yt" "@youtube" ];
};
"Noita wiki" = mkBasicSearchEngine {
url = "https://noita.wiki.gg/index.php";
param = "search";
aliases = [ "@noita" ];
};
"Rain world wiki" = mkBasicSearchEngine {
url = "https://rainworld.miraheze.org/w/index.php";
param = "search";
aliases = [ "@rw" "@rain-world" ];
};
"Factorio wiki" = mkBasicSearchEngine {
url = "https://wiki.factorio.com/index.php";
param = "search";
aliases = [ "@fw" "@factorio-wiki" ];
};
"Factorio mod portal" = mkBasicSearchEngine {
url = "https://mods.factorio.com/";
param = "query";
aliases = [ "@fm" "@factorio-mods" ];
};
"Google".metaData.alias = "@g";
};
};
};
}

View file

@ -17,15 +17,15 @@ in
enable = true;
extraConfig = ''
; Generated theme
include-file = ${config.scheme base16-polybar}
${builtins.readFile (config.scheme base16-polybar)}
; Consistent fonts
[fonts]
regular = ${config.fontProfiles.regular.family}
monospace = ${config.fontProfiles.monospace.family}
regular = "${config.fontProfiles.regular.family}"
monospace = "${config.fontProfiles.monospace.family}"
; Actual config
include-file = ${./polybar.ini}
${builtins.readFile ./polybar.ini}
'';
};

View file

@ -73,13 +73,13 @@ icon-default = 
format = <label-state>
label-active = %icon%
label-active-background = ${color.base05}
label-active-foreground = ${color.base00}
label-active-background = ${colors.base05}
label-active-foreground = ${colors.base00}
label-active-padding = 2
label-urgent = %icon%
label-urgent-background = ${color.base09}
label-urgent-foreground = ${color.base00}
label-urgent-background = ${colors.base09}
label-urgent-foreground = ${colors.base00}
label-urgent-padding = 2
label-occupied = %icon%
@ -88,7 +88,7 @@ label-occupied-padding = 2
label-empty =
[bar/main]
font-0 = ${fonts.monospace}:style=Regular
font-0 = ${fonts.monospace}
modules-left = date battery
modules-center = ewmh
@ -102,9 +102,9 @@ module-margin = 2
height=4%
border-top-size = 1
border-top-color = ${color.base05}
border-top-color= ${colors.base05}
background = ${color.base00}
foreground = ${color.base05}
background = ${colors.base00}
foreground = ${colors.base05}
bottom = true

View file

@ -12,84 +12,10 @@ configuration {
display-run: "  Run ";
display-window: " 﩯 Window";
display-Network: " 󰤨 Network";
sidebar-mode: true;
}
listview {
columns: 1;
}
* {
width: 600;
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
border: 3px;
height: 50%;
width: 50%;
}
inputbar {
children: [prompt,entry];
border-radius: 5px;
padding: 2px;
}
prompt {
padding: 6px;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
}
element {
padding: 5px;
}
element-icon {
size: 25px;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
vertical-align: 0.5;
horizontal-align: 0.5;
}
message {
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
}

View file

@ -16,7 +16,7 @@ in
// Inject font
configuration {
font = ${config.fontProfiles.monospace.family};
font: "${config.fontProfiles.monospace.family}";
}
// Theme

Binary file not shown.

After

(image error) Size: 288 KiB

View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
let base16-xresources = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-xresources";
sha256 = "151zahx18vfrmbll7lwwnb17rn4z0di8n0fi2yr10hg14azddb2r";
rev = "6711cf4fa61e903e52ef6eac186b83e04a0397d8";
};
in
{
xresources.extraConfig = builtins.readFile (config.scheme base16-xresources);
}

View file

@ -0,0 +1,3 @@
{
home.file.".background-image".source = ./wallpapers/wall.png;
}

View file

@ -1,3 +1,17 @@
{
imports = [ ./common/rofi ./common/polybar ./common/fonts.nix ];
{ pkgs, ... }: {
imports = [
./common/rofi
./common/polybar
./common/fonts.nix
./common/xresources.nix
./common/xwallpaper.nix
./common/alacritty.nix
];
# Other packages I want to install:
home.packages = with pkgs; [
vimclip # Vim anywhere!
xclip # Clipboard stuff
spectacle # Take screenshots
];
}

View file

@ -43,8 +43,8 @@ let
extraRuntime = [
(if devMode
then symlink "${paths.dotfiles}/vscode-snippets"
else ../../../../dotfiles/vscode-snippets)
then symlink "${paths.dotfiles}/vscode-snippets"
else ../../../../dotfiles/vscode-snippets)
];
# Wraps a neovim client, providing the dependencies
@ -57,7 +57,7 @@ let
# - NVIM_EXTRA_RUNTIME provides extra directories to add to the runtimepath.
# I cannot just install those dirs using the builtin package support because
# my package manager (lazy.nvim) disables those.
wrapClient = { base, name }:
wrapClient = { base, name, extraArgs ? "" }:
pkgs.symlinkJoin {
inherit (base) name meta;
paths = [ base ];
@ -66,12 +66,17 @@ let
wrapProgram $out/bin/${name} \
--prefix PATH : ${lib.makeBinPath extraPackages} \
--set INSIDE_NEOVIDE ${if name == "neovide" then "1" else "0"} \
--set NVIM_EXTRA_RUNTIME ${lib.strings.concatStringsSep "," extraRuntime}
--set NVIM_EXTRA_RUNTIME ${lib.strings.concatStringsSep "," extraRuntime} \
${extraArgs}
'';
};
neovim = wrapClient { base = pkgs.neovim-nightly; name = "nvim"; };
neovide = wrapClient { base = pkgs.neovide; name = "neovide"; };
neovide = wrapClient {
base = pkgs.neovide;
name = "neovide";
extraArgs = "--set NEOVIDE_MULTIGRID true";
};
in
{
# Do not manage neovim via nix
@ -82,6 +87,8 @@ in
symlink "${paths.dotfiles}/neovim" else
../../../../dotfiles/neovim;
home.sessionVariables.EDITOR = "nvim";
home.packages = [
neovim
neovide