reconfigure
This commit is contained in:
parent
84c6f0eb3d
commit
1a51f2f555
59 changed files with 1592 additions and 1473 deletions
files/config/xdg
hosts
modules
nix
default.nix
options.nixhome
programs
system
themes
|
@ -1,25 +0,0 @@
|
|||
[Default Applications]
|
||||
text/html=firefox.desktop
|
||||
image/png=imv.desktop
|
||||
image/jpeg=imv.desktop
|
||||
image/webp=imv.desktop
|
||||
image/tga=imv.desktop
|
||||
image/bmp=imv.desktop
|
||||
image/gif=imv.desktop
|
||||
video/mp4=mpv.desktop
|
||||
video/x-msvideo=mpv.desktop
|
||||
video/mkv=mpv.desktop
|
||||
video/webm=mpv.desktop
|
||||
audio/mp3=mpv.desktop
|
||||
audio/wav=mpv.desktop
|
||||
application/pdf=org.pwmt.zathura.desktop
|
||||
application/x-shellscript=nvim.desktop
|
||||
x-scheme-handler/http=firefox.desktop
|
||||
x-scheme-handler/https=firefox.desktop
|
||||
x-scheme-handler/about=firefox.desktop
|
||||
x-scheme-handler/unknown=firefox.desktop
|
||||
x-scheme-handler/mspa=unofficial-homestuck-collection.desktop
|
||||
|
||||
[Added Associations]
|
||||
x-scheme-handler/discord=discord.desktop;
|
||||
x-scheme-handler/slack=slack.desktop;
|
|
@ -1,15 +0,0 @@
|
|||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_DESKTOP_DIR="$HOME/"
|
||||
XDG_DOCUMENTS_DIR="$HOME/documents/"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads/"
|
||||
XDG_MUSIC_DIR="$HOME/"
|
||||
XDG_PICTURES_DIR="$HOME/"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||
XDG_TEMPLATES_DIR="$HOME/"
|
||||
XDG_VIDEOS_DIR="$HOME/"
|
|
@ -1,21 +1,26 @@
|
|||
{ inputs, options, ... }:
|
||||
# Shinji
|
||||
# System configuration for my laptop
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
{
|
||||
inputs,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
options
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
../modules
|
||||
../nix
|
||||
{
|
||||
# options
|
||||
desktop.enable = true;
|
||||
system.enable = true;
|
||||
monitor = {
|
||||
monitors = [{
|
||||
name = "eDP-1";
|
||||
scale = 1.25;
|
||||
};
|
||||
}];
|
||||
|
||||
# hardware
|
||||
hardware.graphics.enable = true;
|
||||
|
|
|
@ -1,180 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./programs
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
# Primary user of the system
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Primary user of the system";
|
||||
};
|
||||
fullName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Human readable name of the user";
|
||||
};
|
||||
homePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Home directory path of the user";
|
||||
default = "/home/${config.user}";
|
||||
};
|
||||
dotfilesPath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Dotfiles path inside the users home dir";
|
||||
default = "${config.homePath}/.config/nix";
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Primary email of the user";
|
||||
};
|
||||
|
||||
# Toggable components
|
||||
desktop = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable the gui.";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
system = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable system services.";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Monitor
|
||||
monitor = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Name of the primary monitor.";
|
||||
default = "";
|
||||
};
|
||||
scale = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
description = "Scale of the primary monitor.";
|
||||
default = 1.0;
|
||||
};
|
||||
};
|
||||
|
||||
# Theme of the system
|
||||
theme = {
|
||||
colors = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
description = "base16 color scheme";
|
||||
default = (import ./themes).catppuccin.mocha;
|
||||
};
|
||||
|
||||
accentColor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Theme accent color.";
|
||||
default = config.theme.colors.base0D;
|
||||
};
|
||||
|
||||
opacity = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
description = "Window opacity.";
|
||||
default = 1.0;
|
||||
};
|
||||
|
||||
font = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Theme primary font.";
|
||||
default = "JetBrains Mono";
|
||||
};
|
||||
|
||||
fontSize = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme primary font size.";
|
||||
default = 14;
|
||||
};
|
||||
|
||||
headerFont = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Theme header font.";
|
||||
default = "JetBrains Mono ExtraBold";
|
||||
};
|
||||
|
||||
monospaceFont = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Theme monospace font.";
|
||||
default = "monospace";
|
||||
};
|
||||
|
||||
iconFont = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Theme icon font.";
|
||||
default = "Font Awesome 6 Pro";
|
||||
};
|
||||
|
||||
borderWidth = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme border width";
|
||||
default = 3;
|
||||
};
|
||||
|
||||
outerRadius = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme outer border radius.";
|
||||
default = 5;
|
||||
};
|
||||
|
||||
innerRadius = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme inner border radius.";
|
||||
default = 2;
|
||||
};
|
||||
|
||||
outerGap = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme outer gap/spacing.";
|
||||
default = 10;
|
||||
};
|
||||
|
||||
innerGap = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "Theme inner gap/spacing.";
|
||||
default = 3;
|
||||
};
|
||||
};
|
||||
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to wallpaper image";
|
||||
default = "";
|
||||
};
|
||||
|
||||
avatar = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to avatar image";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
# use system packages in home manager
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
# install user packages to /etc/profiles and not home directory
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
# allow flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# set state version
|
||||
home-manager.users.${config.user}.home.stateVersion = "25.05";
|
||||
home-manager.users.root.home.stateVersion = "25.05";
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
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);
|
||||
|
||||
// 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");
|
||||
|
||||
//'';
|
||||
|
||||
userChrome = ''
|
||||
/* 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;
|
||||
}
|
||||
'';
|
||||
|
||||
my-firefox = (pkgs.firefox.override {
|
||||
extraPrefs = extraPrefs;
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.firefox = {
|
||||
|
||||
enable = true;
|
||||
package = my-firefox;
|
||||
|
||||
# import configuration
|
||||
policies = import ./policies.nix;
|
||||
|
||||
# create profile for me :3
|
||||
profiles.${config.user} = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "DuckDuckGo";
|
||||
engines = {
|
||||
"Google".metaData.hidden = true;
|
||||
"Bing".metaData.hidden = true;
|
||||
"Amazon.com".metaData.hidden = true;
|
||||
"eBay".metaData.hidden = true;
|
||||
"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 = userChrome;
|
||||
}; # end profile
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.fullName;
|
||||
userEmail = config.email;
|
||||
|
||||
signing = {
|
||||
key = "D9AF0A4209B7C2DE11A884BFACBC553660D9993D";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.system.enable {
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gtk2;
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
publicKeys = [
|
||||
{
|
||||
source = ../../../files/keys/freya-gpg.pub;
|
||||
trust = 5;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
services.hypridle = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
# dim screen
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
# dim keyboard backlight
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
}
|
||||
# lock
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# turn off screen
|
||||
{
|
||||
timeout = 350;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,302 +0,0 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
# inputs
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
hyprland = inputs.hyprland.packages.${system};
|
||||
hyprland-plugins = inputs.hyprland-plugins.packages.${system};
|
||||
hy3 = inputs.hy3.packages.${system};
|
||||
|
||||
browser = "firefox";
|
||||
launcher = "wofi --show drun --prompt \"Search Program\"";
|
||||
lock_screen = "hyprlock";
|
||||
terminal = "kitty";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
package = hyprland.hyprland;
|
||||
|
||||
# Plugins
|
||||
plugins = [
|
||||
hyprland-plugins.hyprexpo
|
||||
hy3.hy3
|
||||
];
|
||||
|
||||
# Config
|
||||
settings = {
|
||||
# Monitors
|
||||
monitor = [
|
||||
"${config.monitor.name}, highres, auto, ${toString config.monitor.scale}"
|
||||
];
|
||||
|
||||
# Autostart
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"thunderbird"
|
||||
"discord --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
"element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
];
|
||||
|
||||
# General
|
||||
general = {
|
||||
gaps_in = config.theme.innerGap;
|
||||
gaps_out = config.theme.outerGap;
|
||||
layout = "hy3";
|
||||
resize_on_border = "yes";
|
||||
extend_border_grab_area = 20;
|
||||
border_size = config.theme.borderWidth;
|
||||
"col.active_border" = "rgb(${config.theme.accentColor})";
|
||||
"col.inactive_border" = "rgb(${config.theme.colors.base04})";
|
||||
};
|
||||
|
||||
# Gestures
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_forever = true;
|
||||
workspace_swipe_cancel_ratio = 0.15;
|
||||
};
|
||||
|
||||
# Decoration
|
||||
decoration = {
|
||||
rounding = config.theme.outerRadius;
|
||||
shadow.enabled = false;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
noise = 0.008;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
# Animations
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"windowIn, 0.06, 0.71, 0.25, 1"
|
||||
"windowResize, 0.04, 0.67, 0.38, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windowsIn, 1, 3, windowIn, slide #popin 20%"
|
||||
"windowsOut, 1, 3, windowIn, slide #popin 70%"
|
||||
"windowsMove, 1, 2.5, windowResize"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 3, default"
|
||||
"workspaces, 1, 6, default"
|
||||
"layers, 1, 5, windowIn, slide"
|
||||
];
|
||||
};
|
||||
|
||||
# Environment
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
|
||||
"XCURSOR_THEME,Adwaita"
|
||||
"XCURSOR_SIZE,24"
|
||||
|
||||
"GTK_THEME,Orchis-Teal-Dark"
|
||||
"GDK_SCALE,${toString config.monitor.scale}"
|
||||
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_USE_XINPUT,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
];
|
||||
|
||||
# Input
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "gtp:alt_shit_toggle, compose:ralt";
|
||||
kb_rules = "";
|
||||
follow_mouse = 1;
|
||||
touchpad = {
|
||||
natural_scroll = "yes";
|
||||
};
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
# Keybinds
|
||||
"$mod" = "SUPER";
|
||||
bind = [
|
||||
# Launch programs
|
||||
|
||||
"$mod, W, exec, ${browser}"
|
||||
"$mod, D, exec, ${launcher}"
|
||||
"$mod, L, exec, ${lock_screen}"
|
||||
"$mod, Return, exec, ${terminal}"
|
||||
|
||||
# Misc
|
||||
|
||||
"$mod SHIFT, L, exit"
|
||||
"$mod, tab, hyprexpo:expo, toggle"
|
||||
|
||||
# Window operations
|
||||
|
||||
"$mod SHIFT, Q, killactive"
|
||||
"$mod SHIFT, SPACE, togglefloating"
|
||||
"$mod, F, fullscreen"
|
||||
"$mod, J, togglesplit"
|
||||
|
||||
# Move focus with mod + arrow keys
|
||||
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Move window across workspace with mod + arrow keys
|
||||
|
||||
"$mod SHIFT, left, hy3:movewindow, l"
|
||||
"$mod SHIFT, right, hy3:movewindow, r"
|
||||
"$mod SHIFT, up, hy3:movewindow, u"
|
||||
"$mod SHIFT, down, hy3:movewindow, d"
|
||||
|
||||
# Switch workspaces with mod + [0-9]
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
|
||||
# Move active window to a workspace with mod + SHIFT + [0-9]
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
# Move to tab
|
||||
|
||||
"LALT, 1, hy3:focustab, index, 01"
|
||||
"LALT, 2, hy3:focustab, index, 02"
|
||||
"LALT, 3, hy3:focustab, index, 03"
|
||||
"LALT, 4, hy3:focustab, index, 04"
|
||||
"LALT, 5, hy3:focustab, index, 05"
|
||||
"LALT, 6, hy3:focustab, index, 06"
|
||||
"LALT, 7, hy3:focustab, index, 07"
|
||||
"LALT, 8, hy3:focustab, index, 08"
|
||||
"LALT, 9, hy3:focustab, index, 09"
|
||||
"LALT, 0, hy3:focustab, index, 10"
|
||||
|
||||
"$mod SHIFT, B, hy3:makegroup, h"
|
||||
"$mod SHIFT, V, hy3:makegroup, v"
|
||||
"$mod SHIFT, C, hy3:changegroup, toggletab"
|
||||
|
||||
# Scroll through existing workspaces with mod + scroll
|
||||
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
bindn = [
|
||||
# Focus windows with scroll wheel or middle click
|
||||
|
||||
", mouse:272, hy3:focustab, mouse"
|
||||
", mouse_down, hy3:focustab, l, require_hovered"
|
||||
", mouse_up, hy3:focustab, r, require_hovered"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mod + LMB/RMB and dragging
|
||||
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# Audio
|
||||
|
||||
# raise volume
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
# lower volume
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
# mute speaker
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
# mute mic
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
|
||||
# Media
|
||||
|
||||
# play
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
# next
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
# prev
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
|
||||
# Backlight
|
||||
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set 5%+"
|
||||
];
|
||||
|
||||
# Plugin configuration
|
||||
plugin = {
|
||||
# hy3
|
||||
hy3 = {
|
||||
tabs = {
|
||||
height = 24;
|
||||
text_height = 9;
|
||||
text_padding = 10;
|
||||
padding = 2;
|
||||
render_text = true;
|
||||
text_font = "monospace";
|
||||
radius = config.theme.outerRadius;
|
||||
|
||||
"col.active" = "rgb(${config.theme.colors.base00})";
|
||||
"col.inactive" = "rgb(${config.theme.colors.base00})";
|
||||
"col.text.active" = "rgb(${config.theme.colors.base05})";
|
||||
"col.text.inactive" = "rgb(${config.theme.colors.base05})";
|
||||
"col.border.active" = "rgb(${config.theme.accentColor})";
|
||||
"col.border.inactive" = "rgb(${config.theme.colors.base04})";
|
||||
};
|
||||
|
||||
autotile = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# XWayland
|
||||
xwayland = {
|
||||
force_zero_scaling = "true";
|
||||
use_nearest_neighbor = "false";
|
||||
};
|
||||
|
||||
# Misc
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
key_press_enables_dpms = true;
|
||||
mouse_move_enables_dpms = true;
|
||||
vrr = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.hyprlock = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
background = {
|
||||
monitor = "";
|
||||
path = config.wallpaper;
|
||||
blur_passes = 3;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = true;
|
||||
};
|
||||
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "250, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(0, 0, 0, 0.5)";
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.font;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<i><span foreground=\"##${config.theme.colors.base05}\">Input Password...</span></i>";
|
||||
hide_input = false;
|
||||
position = "0, -120";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
label = [
|
||||
# Clock
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo \"$(date +\"%-H:%M:%S\")\"";
|
||||
font_size = 80;
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.headerFont;
|
||||
position = "0, 500";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
# Name
|
||||
{
|
||||
monitor = "";
|
||||
text = config.fullName;
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.headerFont;
|
||||
font_size = 25;
|
||||
position = "0, 50";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
# Profile image
|
||||
image = {
|
||||
monitor = "";
|
||||
path = config.avatar;
|
||||
size = 300;
|
||||
rounding = -1;
|
||||
border_size = 0;
|
||||
position = "0, 250";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
services.hyprpaper = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
preload = config.wallpaper;
|
||||
wallpaper = ",${config.wallpaper}";
|
||||
splash = false;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.kitty = {
|
||||
|
||||
enable = true;
|
||||
environment = { };
|
||||
extraConfig = "";
|
||||
|
||||
settings = {
|
||||
# Font
|
||||
font_family = config.theme.monospaceFont;
|
||||
font_size = 11;
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
|
||||
# Scrollback
|
||||
scrollback_lines = 10000;
|
||||
scrollback_pager_history_size = 300; # MB
|
||||
|
||||
# Urls
|
||||
detect_urls = true;
|
||||
show_hyperlink_targets = false;
|
||||
|
||||
# Window
|
||||
window_padding_width = config.theme.outerGap;
|
||||
window_border_width = 0;
|
||||
draw_minimal_borders = true;
|
||||
background_opacity = config.theme.opacity;
|
||||
|
||||
# Disable audio
|
||||
enable_audio_bell = false;
|
||||
|
||||
# Disable close prompt
|
||||
confirm_os_window_close = 0;
|
||||
|
||||
# colors
|
||||
background = "#${config.theme.colors.base00}";
|
||||
foreground = "#${config.theme.colors.base05}";
|
||||
selection_background = "#${config.theme.colors.base05}";
|
||||
selection_foreground = "#${config.theme.colors.base00}";
|
||||
url_color = "#${config.theme.colors.base04}";
|
||||
cursor = "#${config.theme.colors.base05}";
|
||||
active_border_color = "#${config.theme.colors.base03}";
|
||||
inactive_border_color = "#${config.theme.colors.base01}";
|
||||
active_tab_background = "#${config.theme.colors.base00}";
|
||||
active_tab_foreground = "#${config.theme.colors.base05}";
|
||||
inactive_tab_background = "#${config.theme.colors.base01}";
|
||||
inactive_tab_foreground = "#${config.theme.colors.base04}";
|
||||
tab_bar_background = "#${config.theme.colors.base01}";
|
||||
|
||||
# normal
|
||||
color0 = "#${config.theme.colors.base00}";
|
||||
color1 = "#${config.theme.colors.base08}";
|
||||
color2 = "#${config.theme.colors.base0B}";
|
||||
color3 = "#${config.theme.colors.base0A}";
|
||||
color4 = "#${config.theme.colors.base0D}";
|
||||
color5 = "#${config.theme.colors.base0E}";
|
||||
color6 = "#${config.theme.colors.base0C}";
|
||||
color7 = "#${config.theme.colors.base05}";
|
||||
|
||||
# bright
|
||||
color8 = "#${config.theme.colors.base03}";
|
||||
color9 = "#${config.theme.colors.base08}";
|
||||
color10 = "#${config.theme.colors.base0B}";
|
||||
color11 = "#${config.theme.colors.base0A}";
|
||||
color12 = "#${config.theme.colors.base0D}";
|
||||
color13 = "#${config.theme.colors.base0E}";
|
||||
color14 = "#${config.theme.colors.base0C}";
|
||||
color15 = "#${config.theme.colors.base07}";
|
||||
|
||||
# extended base16 colors
|
||||
color16 = "#${config.theme.colors.base09}";
|
||||
color17 = "#${config.theme.colors.base0F}";
|
||||
color18 = "#${config.theme.colors.base01}";
|
||||
color19 = "#${config.theme.colors.base02}";
|
||||
color20 = "#${config.theme.colors.base04}";
|
||||
color21 = "#${config.theme.colors.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
services.mako = {
|
||||
|
||||
enable = true;
|
||||
|
||||
font = "${config.theme.font} 11";
|
||||
|
||||
margin = toString config.theme.outerGap;
|
||||
padding = toString config.theme.innerGap;
|
||||
|
||||
backgroundColor = "#${config.theme.colors.base00}";
|
||||
progressColor = "#${config.theme.colors.base00}";
|
||||
textColor = "#${config.theme.colors.base05}";
|
||||
|
||||
borderColor = "#${config.theme.colors.base05}";
|
||||
borderSize = config.theme.borderWidth;
|
||||
borderRadius = config.theme.outerRadius;
|
||||
|
||||
defaultTimeout = 5000;
|
||||
layer = "overlay";
|
||||
icons = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.neovim = {
|
||||
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraLuaConfig = let
|
||||
cfg = lib.fileContents ../../../files/config/nvim/init.lua;
|
||||
colorscheme = ''
|
||||
local colorscheme = require('base16-colorscheme')
|
||||
|
||||
colorscheme.setup({
|
||||
base00 = '#${config.theme.colors.base00}',
|
||||
base01 = '#${config.theme.colors.base01}',
|
||||
base02 = '#${config.theme.colors.base02}',
|
||||
base03 = '#${config.theme.colors.base03}',
|
||||
base04 = '#${config.theme.colors.base04}',
|
||||
base05 = '#${config.theme.colors.base05}',
|
||||
base06 = '#${config.theme.colors.base06}',
|
||||
base07 = '#${config.theme.colors.base07}',
|
||||
base08 = '#${config.theme.colors.base08}',
|
||||
base09 = '#${config.theme.colors.base09}',
|
||||
base0A = '#${config.theme.colors.base0A}',
|
||||
base0B = '#${config.theme.colors.base0B}',
|
||||
base0C = '#${config.theme.colors.base0C}',
|
||||
base0D = '#${config.theme.colors.base0D}',
|
||||
base0E = '#${config.theme.colors.base0E}',
|
||||
base0F = '#${config.theme.colors.base0F}',
|
||||
})'';
|
||||
in
|
||||
colorscheme + cfg;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Deoendencies
|
||||
vim-devicons
|
||||
nvim-web-devicons
|
||||
# Lua functions
|
||||
plenary-nvim
|
||||
# Lines
|
||||
lualine-nvim # mode line
|
||||
bufferline-nvim # buffer line
|
||||
# Menus
|
||||
nvim-tree-lua # file browser
|
||||
undotree # undo menu
|
||||
trouble-nvim # error menu
|
||||
telescope-nvim # grep/find menus
|
||||
# Snippets
|
||||
vim-vsnip
|
||||
vim-vsnip-integ
|
||||
friendly-snippets
|
||||
# Completion
|
||||
nvim-cmp
|
||||
cmp-buffer
|
||||
cmp-nvim-lsp
|
||||
cmp-vsnip
|
||||
nvim-surround # delimiter
|
||||
# Lsp
|
||||
base16-nvim # colorscheme
|
||||
nerdcommenter # comment functions
|
||||
nvim-treesitter.withAllGrammars # hilighting
|
||||
vim-illuminate # hilighting
|
||||
todo-comments-nvim # todo comments
|
||||
nvim-lspconfig # lsp server
|
||||
fidget-nvim # notifications
|
||||
indent-o-matic # auto indentation
|
||||
hologram-nvim # images
|
||||
virt-column-nvim # 80 col line
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.starship = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
format = lib.concatStrings [
|
||||
"╭─ "
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$git_branch"
|
||||
"$directory"
|
||||
"$line_break"
|
||||
"╰─ "
|
||||
];
|
||||
|
||||
username = {
|
||||
style_user = "bold cyan";
|
||||
style_root = "bold red";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "on [$hostname](bold blue) ";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
format = "[$path]($style)[$read_only]($read_only_style) ";
|
||||
truncation_length = -1;
|
||||
truncate_to_repo = false;
|
||||
truncation_symbol = "…/";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold purple";
|
||||
format = "at [$symbol$branch(:$remote_branch)]($style) ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,212 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.waybar = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = [{
|
||||
height = 24;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 4;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"battery"
|
||||
"wireplumber"
|
||||
"network"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
format = "{name}";
|
||||
};
|
||||
|
||||
battery = {
|
||||
interval = 1;
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = " {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-warning = " {capacity}%";
|
||||
format-critical = " {capacity}%";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = " {volume}%";
|
||||
format-bluetooth = " {volume}%";
|
||||
format-muted = " muted";
|
||||
scroll-step = 1;
|
||||
on-click = "pavucontrol";
|
||||
ignored-sinks = ["Easy Effects Sink"];
|
||||
};
|
||||
|
||||
network = {
|
||||
format = " disconnected";
|
||||
format-wifi = " {essid}";
|
||||
format-ethernet = " {ipaddr}/{cidr}";
|
||||
format-disconnected = " disconnected";
|
||||
max-length = 50;
|
||||
on-click = "nm-connection-editor";
|
||||
};
|
||||
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%Y-%m-%d %a %H:%M:%S}";
|
||||
};
|
||||
|
||||
tray = {
|
||||
spacing = config.theme.outerGap;
|
||||
};
|
||||
}];
|
||||
|
||||
style =
|
||||
let
|
||||
accentColor = "#${config.theme.accentColor}";
|
||||
textColor = "#${config.theme.colors.base05}";
|
||||
baseColor = "#${config.theme.colors.base00}";
|
||||
surfaceColor = "#${config.theme.colors.base02}";
|
||||
greenColor = "#${config.theme.colors.base0B}";
|
||||
yellowColor = "#${config.theme.colors.base0A}";
|
||||
redColor = "#${config.theme.colors.base08}";
|
||||
fontSize = "${toString config.theme.fontSize}px";
|
||||
outerGap = "${toString config.theme.outerGap}px";
|
||||
innerGap = "${toString config.theme.innerGap}px";
|
||||
outerRadius = "${toString config.theme.outerRadius}px";
|
||||
innerRadius = "${toString config.theme.innerRadius}px";
|
||||
borderWidth = "${toString config.theme.borderWidth}px";
|
||||
in ''
|
||||
|
||||
/** Base */
|
||||
|
||||
window#waybar {
|
||||
font-family: "${config.theme.font}", "${config.theme.iconFont}", "${config.theme.monospaceFont}";
|
||||
font-size: ${fontSize};
|
||||
color: ${textColor};
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
window#waybar > box {
|
||||
margin: ${outerGap};
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.modules-left,
|
||||
.modules-right {
|
||||
padding: ${innerGap} 0px;
|
||||
border-radius: ${outerRadius};
|
||||
background-color: ${baseColor};
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
}
|
||||
|
||||
/** Workspaces */
|
||||
|
||||
#workspaces {
|
||||
margin-left: ${innerGap};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
all: initial;
|
||||
color: ${textColor};
|
||||
background-color: transparent;
|
||||
border-radius: ${innerRadius};
|
||||
padding: ${innerGap} ${outerGap};
|
||||
}
|
||||
|
||||
#workspaces button.focused,
|
||||
#workspaces button.active {
|
||||
background-color: ${accentColor};
|
||||
color: ${baseColor};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: ${redColor};
|
||||
}
|
||||
|
||||
/** Window */
|
||||
|
||||
window#waybar:not(.empty) #window {
|
||||
padding: 0 ${outerGap};
|
||||
border-left: ${borderWidth} solid ${surfaceColor};
|
||||
margin: 0 ${innerGap};
|
||||
}
|
||||
|
||||
/** Tray */
|
||||
|
||||
#tray {
|
||||
border: none;
|
||||
margin-right: ${outerGap};
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
}
|
||||
|
||||
/** Right modules */
|
||||
|
||||
#battery,
|
||||
#wireplumber,
|
||||
#network,
|
||||
#clock {
|
||||
padding: 0 ${outerGap};
|
||||
border-right: ${borderWidth} solid ${surfaceColor};
|
||||
color: ${textColor};
|
||||
}
|
||||
|
||||
/** Battery */
|
||||
|
||||
#battery.charging {
|
||||
color: ${greenColor};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: ${yellowColor};
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
color: ${redColor};
|
||||
}
|
||||
|
||||
/** Wireplumber */
|
||||
|
||||
#wireplumber.muted {
|
||||
color: ${redColor};
|
||||
}
|
||||
|
||||
/** Network */
|
||||
|
||||
#network.wifi,
|
||||
#network.ethernet {
|
||||
color: ${greenColor};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: ${redColor};
|
||||
}
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.system.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
];
|
||||
|
||||
# TODO: remove this!!!
|
||||
environment.etc = {
|
||||
"resolv.conf".text = "nameserver 10.1.1.1\n";
|
||||
};
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
networking.wireguard.interfaces = {
|
||||
freyanet = {
|
||||
ips = [ "10.2.0.2/32" "fd:cafe:dead:bee::2/128" "fe80::2/128" ];
|
||||
privateKeyFile = "${config.dotfilesPath}/secrets/freyanet.key";
|
||||
|
||||
peers = [{
|
||||
publicKey = "x0ykwakpYCvI/pG+nR83lNUyeOE9m54thnX3bvZ+FUk=";
|
||||
allowedIPs = [ "10.0.0.0/12" "fd:cafe::/32" "fe80::/64" ];
|
||||
endpoint = "freya.cat:41111";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.desktop.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.wofi = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
key_expand = "Tab";
|
||||
term = "kitty";
|
||||
matching = "multi-contains";
|
||||
insensitive = true;
|
||||
gtk_dark = true;
|
||||
hide_scroll = true;
|
||||
};
|
||||
|
||||
style =
|
||||
let
|
||||
accentColor = "#${config.theme.accentColor}";
|
||||
textColor = "#${config.theme.colors.base05}";
|
||||
baseColor = "#${config.theme.colors.base00}";
|
||||
surfaceColor = "#${config.theme.colors.base02}";
|
||||
fontSize = "${toString config.theme.fontSize}px";
|
||||
outerGap = "${toString config.theme.outerGap}px";
|
||||
innerGap = "${toString config.theme.innerGap}px";
|
||||
outerRadius = "${toString config.theme.outerRadius}px";
|
||||
innerRadius = "${toString config.theme.innerRadius}px";
|
||||
borderWidth = "${toString config.theme.borderWidth}px";
|
||||
in ''
|
||||
* {
|
||||
font-family: ${config.theme.monospaceFont};
|
||||
font-size: ${fontSize};
|
||||
}
|
||||
|
||||
/* Window */
|
||||
window {
|
||||
margin: 0px;
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
border-radius: ${outerRadius};
|
||||
background-color: ${baseColor};
|
||||
}
|
||||
|
||||
/* Outer Box */
|
||||
#outer-box {
|
||||
padding: ${outerGap};
|
||||
}
|
||||
|
||||
/* Scroll */
|
||||
#scroll {
|
||||
margin: 0px;
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
#input {
|
||||
margin: ${innerGap};
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
color: ${textColor};
|
||||
background-color: ${surfaceColor};
|
||||
border-radius: ${outerRadius};
|
||||
}
|
||||
|
||||
#input:focus,
|
||||
#input:active {
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Text */
|
||||
#text {
|
||||
margin: ${innerGap};
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
color: ${textColor};
|
||||
}
|
||||
|
||||
/* Selected Entry */
|
||||
#entry:selected {
|
||||
background-color: ${accentColor};
|
||||
border-radius: ${outerRadius};
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
color: ${baseColor};
|
||||
}
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableGlobalCompInit = false;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
histSize = 10000;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
320
nix/default.nix
Normal file
320
nix/default.nix
Normal file
|
@ -0,0 +1,320 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# monitor options
|
||||
|
||||
monitorOpts = self: {
|
||||
options = {
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the monitor.";
|
||||
};
|
||||
|
||||
scale = mkOption {
|
||||
type = types.float;
|
||||
description = "Scaling factor of the monitor.";
|
||||
default = 1.0;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
# base16 theme color options
|
||||
# https://github.com/chriskempson/base16/blob/main/styling.md
|
||||
|
||||
base16Opts = self: {
|
||||
options = {
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the theme";
|
||||
};
|
||||
|
||||
author = mkOption {
|
||||
type = types.str;
|
||||
description = "Author of the theme";
|
||||
};
|
||||
|
||||
base00 = mkOption {
|
||||
type = types.str;
|
||||
description = "Default Background.";
|
||||
};
|
||||
|
||||
base01 = mkOption {
|
||||
type = types.str;
|
||||
description = "Lighter Background (Used for status bars, line number and folding marks).";
|
||||
};
|
||||
|
||||
base02 = mkOption {
|
||||
type = types.str;
|
||||
description = "Selection Background.";
|
||||
};
|
||||
|
||||
base03 = mkOption {
|
||||
type = types.str;
|
||||
description = "Comments, Invisibles, Line Highlighting.";
|
||||
};
|
||||
|
||||
base04 = mkOption {
|
||||
type = types.str;
|
||||
description = "Dark Foreground (Used for status bars).";
|
||||
};
|
||||
|
||||
base05 = mkOption {
|
||||
type = types.str;
|
||||
description = "Default Foreground, Caret, Delimiters, Operators.";
|
||||
};
|
||||
|
||||
base06 = mkOption {
|
||||
type = types.str;
|
||||
description = "Light Foreground (Not often used).";
|
||||
};
|
||||
|
||||
base07 = mkOption {
|
||||
type = types.str;
|
||||
description = "Light Background (Not often used).";
|
||||
};
|
||||
|
||||
base08 = mkOption {
|
||||
type = types.str;
|
||||
description = "Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted.";
|
||||
};
|
||||
|
||||
base09 = mkOption {
|
||||
type = types.str;
|
||||
description = "Integers, Boolean, Constants, XML Attributes, Markup Link Url.";
|
||||
};
|
||||
|
||||
base0A = mkOption {
|
||||
type = types.str;
|
||||
description = "Classes, Markup Bold, Search Text Background.";
|
||||
};
|
||||
|
||||
base0B = mkOption {
|
||||
type = types.str;
|
||||
description = "Strings, Inherited Class, Markup Code, Diff Inserted.";
|
||||
};
|
||||
|
||||
base0C = mkOption {
|
||||
type = types.str;
|
||||
description = "Support, Regular Expressions, Escape Characters, Markup Quotes.";
|
||||
};
|
||||
|
||||
base0D = mkOption {
|
||||
type = types.str;
|
||||
description = "Functions, Methods, Attribute IDs, Headings.";
|
||||
};
|
||||
|
||||
base0E = mkOption {
|
||||
type = types.str;
|
||||
description = "Keywords, Storage, Selector, Markup Italic, Diff Changed.";
|
||||
};
|
||||
|
||||
base0F = mkOption {
|
||||
type = types.str;
|
||||
description = "Deprecated, Opening/Closing Embedded Language Tags.";
|
||||
};
|
||||
|
||||
accent = mkOption {
|
||||
type = types.str;
|
||||
description = "Accent color.";
|
||||
default = config.theme.colors.base0D;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./programs
|
||||
./home
|
||||
./system
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
#
|
||||
# Primary user of the system
|
||||
#
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
description = "Primary user of the system";
|
||||
};
|
||||
fullName = mkOption {
|
||||
type = types.str;
|
||||
description = "Human readable name of the user";
|
||||
};
|
||||
email = mkOption {
|
||||
type = types.str;
|
||||
description = "Primary email of the user";
|
||||
};
|
||||
homePath = mkOption {
|
||||
type = types.str;
|
||||
description = "Home directory path of the user";
|
||||
default = "/home/${config.user}";
|
||||
};
|
||||
dotfilesPath = mkOption {
|
||||
type = types.str;
|
||||
description = "Dotfiles path inside the users home dir";
|
||||
default = "${config.homePath}/.config/nix";
|
||||
};
|
||||
|
||||
#
|
||||
# Monitors of the system
|
||||
#
|
||||
monitors = mkOption {
|
||||
default = [];
|
||||
description = "Monitors of the system.";
|
||||
type = with types; listOf (submodule monitorOpts);
|
||||
};
|
||||
|
||||
#
|
||||
# Theme of the system
|
||||
#
|
||||
theme = {
|
||||
colors = mkOption {
|
||||
type = with types; (submodule base16Opts);
|
||||
description = "Base16 color scheme";
|
||||
default = (import ./themes).catppuccin.mocha;
|
||||
};
|
||||
|
||||
opacity = mkOption {
|
||||
type = types.float;
|
||||
description = "Window opacity.";
|
||||
default = 1.0;
|
||||
};
|
||||
|
||||
# theme fonts
|
||||
font = {
|
||||
size = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme primary font size.";
|
||||
default = 14;
|
||||
};
|
||||
|
||||
regular = mkOption {
|
||||
type = types.str;
|
||||
description = "Regular system font.";
|
||||
default = "JetBrains Mono";
|
||||
};
|
||||
|
||||
monospace = mkOption {
|
||||
type = types.str;
|
||||
description = "Monospace system font.";
|
||||
default = "monospace";
|
||||
};
|
||||
|
||||
header = mkOption {
|
||||
type = types.str;
|
||||
description = "Header system font.";
|
||||
default = "JetBrains Mono ExtraBold";
|
||||
};
|
||||
|
||||
icon = mkOption {
|
||||
type = types.str;
|
||||
description = "Icon system font.";
|
||||
default = "Font Awesome 6 Pro";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
borderWidth = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme border width";
|
||||
default = 3;
|
||||
};
|
||||
|
||||
outerRadius = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme outer border radius.";
|
||||
default = 5;
|
||||
};
|
||||
|
||||
innerRadius = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme inner border radius.";
|
||||
default = 2;
|
||||
};
|
||||
|
||||
outerGap = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme outer gap/spacing.";
|
||||
default = 10;
|
||||
};
|
||||
|
||||
innerGap = mkOption {
|
||||
type = types.int;
|
||||
description = "Theme inner gap/spacing.";
|
||||
default = 3;
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = types.str;
|
||||
description = "Path to wallpaper image";
|
||||
default = "";
|
||||
};
|
||||
|
||||
avatar = mkOption {
|
||||
type = types.str;
|
||||
description = "Path to avatar image";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Default programs
|
||||
#
|
||||
default = {
|
||||
browser = mkOption {
|
||||
type = types.str;
|
||||
description = "Default browser launch command.";
|
||||
};
|
||||
appLauncher = mkOption {
|
||||
type = types.str;
|
||||
description = "Default application launcher launch command.";
|
||||
};
|
||||
lockScreen = mkOption {
|
||||
type = types.str;
|
||||
description = "Default lock screen launch command.";
|
||||
};
|
||||
terminal = mkOption {
|
||||
type = types.str;
|
||||
description = "Default terminal launch command.";
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Programs to auto start on launch
|
||||
#
|
||||
autoRun = mkOption {
|
||||
type = with types; listOf str;
|
||||
description = "List of programs to auto run in a graphical environment.";
|
||||
default = [];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
# use system packages in home manager
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
# install user packages to /etc/profiles and not home directory
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
# allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# set state version
|
||||
home-manager.users.${config.user}.home.stateVersion = "25.05";
|
||||
home-manager.users.root.home.stateVersion = "25.05";
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
clippy
|
||||
# programs
|
||||
adwaita-icon-theme
|
||||
blueman
|
||||
cage
|
||||
easyeffects
|
||||
discord
|
||||
|
@ -31,6 +32,7 @@
|
|||
gamescope
|
||||
gajim
|
||||
gimp
|
||||
home-manager
|
||||
imagemagick
|
||||
libnotify
|
||||
mpv
|
||||
|
@ -52,17 +54,9 @@
|
|||
orchis-theme
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".ssh/config".source = ../files/config/ssh/config;
|
||||
".zshrc".source = ../files/config/zsh/zshrc;
|
||||
".zprofile".source = ../files/config/zsh/zprofile;
|
||||
};
|
||||
|
||||
xdg.configFile = {};
|
||||
|
||||
xdg.dataFile = {
|
||||
fonts = {
|
||||
source = ../files/fonts;
|
||||
source = ../../files/fonts;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
|
@ -4,11 +4,12 @@
|
|||
imports = [
|
||||
./firefox
|
||||
./git
|
||||
./gnupg
|
||||
./gpg
|
||||
./hypr
|
||||
./kitty
|
||||
./mako
|
||||
./neovim
|
||||
./ssh
|
||||
./starship
|
||||
./waybar
|
||||
./wireguard
|
39
nix/programs/firefox/default.nix
Normal file
39
nix/programs/firefox/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
extraPrefs = import ./extraPrefs.nix;
|
||||
|
||||
userChrome = import ./userChrome.nix;
|
||||
|
||||
my-firefox = (pkgs.firefox.override {
|
||||
extraPrefs = extraPrefs;
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
default.browser = lib.mkDefault "firefox";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.firefox = {
|
||||
|
||||
enable = true;
|
||||
package = my-firefox;
|
||||
|
||||
# import configuration
|
||||
policies = import ./policy.nix;
|
||||
|
||||
# create profile for me :3
|
||||
profiles.${config.user} = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "DuckDuckGo";
|
||||
};
|
||||
|
||||
userChrome = userChrome;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
22
nix/programs/firefox/extraPrefs.nix
Normal file
22
nix/programs/firefox/extraPrefs.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
# extra preferences that cannot be
|
||||
# set normally but have to instead
|
||||
# set in mosilla.cfg
|
||||
|
||||
''//
|
||||
|
||||
// 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);
|
||||
|
||||
// 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");
|
||||
|
||||
//''
|
|
@ -3,8 +3,8 @@
|
|||
# policies to be set in firefox
|
||||
# see: https://mozilla.github.io/policy-templates/
|
||||
|
||||
ExtensionSettings = import ./extensions.nix;
|
||||
Preferences = import ./preferences.nix;
|
||||
ExtensionSettings = import ./policyExtensions.nix;
|
||||
Preferences = import ./policyPrefs.nix;
|
||||
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
23
nix/programs/firefox/userChrome.nix
Normal file
23
nix/programs/firefox/userChrome.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
''
|
||||
/* 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;
|
||||
}
|
||||
''
|
20
nix/programs/git/default.nix
Normal file
20
nix/programs/git/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.fullName;
|
||||
userEmail = config.email;
|
||||
|
||||
signing = {
|
||||
key = "D9AF0A4209B7C2DE11A884BFACBC553660D9993D";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
24
nix/programs/gpg/default.nix
Normal file
24
nix/programs/gpg/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
publicKeys = [
|
||||
{
|
||||
source = ../../../files/keys/freya-gpg.pub;
|
||||
trust = 5;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableExtraSocket = true;
|
||||
enableSshSupport = true;
|
||||
#updateStartupTty = true;
|
||||
|
||||
pinentryPackage = pkgs.pinentry-gtk2;
|
||||
};
|
||||
};
|
||||
}
|
47
nix/programs/hypr/hypridle.nix
Normal file
47
nix/programs/hypr/hypridle.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
services.hypridle = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
# dim screen
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
# dim keyboard backlight
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
}
|
||||
# lock
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# turn off screen
|
||||
{
|
||||
timeout = 350;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
301
nix/programs/hypr/hyprland.nix
Normal file
301
nix/programs/hypr/hyprland.nix
Normal file
|
@ -0,0 +1,301 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
hyprland = inputs.hyprland.packages.${system};
|
||||
hyprland-plugins = inputs.hyprland-plugins.packages.${system};
|
||||
hy3 = inputs.hy3.packages.${system};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
#xdg.portal = {
|
||||
# enable = true;
|
||||
# extraPortals = [ hyprland.xdg-desktop-portal-hyprland ];
|
||||
#};
|
||||
|
||||
nix.settings = {
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
package = hyprland.hyprland;
|
||||
|
||||
# Plugins
|
||||
plugins = [
|
||||
hyprland-plugins.hyprexpo
|
||||
hy3.hy3
|
||||
];
|
||||
|
||||
# Config
|
||||
settings = {
|
||||
# Monitors
|
||||
monitor = map (monitor:
|
||||
"${monitor.name}, highres, auto, ${toString monitor.scale}"
|
||||
) config.monitors;
|
||||
|
||||
# Autostart
|
||||
exec-once = config.autoRun;
|
||||
|
||||
# General
|
||||
general = {
|
||||
gaps_in = config.theme.innerGap;
|
||||
gaps_out = config.theme.outerGap;
|
||||
layout = "hy3";
|
||||
resize_on_border = "yes";
|
||||
extend_border_grab_area = 20;
|
||||
border_size = config.theme.borderWidth;
|
||||
"col.active_border" = "rgb(${config.theme.colors.accent})";
|
||||
"col.inactive_border" = "rgb(${config.theme.colors.base04})";
|
||||
};
|
||||
|
||||
# Gestures
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_forever = true;
|
||||
workspace_swipe_cancel_ratio = 0.15;
|
||||
};
|
||||
|
||||
# Decoration
|
||||
decoration = {
|
||||
rounding = config.theme.outerRadius;
|
||||
shadow.enabled = false;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
noise = 0.008;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
# Animations
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"windowIn, 0.06, 0.71, 0.25, 1"
|
||||
"windowResize, 0.04, 0.67, 0.38, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windowsIn, 1, 3, windowIn, slide #popin 20%"
|
||||
"windowsOut, 1, 3, windowIn, slide #popin 70%"
|
||||
"windowsMove, 1, 2.5, windowResize"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 3, default"
|
||||
"workspaces, 1, 6, default"
|
||||
"layers, 1, 5, windowIn, slide"
|
||||
];
|
||||
};
|
||||
|
||||
# Environment
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
|
||||
"XCURSOR_THEME,Adwaita"
|
||||
"XCURSOR_SIZE,24"
|
||||
|
||||
"GTK_THEME,Orchis-Teal-Dark"
|
||||
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_USE_XINPUT,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
];
|
||||
|
||||
# Input
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "gtp:alt_shit_toggle, compose:ralt";
|
||||
kb_rules = "";
|
||||
follow_mouse = 1;
|
||||
touchpad = {
|
||||
natural_scroll = "yes";
|
||||
};
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
# Keybinds
|
||||
"$mod" = "SUPER";
|
||||
bind = [
|
||||
# Launch programs
|
||||
|
||||
"$mod, W, exec, ${config.default.browser}"
|
||||
"$mod, D, exec, ${config.default.appLauncher}"
|
||||
"$mod, L, exec, ${config.default.lockScreen}"
|
||||
"$mod, Return, exec, ${config.default.terminal}"
|
||||
|
||||
# Misc
|
||||
|
||||
"$mod SHIFT, L, exit"
|
||||
"$mod, tab, hyprexpo:expo, toggle"
|
||||
|
||||
# Window operations
|
||||
|
||||
"$mod SHIFT, Q, killactive"
|
||||
"$mod SHIFT, SPACE, togglefloating"
|
||||
"$mod, F, fullscreen"
|
||||
"$mod, J, togglesplit"
|
||||
|
||||
# Move focus with mod + arrow keys
|
||||
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Move window across workspace with mod + arrow keys
|
||||
|
||||
"$mod SHIFT, left, hy3:movewindow, l"
|
||||
"$mod SHIFT, right, hy3:movewindow, r"
|
||||
"$mod SHIFT, up, hy3:movewindow, u"
|
||||
"$mod SHIFT, down, hy3:movewindow, d"
|
||||
|
||||
# Switch workspaces with mod + [0-9]
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
|
||||
# Move active window to a workspace with mod + SHIFT + [0-9]
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
# Move to tab
|
||||
|
||||
"LALT, 1, hy3:focustab, index, 01"
|
||||
"LALT, 2, hy3:focustab, index, 02"
|
||||
"LALT, 3, hy3:focustab, index, 03"
|
||||
"LALT, 4, hy3:focustab, index, 04"
|
||||
"LALT, 5, hy3:focustab, index, 05"
|
||||
"LALT, 6, hy3:focustab, index, 06"
|
||||
"LALT, 7, hy3:focustab, index, 07"
|
||||
"LALT, 8, hy3:focustab, index, 08"
|
||||
"LALT, 9, hy3:focustab, index, 09"
|
||||
"LALT, 0, hy3:focustab, index, 10"
|
||||
|
||||
"$mod SHIFT, B, hy3:makegroup, h"
|
||||
"$mod SHIFT, V, hy3:makegroup, v"
|
||||
"$mod SHIFT, C, hy3:changegroup, toggletab"
|
||||
|
||||
# Scroll through existing workspaces with mod + scroll
|
||||
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
bindn = [
|
||||
# Focus windows with scroll wheel or middle click
|
||||
|
||||
", mouse:272, hy3:focustab, mouse"
|
||||
", mouse_down, hy3:focustab, l, require_hovered"
|
||||
", mouse_up, hy3:focustab, r, require_hovered"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mod + LMB/RMB and dragging
|
||||
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# Audio
|
||||
|
||||
# raise volume
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
# lower volume
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
# mute speaker
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
# mute mic
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
|
||||
# Media
|
||||
|
||||
# play
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
# next
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
# prev
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
|
||||
# Backlight
|
||||
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set 5%+"
|
||||
];
|
||||
|
||||
# Plugin configuration
|
||||
plugin = {
|
||||
# hy3
|
||||
hy3 = {
|
||||
tabs = {
|
||||
height = 24;
|
||||
text_height = 9;
|
||||
text_padding = 10;
|
||||
padding = 2;
|
||||
render_text = true;
|
||||
text_font = "monospace";
|
||||
radius = config.theme.outerRadius;
|
||||
|
||||
"col.active" = "rgb(${config.theme.colors.base00})";
|
||||
"col.inactive" = "rgb(${config.theme.colors.base00})";
|
||||
"col.text.active" = "rgb(${config.theme.colors.base05})";
|
||||
"col.text.inactive" = "rgb(${config.theme.colors.base05})";
|
||||
"col.border.active" = "rgb(${config.theme.colors.accent})";
|
||||
"col.border.inactive" = "rgb(${config.theme.colors.base04})";
|
||||
};
|
||||
|
||||
autotile = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# XWayland
|
||||
xwayland = {
|
||||
force_zero_scaling = "true";
|
||||
use_nearest_neighbor = "false";
|
||||
};
|
||||
|
||||
# Misc
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
key_press_enables_dpms = true;
|
||||
mouse_move_enables_dpms = true;
|
||||
vrr = 1;
|
||||
};
|
||||
}; # end settings
|
||||
|
||||
}; # end hyprland
|
||||
}; # end home-manager
|
||||
|
||||
}
|
89
nix/programs/hypr/hyprlock.nix
Normal file
89
nix/programs/hypr/hyprlock.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
default.lockScreen = lib.mkDefault "hyprlock";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.hyprlock = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
background = {
|
||||
monitor = "";
|
||||
path = config.theme.wallpaper;
|
||||
blur_passes = 3;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = true;
|
||||
};
|
||||
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "250, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(0, 0, 0, 0.5)";
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.font.regular;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<i><span foreground=\"##${config.theme.colors.base05}\">Input Password...</span></i>";
|
||||
hide_input = false;
|
||||
position = "0, -120";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
label = [
|
||||
# Clock
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo \"$(date +\"%-H:%M:%S\")\"";
|
||||
font_size = 80;
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.font.header;
|
||||
position = "0, 500";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
# Name
|
||||
{
|
||||
monitor = "";
|
||||
text = config.fullName;
|
||||
font_color = "rgb(${config.theme.colors.base05})";
|
||||
font_family = config.theme.font.header;
|
||||
font_size = 25;
|
||||
position = "0, 50";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
# Profile image
|
||||
image = {
|
||||
monitor = "";
|
||||
path = config.theme.avatar;
|
||||
size = 300;
|
||||
rounding = -1;
|
||||
border_size = 0;
|
||||
position = "0, 250";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
18
nix/programs/hypr/hyprpaper.nix
Normal file
18
nix/programs/hypr/hyprpaper.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
services.hyprpaper = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
preload = config.theme.wallpaper;
|
||||
wallpaper = ",${config.theme.wallpaper}";
|
||||
splash = false;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
86
nix/programs/kitty/default.nix
Normal file
86
nix/programs/kitty/default.nix
Normal file
|
@ -0,0 +1,86 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
default.terminal = lib.mkDefault "kitty";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.kitty = {
|
||||
|
||||
enable = true;
|
||||
environment = { };
|
||||
extraConfig = "";
|
||||
|
||||
settings = {
|
||||
# Font
|
||||
font_family = config.theme.font.monospace;
|
||||
font_size = 11;
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
|
||||
# Scrollback
|
||||
scrollback_lines = 10000;
|
||||
scrollback_pager_history_size = 300; # MB
|
||||
|
||||
# Urls
|
||||
detect_urls = true;
|
||||
show_hyperlink_targets = false;
|
||||
|
||||
# Window
|
||||
window_padding_width = config.theme.outerGap;
|
||||
window_border_width = 0;
|
||||
draw_minimal_borders = true;
|
||||
background_opacity = config.theme.opacity;
|
||||
|
||||
# Disable audio
|
||||
enable_audio_bell = false;
|
||||
|
||||
# Disable close prompt
|
||||
confirm_os_window_close = 0;
|
||||
|
||||
# colors
|
||||
background = "#${config.theme.colors.base00}";
|
||||
foreground = "#${config.theme.colors.base05}";
|
||||
selection_background = "#${config.theme.colors.base05}";
|
||||
selection_foreground = "#${config.theme.colors.base00}";
|
||||
url_color = "#${config.theme.colors.base04}";
|
||||
cursor = "#${config.theme.colors.base05}";
|
||||
active_border_color = "#${config.theme.colors.base03}";
|
||||
inactive_border_color = "#${config.theme.colors.base01}";
|
||||
active_tab_background = "#${config.theme.colors.base00}";
|
||||
active_tab_foreground = "#${config.theme.colors.base05}";
|
||||
inactive_tab_background = "#${config.theme.colors.base01}";
|
||||
inactive_tab_foreground = "#${config.theme.colors.base04}";
|
||||
tab_bar_background = "#${config.theme.colors.base01}";
|
||||
|
||||
# normal
|
||||
color0 = "#${config.theme.colors.base00}";
|
||||
color1 = "#${config.theme.colors.base08}";
|
||||
color2 = "#${config.theme.colors.base0B}";
|
||||
color3 = "#${config.theme.colors.base0A}";
|
||||
color4 = "#${config.theme.colors.base0D}";
|
||||
color5 = "#${config.theme.colors.base0E}";
|
||||
color6 = "#${config.theme.colors.base0C}";
|
||||
color7 = "#${config.theme.colors.base05}";
|
||||
|
||||
# bright
|
||||
color8 = "#${config.theme.colors.base03}";
|
||||
color9 = "#${config.theme.colors.base08}";
|
||||
color10 = "#${config.theme.colors.base0B}";
|
||||
color11 = "#${config.theme.colors.base0A}";
|
||||
color12 = "#${config.theme.colors.base0D}";
|
||||
color13 = "#${config.theme.colors.base0E}";
|
||||
color14 = "#${config.theme.colors.base0C}";
|
||||
color15 = "#${config.theme.colors.base07}";
|
||||
|
||||
# extended base16 colors
|
||||
color16 = "#${config.theme.colors.base09}";
|
||||
color17 = "#${config.theme.colors.base0F}";
|
||||
color18 = "#${config.theme.colors.base01}";
|
||||
color19 = "#${config.theme.colors.base02}";
|
||||
color20 = "#${config.theme.colors.base04}";
|
||||
color21 = "#${config.theme.colors.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
28
nix/programs/mako/default.nix
Normal file
28
nix/programs/mako/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
services.mako = {
|
||||
|
||||
enable = true;
|
||||
|
||||
font = "${config.theme.font.monospace} 11";
|
||||
|
||||
margin = toString config.theme.outerGap;
|
||||
padding = toString config.theme.innerGap;
|
||||
|
||||
backgroundColor = "#${config.theme.colors.base00}";
|
||||
progressColor = "#${config.theme.colors.base00}";
|
||||
textColor = "#${config.theme.colors.base05}";
|
||||
|
||||
borderColor = "#${config.theme.colors.base05}";
|
||||
borderSize = config.theme.borderWidth;
|
||||
borderRadius = config.theme.outerRadius;
|
||||
|
||||
defaultTimeout = 5000;
|
||||
layer = "overlay";
|
||||
icons = true;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
84
nix/programs/neovim/default.nix
Normal file
84
nix/programs/neovim/default.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
colorschemeLua = ''
|
||||
-- [[ COLORSCHEME ]] --
|
||||
|
||||
local colorscheme = require('base16-colorscheme')
|
||||
colorscheme.setup({
|
||||
base00 = '#${config.theme.colors.base00}',
|
||||
base01 = '#${config.theme.colors.base01}',
|
||||
base02 = '#${config.theme.colors.base02}',
|
||||
base03 = '#${config.theme.colors.base03}',
|
||||
base04 = '#${config.theme.colors.base04}',
|
||||
base05 = '#${config.theme.colors.base05}',
|
||||
base06 = '#${config.theme.colors.base06}',
|
||||
base07 = '#${config.theme.colors.base07}',
|
||||
base08 = '#${config.theme.colors.base08}',
|
||||
base09 = '#${config.theme.colors.base09}',
|
||||
base0A = '#${config.theme.colors.base0A}',
|
||||
base0B = '#${config.theme.colors.base0B}',
|
||||
base0C = '#${config.theme.colors.base0C}',
|
||||
base0D = '#${config.theme.colors.base0D}',
|
||||
base0E = '#${config.theme.colors.base0E}',
|
||||
base0F = '#${config.theme.colors.base0F}',
|
||||
})
|
||||
|
||||
'';
|
||||
|
||||
initLua = lib.fileContents ./init.lua;
|
||||
luaConfig = colorschemeLua + initLua;
|
||||
|
||||
in
|
||||
{
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.neovim = {
|
||||
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
extraLuaConfig = luaConfig;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Deoendencies
|
||||
vim-devicons
|
||||
nvim-web-devicons
|
||||
# Lua functions
|
||||
plenary-nvim
|
||||
# Lines
|
||||
lualine-nvim # mode line
|
||||
bufferline-nvim # buffer line
|
||||
# Menus
|
||||
nvim-tree-lua # file browser
|
||||
undotree # undo menu
|
||||
trouble-nvim # error menu
|
||||
telescope-nvim # grep/find menus
|
||||
# Snippets
|
||||
vim-vsnip
|
||||
vim-vsnip-integ
|
||||
friendly-snippets
|
||||
# Completion
|
||||
nvim-cmp
|
||||
cmp-buffer
|
||||
cmp-nvim-lsp
|
||||
cmp-vsnip
|
||||
nvim-surround # delimiter
|
||||
# Lsp
|
||||
base16-nvim # colorscheme
|
||||
nerdcommenter # comment functions
|
||||
nvim-treesitter.withAllGrammars # hilighting
|
||||
vim-illuminate # hilighting
|
||||
todo-comments-nvim # todo comments
|
||||
nvim-lspconfig # lsp server
|
||||
fidget-nvim # notifications
|
||||
indent-o-matic # auto indentation
|
||||
hologram-nvim # images
|
||||
virt-column-nvim # 80 col line
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
10
nix/programs/ssh/default.nix
Normal file
10
nix/programs/ssh/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = lib.fileContents ./config;
|
||||
};
|
||||
};
|
||||
}
|
49
nix/programs/starship/default.nix
Normal file
49
nix/programs/starship/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
programs.starship = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
format = lib.concatStrings [
|
||||
"╭─ "
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$git_branch"
|
||||
"$directory"
|
||||
"$line_break"
|
||||
"╰─ "
|
||||
];
|
||||
|
||||
username = {
|
||||
style_user = "bold cyan";
|
||||
style_root = "bold red";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "on [$hostname](bold blue) ";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
format = "[$path]($style)[$read_only]($read_only_style) ";
|
||||
truncation_length = -1;
|
||||
truncate_to_repo = false;
|
||||
truncation_symbol = "…/";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold purple";
|
||||
format = "at [$symbol$branch(:$remote_branch)]($style) ";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
81
nix/programs/waybar/default.nix
Normal file
81
nix/programs/waybar/default.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${config.user} = {
|
||||
programs.waybar = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = [{
|
||||
height = 24;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 4;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"battery"
|
||||
"wireplumber"
|
||||
"network"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
format = "{name}";
|
||||
};
|
||||
|
||||
battery = {
|
||||
interval = 1;
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = " {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-warning = " {capacity}%";
|
||||
format-critical = " {capacity}%";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = " {volume}%";
|
||||
format-bluetooth = " {volume}%";
|
||||
format-muted = " muted";
|
||||
scroll-step = 1;
|
||||
on-click = "pavucontrol";
|
||||
ignored-sinks = ["Easy Effects Sink"];
|
||||
};
|
||||
|
||||
network = {
|
||||
format = " disconnected";
|
||||
format-wifi = " {essid}";
|
||||
format-ethernet = " {ipaddr}/{cidr}";
|
||||
format-disconnected = " disconnected";
|
||||
max-length = 50;
|
||||
on-click = "nm-connection-editor";
|
||||
};
|
||||
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%Y-%m-%d %a %H:%M:%S}";
|
||||
};
|
||||
|
||||
tray = {
|
||||
spacing = config.theme.outerGap;
|
||||
};
|
||||
}];
|
||||
|
||||
|
||||
style = import ./style.nix { theme = config.theme; };
|
||||
};
|
||||
};
|
||||
}
|
134
nix/programs/waybar/style.nix
Normal file
134
nix/programs/waybar/style.nix
Normal file
|
@ -0,0 +1,134 @@
|
|||
{ theme }:
|
||||
|
||||
let
|
||||
|
||||
accentColor = "#${theme.colors.accent}";
|
||||
textColor = "#${theme.colors.base05}";
|
||||
baseColor = "#${theme.colors.base00}";
|
||||
surfaceColor = "#${theme.colors.base02}";
|
||||
greenColor = "#${theme.colors.base0B}";
|
||||
yellowColor = "#${theme.colors.base0A}";
|
||||
redColor = "#${theme.colors.base08}";
|
||||
fontSize = "${toString theme.font.size}px";
|
||||
outerGap = "${toString theme.outerGap}px";
|
||||
innerGap = "${toString theme.innerGap}px";
|
||||
outerRadius = "${toString theme.outerRadius}px";
|
||||
innerRadius = "${toString theme.innerRadius}px";
|
||||
borderWidth = "${toString theme.borderWidth}px";
|
||||
|
||||
in
|
||||
|
||||
''
|
||||
/** Base */
|
||||
|
||||
window#waybar {
|
||||
font-family: "${theme.font.regular}", "${theme.font.regular}", "${theme.font.monospace}";
|
||||
font-size: ${fontSize};
|
||||
color: ${textColor};
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
window#waybar > box {
|
||||
margin: ${outerGap};
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.modules-left,
|
||||
.modules-right {
|
||||
padding: ${innerGap} 0px;
|
||||
border-radius: ${outerRadius};
|
||||
background-color: ${baseColor};
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
}
|
||||
|
||||
/** Workspaces */
|
||||
|
||||
#workspaces {
|
||||
margin-left: ${innerGap};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
all: initial;
|
||||
color: ${textColor};
|
||||
background-color: transparent;
|
||||
border-radius: ${innerRadius};
|
||||
padding: ${innerGap} ${outerGap};
|
||||
}
|
||||
|
||||
#workspaces button.focused,
|
||||
#workspaces button.active {
|
||||
background-color: ${accentColor};
|
||||
color: ${baseColor};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: ${redColor};
|
||||
}
|
||||
|
||||
/** Window */
|
||||
|
||||
window#waybar:not(.empty) #window {
|
||||
padding: 0 ${outerGap};
|
||||
border-left: ${borderWidth} solid ${surfaceColor};
|
||||
margin: 0 ${innerGap};
|
||||
}
|
||||
|
||||
/** Tray */
|
||||
|
||||
#tray {
|
||||
border: none;
|
||||
margin-right: ${outerGap};
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
}
|
||||
|
||||
/** Right modules */
|
||||
|
||||
#battery,
|
||||
#wireplumber,
|
||||
#network,
|
||||
#clock {
|
||||
padding: 0 ${outerGap};
|
||||
border-right: ${borderWidth} solid ${surfaceColor};
|
||||
color: ${textColor};
|
||||
}
|
||||
|
||||
/** Battery */
|
||||
|
||||
#battery.charging {
|
||||
color: ${greenColor};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: ${yellowColor};
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
color: ${redColor};
|
||||
}
|
||||
|
||||
/** Wireplumber */
|
||||
|
||||
#wireplumber.muted {
|
||||
color: ${redColor};
|
||||
}
|
||||
|
||||
/** Network */
|
||||
|
||||
#network.wifi,
|
||||
#network.ethernet {
|
||||
color: ${greenColor};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: ${redColor};
|
||||
}
|
||||
|
||||
''
|
||||
|
22
nix/programs/wireguard/default.nix
Normal file
22
nix/programs/wireguard/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
];
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
networking.wireguard.interfaces = {
|
||||
freyanet = {
|
||||
ips = [ "10.2.0.2/32" "fd:cafe:dead:bee::2/128" "fe80::2/128" ];
|
||||
privateKeyFile = "${config.dotfilesPath}/secrets/freyanet.key";
|
||||
|
||||
peers = [{
|
||||
publicKey = "x0ykwakpYCvI/pG+nR83lNUyeOE9m54thnX3bvZ+FUk=";
|
||||
allowedIPs = [ "10.0.0.0/12" "fd:cafe::/32" "fe80::/64" ];
|
||||
endpoint = "freya.cat:41111";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
24
nix/programs/wofi/default.nix
Normal file
24
nix/programs/wofi/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.wofi = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
key_expand = "Tab";
|
||||
term = "kitty";
|
||||
matching = "multi-contains";
|
||||
insensitive = true;
|
||||
gtk_dark = true;
|
||||
hide_scroll = true;
|
||||
};
|
||||
|
||||
style = import ./style.nix { theme = config.theme; };
|
||||
|
||||
};
|
||||
};
|
||||
}
|
80
nix/programs/wofi/style.nix
Normal file
80
nix/programs/wofi/style.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{ theme }:
|
||||
|
||||
let
|
||||
|
||||
accentColor = "#${theme.colors.accent}";
|
||||
textColor = "#${theme.colors.base05}";
|
||||
baseColor = "#${theme.colors.base00}";
|
||||
surfaceColor = "#${theme.colors.base02}";
|
||||
fontSize = "${toString theme.font.size}px";
|
||||
outerGap = "${toString theme.outerGap}px";
|
||||
innerGap = "${toString theme.innerGap}px";
|
||||
outerRadius = "${toString theme.outerRadius}px";
|
||||
innerRadius = "${toString theme.innerRadius}px";
|
||||
borderWidth = "${toString theme.borderWidth}px";
|
||||
|
||||
in
|
||||
|
||||
''
|
||||
* {
|
||||
font-family: ${theme.font.monospace};
|
||||
font-size: ${fontSize};
|
||||
}
|
||||
|
||||
/* Window */
|
||||
window {
|
||||
margin: 0px;
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
border-radius: ${outerRadius};
|
||||
background-color: ${baseColor};
|
||||
}
|
||||
|
||||
/* Outer Box */
|
||||
#outer-box {
|
||||
padding: ${outerGap};
|
||||
}
|
||||
|
||||
/* Scroll */
|
||||
#scroll {
|
||||
margin: 0px;
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
#input {
|
||||
margin: ${innerGap};
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
color: ${textColor};
|
||||
background-color: ${surfaceColor};
|
||||
border-radius: ${outerRadius};
|
||||
}
|
||||
|
||||
#input:focus,
|
||||
#input:active {
|
||||
border: ${borderWidth} solid ${accentColor};
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Text */
|
||||
#text {
|
||||
margin: ${innerGap};
|
||||
padding: ${innerGap};
|
||||
border: none;
|
||||
color: ${textColor};
|
||||
}
|
||||
|
||||
/* Selected Entry */
|
||||
#entry:selected {
|
||||
background-color: ${accentColor};
|
||||
border-radius: ${outerRadius};
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
color: ${baseColor};
|
||||
}
|
||||
|
||||
''
|
||||
|
19
nix/programs/zsh/default.nix
Normal file
19
nix/programs/zsh/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableGlobalCompInit = false;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
histSize = 10000;
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
home.file = {
|
||||
".zshrc".source = ./zshrc;
|
||||
".zprofile".source = ./zprofile;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
# zsh initalization file
|
||||
|
||||
# export 'SHELL' and 'EDITOR' to child processes
|
||||
# export 'SHELL' to child processes
|
||||
export SHELL
|
||||
export EDITOR="nvim"
|
||||
|
||||
if [[ $- != *i* ]]
|
||||
then
|
||||
|
@ -41,7 +40,8 @@ alias vim="nvim"
|
|||
alias ssh='TERM=xterm-256color ssh' # xterm-kitty bad
|
||||
|
||||
# nix rebuild
|
||||
alias reconfigure="sudo nixos-rebuild switch --flake ~/.config/nix#$(hostname)"
|
||||
alias rs="sudo nixos-rebuild switch --flake ~/.config/nix#$(hostname)"
|
||||
alias rh="sudo home-manager switch --flake ~/.config/nix#$(hostname)"
|
||||
|
||||
# manpages
|
||||
export LESS_TERMCAP_md=$'\e[1;36m'
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# allow flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# common system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -34,33 +36,31 @@
|
|||
# locale
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# system component
|
||||
networking.networkmanager.enable = config.system.enable;
|
||||
services.fwupd.enable = config.system.enable;
|
||||
services.pcscd.enable = config.system.enable;
|
||||
services.printing.enable = config.system.enable;
|
||||
# services
|
||||
networking.networkmanager.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.pipewire = {
|
||||
enable = config.system.enable;
|
||||
alsa.enable = config.system.enable;
|
||||
pulse.enable = config.system.enable;
|
||||
jack.enable = config.system.enable;
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# gui component
|
||||
services.libinput.enable = config.desktop.enable;
|
||||
|
||||
# create user account
|
||||
users.users.${config.user} = {
|
||||
isNormalUser = true;
|
||||
description = config.fullName;
|
||||
extraGroups = if config.system.enable then [ "networkmanager" "wheel" "sys" "video" "audio" ] else [ "wheel" ];
|
||||
extraGroups = [ "networkmanager" "wheel" "sys" "video" "audio" ];
|
||||
home = config.homePath;
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# certs
|
||||
security.pki.certificateFiles = [
|
||||
../files/certs/freyanet.crt
|
||||
../../files/certs/freyanet.crt
|
||||
];
|
||||
|
||||
# fonts
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
catppuccin = import ./catppuccin;
|
||||
tricolor = import ./tricolor.nix;
|
||||
}
|
22
nix/themes/tricolor.nix
Normal file
22
nix/themes/tricolor.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
name = "Tricolor";
|
||||
author = "https://trimill.xyz";
|
||||
|
||||
base00 = "14171d";
|
||||
base01 = "1f242d";
|
||||
base02 = "343c4b";
|
||||
base03 = "4d4754";
|
||||
base04 = "4d4754";
|
||||
base05 = "c7c6c3";
|
||||
base06 = "ada0a8";
|
||||
base07 = "ada0a8";
|
||||
base08 = "a63a3a";
|
||||
base09 = "f0c767";
|
||||
base0A = "7b5687";
|
||||
base0B = "3d67a2";
|
||||
base0C = "578c7c";
|
||||
base0D = "789ebf";
|
||||
base0E = "a97fb3";
|
||||
base0F = "c7c6c3";
|
||||
|
||||
}
|
16
options.nix
16
options.nix
|
@ -3,17 +3,25 @@
|
|||
fullName = "Freya Murphy";
|
||||
email = "freya@freyacat.org";
|
||||
|
||||
# custom theme
|
||||
theme = rec {
|
||||
colors = (import ./modules/themes).catppuccin.mocha;
|
||||
accentColor = colors.base0D;
|
||||
colors = (import ./nix/themes).catppuccin.mocha;
|
||||
|
||||
opacity = 0.75;
|
||||
outerRadius = 5;
|
||||
innerRadius = 2;
|
||||
outerGap = 10;
|
||||
innerGap = 3;
|
||||
|
||||
wallpaper = "~/.config/nix/files/wallpapers/gay.png";
|
||||
avatar = "~/.config/nix/files/pfps/freya.png";
|
||||
};
|
||||
|
||||
wallpaper = "~/.config/nix/files/wallpapers/gay.png";
|
||||
avatar = "~/.config/nix/files/pfps/freya.png";
|
||||
# programs to auto run in gui
|
||||
autoRun = [
|
||||
"waybar"
|
||||
"thunderbird"
|
||||
"discord --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
"element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue