fully refactored stolen config :D
This commit is contained in:
parent
840cfef3d5
commit
0dd4f09001
39 changed files with 1603 additions and 206 deletions
65
flake.nix
65
flake.nix
|
@ -1,58 +1,27 @@
|
|||
{
|
||||
description = "Our NixOS config lol";
|
||||
|
||||
description = "lololo";
|
||||
outputs = inputs @ { self, nixpkgs, ... }:
|
||||
{
|
||||
inherit (nixpkgs) lib;
|
||||
nixosConfigurations = import ./hosts { inherit inputs; };
|
||||
};
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
schizofox.url = "github:schizofox/schizofox";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/";
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, nur, home-manager, ... }:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
mkSystem = {
|
||||
hostname,
|
||||
modules ? [],
|
||||
user-configs ? [],
|
||||
system ? "x86_64-linux"
|
||||
}:
|
||||
let
|
||||
profile-config = { inherit hostname system modules user-configs; };
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit modules;
|
||||
specialArgs = { inherit inputs outputs profile-config; };
|
||||
};
|
||||
mkHome = user: modules: pkgs: home-manager.lib.homeManagerConfiguration {
|
||||
inherit modules pkgs user;
|
||||
extraSpecialArgs = { inherit inputs outputs user; };
|
||||
};
|
||||
in {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
nixosConfigurations = {
|
||||
vlaptop = mkSystem {
|
||||
hostname = "nixos";
|
||||
modules = [./hosts/vali/laptop ./modules/vali];
|
||||
user-configs = [{
|
||||
name = "vali";
|
||||
config = ./homes/vali/vlaptop.nix;
|
||||
}];
|
||||
};
|
||||
vdesktop = mkSystem {
|
||||
hostname = "nixos";
|
||||
modules = [ ./hosts/vali/desktop];
|
||||
user-configs = [{
|
||||
name = "vali";
|
||||
config = ./homes/vali/vdesktop.nix;
|
||||
}];
|
||||
};
|
||||
};
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
|
||||
schizofox = {
|
||||
url = "github:schizofox/schizofox";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
{ inputs, outputs, profile-config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
#profile-config.overlays
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
services.locate = {
|
||||
enable = true;
|
||||
interval = "daily";
|
||||
package = pkgs.plocate;
|
||||
localuser = null;
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.users = builtins.listToAttrs (builtins.map(
|
||||
u-conf: {
|
||||
inherit inputs;
|
||||
name = u-conf.name;
|
||||
value = import u-conf.config { inherit pkgs inputs outputs; user = u-conf.name; };
|
||||
}
|
||||
)profile-config.user-configs);
|
||||
|
||||
users.users = builtins.listToAttrs (builtins.map(
|
||||
u-conf: {
|
||||
name = u-conf.name;
|
||||
value = {
|
||||
initialPassword = "${u-conf.name}";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "audio" "video" "input"];
|
||||
};
|
||||
}
|
||||
)profile-config.user-configs);
|
||||
|
||||
time.timeZone = "Europe/Zurich";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
documentation.nixos.enable = false;
|
||||
# Set the keyboard layout to german
|
||||
# Eable CUPS
|
||||
services.printing.enable = true;
|
||||
# Sound settings
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
};
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ inputs, outputs, profile-config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
neovim
|
||||
eza
|
||||
zsh
|
||||
git
|
||||
zip
|
||||
unzip
|
||||
neofetch
|
||||
fastfetch
|
||||
wget
|
||||
zoxide
|
||||
python3
|
||||
gcc
|
||||
htop
|
||||
networkmanager
|
||||
uwufetch
|
||||
];
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
inherit (inputs) self;
|
||||
inherit (self) lib;
|
||||
in {
|
||||
vali = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit lib inputs self; };
|
||||
};
|
||||
modules = [
|
||||
./vali
|
||||
../modules/vali
|
||||
inputs.home-manager.noxosModules.home-manager
|
||||
inputs.agenix.noxosModules.default
|
||||
];
|
||||
}
|
66
hosts/vali/configuration.nix
Normal file
66
hosts/vali/configuration.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Zurich";
|
||||
security.sudo.package = pkgs.sudo.override { withInsults = true; };
|
||||
security.polkit.enable = true;
|
||||
programs.kdeconnect.enable = true;
|
||||
myOptions = {
|
||||
other = {
|
||||
system = {
|
||||
hostname = "nixos";
|
||||
username = "vali";
|
||||
};
|
||||
home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
vesktop.enable = true;
|
||||
btop.enable = true;
|
||||
mpv.enable = true;
|
||||
neovim.enable = true;
|
||||
pipewire.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "vali";
|
||||
userEmail = "valentin@kaas.cc";
|
||||
defaultBranch = "master";
|
||||
};
|
||||
starship.enable = true;
|
||||
zsh = {
|
||||
enable = true;
|
||||
profiling = false;
|
||||
};
|
||||
i3 = {
|
||||
|
||||
};
|
||||
};
|
||||
themes = {
|
||||
cursor = {
|
||||
enable = true;
|
||||
package = pkgs.bibabta.cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = "24";
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-gtk;
|
||||
name = "Catppuccin-Mocha-Standard-Green-Dark";
|
||||
variant = "mocha";
|
||||
accentColour = "green";
|
||||
iconTtheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-foldersM
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-kde;
|
||||
name = "Catppuccin-Mocha-Dark"
|
||||
variant = "mocha";
|
||||
accentColour = "green";
|
||||
};
|
||||
};
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
8
hosts/vali/default.nix
Normal file
8
hosts/vali/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./programs.nix
|
||||
./hardware-configuration.nix
|
||||
./profile.nix
|
||||
]
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ inputs, outputs, profile-config, pkgs, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ inputs, outputs, pks, lib, profile-config, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../modules/vali/default.nix
|
||||
../../common
|
||||
./hardware-configuration.nix
|
||||
./packages.nix
|
||||
./boot.nix
|
||||
];
|
||||
i3wm.enable = true;
|
||||
security.polkit.enable = true;
|
||||
# Set the keyboard layout to DE
|
||||
services.xserver.xkb.layout = "de";
|
||||
console.keyMap = "de";
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{ inputs, outputs, pkgs, profile-config, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
jetbrains.idea-community
|
||||
ani-cli
|
||||
okular
|
||||
texliveFull
|
||||
signal-desktop
|
||||
nextcloud-client
|
||||
vlc
|
||||
strawberry
|
||||
telegram-desktop
|
||||
betterbird
|
||||
xclip
|
||||
pavucontrol
|
||||
lazygit
|
||||
vesktop
|
||||
zsh
|
||||
zoxide
|
||||
eza
|
||||
mpv
|
||||
librewolf
|
||||
keepassxc
|
||||
feh
|
||||
libreoffice
|
||||
openjdk
|
||||
];
|
||||
}
|
11
hosts/vali/profile.nix
Normal file
11
hosts/vali/profile.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
_: {
|
||||
imports = [
|
||||
../../options/boot/grub-boot.nix
|
||||
../../options/desktop/fonts.nix
|
||||
../../options/common/networking.nix
|
||||
../../options/common/gpu/nvidia.nix
|
||||
../../options/common/pin-registry.nix
|
||||
../../options/common/preserve-system.nix
|
||||
#../../options/
|
||||
];
|
||||
}
|
57
hosts/vali/programs.nix
Normal file
57
hosts/vali/programs.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
let
|
||||
username = config.myOptions.other.system.usermame;
|
||||
in
|
||||
home-manager.users.${username} = {
|
||||
home.packages = let
|
||||
|
||||
in with pkgs; [
|
||||
git
|
||||
keepassxc
|
||||
eza ripgrep
|
||||
signal-desktop-beta
|
||||
element-desktop
|
||||
steam
|
||||
tor-browser-bundle-bin
|
||||
betterbird
|
||||
telegram-desktop
|
||||
libreoffice-fresh
|
||||
qbittorrent
|
||||
ventoy-full
|
||||
zip
|
||||
unzip
|
||||
gcc
|
||||
trash-cli
|
||||
bibata-cursors
|
||||
networkmanagerapplet
|
||||
xclip
|
||||
pamixer
|
||||
dig
|
||||
pcmanfm
|
||||
ffmpeg_6-full
|
||||
yt-dlp
|
||||
(fenix.complete.withComponents [
|
||||
"cargo"
|
||||
"clippy"
|
||||
"rust-src"
|
||||
"rustc"
|
||||
"rustfmt"
|
||||
])
|
||||
polkit
|
||||
asciinema
|
||||
fastfetch
|
||||
alsa-utils
|
||||
imagemagick
|
||||
pavucontrol
|
||||
gdb
|
||||
tree
|
||||
smartmontools
|
||||
krita
|
||||
python3
|
||||
rustdesk
|
||||
httpie
|
||||
sherlock
|
||||
strawberry
|
||||
];
|
||||
};
|
||||
}
|
7
modules/vali/cli/default.nix
Normal file
7
modules/vali/cli/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./git.nix
|
||||
./starship.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
63
modules/vali/cli/git.nix
Normal file
63
modules/vali/cli/git.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.git;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.git = {
|
||||
enable = mkEnableOption "git";
|
||||
userName = mkOption {
|
||||
type = types.str;
|
||||
description = "git username";
|
||||
};
|
||||
userEmail = mkOption {
|
||||
type = types.str;
|
||||
description = "git email";
|
||||
};
|
||||
# signingKey = mkOption {
|
||||
# type = types.str;
|
||||
# description = "git commit signing key";
|
||||
# };
|
||||
editor = mkOption {
|
||||
type = types.str;
|
||||
default = "$EDITOR";
|
||||
description = "commit message editor";
|
||||
};
|
||||
defaultBranch = mkOption {
|
||||
type = types.str;
|
||||
default = "master";
|
||||
description = "default git branch";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.git = {
|
||||
inherit (cfg) enable userName userEmail;
|
||||
extraConfig = {
|
||||
core = {
|
||||
editor = cfg.editor;
|
||||
pager = "${pkgs.delta}/bin/delta";
|
||||
};
|
||||
init.defaultBranch = cfg.defaultBranch;
|
||||
push.autoSetupRemote = true;
|
||||
commit = {
|
||||
verbose = true;
|
||||
gpgsign = true;
|
||||
};
|
||||
gpg.format = "ssh";
|
||||
# user.signingkey = "key::${cfg.signingKey}";
|
||||
merge.conflictstyle = "zdiff3";
|
||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||
diff.algorithm = "histogram";
|
||||
transfer.fsckobjects = true;
|
||||
fetch.fsckobjects = true;
|
||||
receive.fsckobjects = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
42
modules/vali/cli/starship.nix
Normal file
42
modules/vali/cli/starship.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.starship;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.starship.enable = mkEnableOption "starship";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = config.myOptions.programs.zsh.enable;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
command_timeout = 1000;
|
||||
line_break = {
|
||||
disabled = true;
|
||||
};
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = false;
|
||||
truncation_symbol = "…/";
|
||||
};
|
||||
c.symbol = " ";
|
||||
directory.read_only = " ";
|
||||
git_branch.symbol = " ";
|
||||
haskell.symbol = " ";
|
||||
hostname.ssh_symbol = " ";
|
||||
java.symbol = " ";
|
||||
kotlin.symbol = " ";
|
||||
meson.symbol = " ";
|
||||
nix_shell.symbol = " ";
|
||||
package.symbol = " ";
|
||||
rust.symbol = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
67
modules/vali/cli/zsh.nix
Normal file
67
modules/vali/cli/zsh.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib; let
|
||||
cfg = config.myOptions.programs.zsh;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.zsh = {
|
||||
enable = mkEnableOption "zsh";
|
||||
extraAliases = mkOption {
|
||||
type = types.attrs;
|
||||
description = "extra shell aliases";
|
||||
default = {};
|
||||
};
|
||||
profiling = mkOption {
|
||||
type = types.bool;
|
||||
description = "enable zsh profiling";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.zsh.enable = true;
|
||||
user.users.${username}.shell = pkgs.zsh;
|
||||
environment = {
|
||||
shells = [ pkgs.zsh ];
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
c = "clear";
|
||||
cc = "cd && clear";
|
||||
mv = "mv -iv";
|
||||
rm = "trash -v";
|
||||
l = "eza -a --icons";
|
||||
la = "eza -lha --icons --git";
|
||||
cd = "zoxide"
|
||||
} // cfg.extraAliases;
|
||||
initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof";
|
||||
initExtra = mkIf cfg.profiling "zprof";
|
||||
history {
|
||||
path = "${config.home-manager.users.${username}.xdg.dataHome}/zsh/zsh_history";
|
||||
size = 99999;
|
||||
save = 99999;
|
||||
extended = true;
|
||||
ignoreSpace = true;
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
autocd = false;
|
||||
dotDir = ".config/zsh";
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "fast-syntax-highlighting.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zdharma-continuum";
|
||||
repo = "fast-syntax-highlighting";
|
||||
rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
|
||||
sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
_: {
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{ pkgs, lib, config, ...}:
|
||||
{
|
||||
imports = [
|
||||
./core/boot/boot.nix
|
||||
./graphics/default.nix
|
||||
#./web/default.nix
|
||||
#./terminal/default.nix
|
||||
./cli/default.nix
|
||||
./gui/default.nix
|
||||
./other/default.nix
|
||||
./services/default.nix
|
||||
];
|
||||
}
|
||||
|
|
39
modules/vali/gui/cursor.nix
Normal file
39
modules/vali/gui/cursor.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.themes.cursor;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.themes.cursor = {
|
||||
enable = mkEnableOption "cursor theming";
|
||||
package = mkOption {
|
||||
description = "cursor theme package";
|
||||
type = types.package;
|
||||
};
|
||||
name = mkOption {
|
||||
description = "cursor theme name";
|
||||
type = types.str;
|
||||
};
|
||||
size = mkOption {
|
||||
description = "cursor size";
|
||||
type = types.int;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
XCURSOR_THEME = "${cfg.name}";
|
||||
XCURSOR_SIZE = "${toString cfg.size}";
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home.pointerCursor = {
|
||||
inherit (cfg) package name size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
373
modules/vali/gui/default.nix
Normal file
373
modules/vali/gui/default.nix
Normal file
|
@ -0,0 +1,373 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.vesktop;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.vesktop = {
|
||||
enable = mkEnableOption "vesktop";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
xdg.configFile."vesktop/settings.json".text = builtins.toJSON {
|
||||
discordBranch = "ptb";
|
||||
firstLaunch = false;
|
||||
arRPC = "on";
|
||||
splashColor = "rgb(219, 222, 225)";
|
||||
splashBackground = "rgb(49, 51, 56)";
|
||||
checkUpdates = false;
|
||||
staticTitle = true;
|
||||
disableMinSize = true;
|
||||
minimizeToTray = false;
|
||||
tray = false;
|
||||
appBadge = false;
|
||||
};
|
||||
|
||||
xdg.configFile."vesktop/settings/settings.json".text = builtins.toJSON {
|
||||
notifyAboutUpdates = false;
|
||||
autoUpdate = false;
|
||||
autoUpdateNotification = false;
|
||||
useQuickCss = true;
|
||||
themeLinks = [];
|
||||
enabledThemes = ["Catppuccin.theme.css"];
|
||||
enableReactDevtools = true;
|
||||
frameless = false;
|
||||
transparent = false;
|
||||
winCtrlQ = false;
|
||||
macosTranslucency = false;
|
||||
disableMinSize = true;
|
||||
winNativeTitleBar = false;
|
||||
plugins = {
|
||||
BadgeAPI.enabled = true;
|
||||
CommandsAPI.enabled = true;
|
||||
ContextMenuAPI.enabled = true;
|
||||
MemberListDecoratorsAPI.enabled = true;
|
||||
MessageAccessoriesAPI.enabled = true;
|
||||
MessageDecorationsAPI.enabled = true;
|
||||
MessageEventsAPI.enabled = true;
|
||||
MessagePopoverAPI.enabled = true;
|
||||
NoticesAPI.enabled = true;
|
||||
ServerListAPI.enabled = true;
|
||||
SettingsStoreAPI.enabled = true;
|
||||
NoTrack.enabled = true;
|
||||
Settings = {
|
||||
enabled = true;
|
||||
settingsLocation = "aboveActivity";
|
||||
};
|
||||
AlwaysAnimate.enabled = false;
|
||||
AlwaysTrust.enabled = false;
|
||||
AnonymiseFileNames.enabled = false;
|
||||
"WebRichPresence (arRPC)".enabled = false;
|
||||
BANger.enabled = false;
|
||||
BetterFolders = {
|
||||
enabled = true;
|
||||
sidebar = true;
|
||||
sidebarAnim = true;
|
||||
closeAllFolders = false;
|
||||
closeAllHomeButton = false;
|
||||
closeOthers = false;
|
||||
forceOpen = false;
|
||||
keepIcons = false;
|
||||
showFolderIcon = 1;
|
||||
};
|
||||
BetterGifAltText.enabled = false;
|
||||
BetterNotesBox.enabled = false;
|
||||
BetterRoleDot.enabled = false;
|
||||
BetterUploadButton.enabled = true;
|
||||
BiggerStreamPreview.enabled = true;
|
||||
BlurNSFW.enabled = false;
|
||||
CallTimer = {
|
||||
enabled = true;
|
||||
format = "human";
|
||||
};
|
||||
ClearURLs.enabled = true;
|
||||
ColorSighted.enabled = true;
|
||||
ConsoleShortcuts.enabled = false;
|
||||
CopyUserURLs.enabled = true;
|
||||
CrashHandler.enabled = true;
|
||||
CustomRPC.enabled = false;
|
||||
Dearrow.enabled = true;
|
||||
DisableDMCallIdle.enabled = true;
|
||||
EmoteCloner.enabled = false;
|
||||
Experiments = {
|
||||
enabled = true;
|
||||
enableIsStaff = false;
|
||||
};
|
||||
F8Break.enabled = false;
|
||||
FakeNitro = {
|
||||
enabled = true;
|
||||
enableEmojiBypass = true;
|
||||
emojiSize = 48;
|
||||
transformEmojis = true;
|
||||
enableStickerBypass = true;
|
||||
stickerSize = 160;
|
||||
transformStickers = true;
|
||||
transformCompoundSentence = false;
|
||||
enableStreamQualityBypass = true;
|
||||
};
|
||||
FakeProfileThemes = {
|
||||
enabled = true;
|
||||
nitroFirst = true;
|
||||
};
|
||||
FavoriteEmojiFirst.enabled = true;
|
||||
FavoriteGifSearch = {
|
||||
enabled = true;
|
||||
searchOption = "hostandpath";
|
||||
};
|
||||
FixImagesQuality.enabled = true;
|
||||
FixSpotifyEmbed = {
|
||||
enabled = true;
|
||||
volume = 10;
|
||||
};
|
||||
ForceOwnerCrown.enabled = true;
|
||||
FriendInvites.enabled = false;
|
||||
GameActivityToggle.enabled = true;
|
||||
GifPaste.enabled = true;
|
||||
HideAttachments.enabled = true;
|
||||
iLoveSpam.enabled = true;
|
||||
IgnoreActivities = {
|
||||
enabled = true;
|
||||
ignoredActivities = [];
|
||||
};
|
||||
ImageZoom = {
|
||||
enabled = true;
|
||||
saveZoomValues = true;
|
||||
invertScroll = true;
|
||||
nearestNeighbour = false;
|
||||
square = false;
|
||||
zoom = 2;
|
||||
size = 100;
|
||||
zoomSpeed = 0.5;
|
||||
};
|
||||
InvisibleChat = {
|
||||
enabled = true;
|
||||
savedPasswords = "password";
|
||||
};
|
||||
KeepCurrentChannel.enabled = true;
|
||||
LastFMRichPresence.enabled = false;
|
||||
LoadingQuotes.enabled = false;
|
||||
MemberCount.enabled = true;
|
||||
MessageClickActions = {
|
||||
enabled = true;
|
||||
enableDeleteOnClick = true;
|
||||
enableDoubleClickToEdit = true;
|
||||
enableDoubeClickToReply = true;
|
||||
requireModifier = true;
|
||||
};
|
||||
MessageLinkEmbeds = {
|
||||
enabled = true;
|
||||
automodEmbeds = "never";
|
||||
listMode = "blacklist";
|
||||
idList = "";
|
||||
};
|
||||
MessageLogger = {
|
||||
enabled = true;
|
||||
deleteStyle = "text";
|
||||
ignoreBots = false;
|
||||
ignoreSelf = false;
|
||||
ignoreUsers = "";
|
||||
ignoreChannels = "";
|
||||
ignoreGuilds = "";
|
||||
};
|
||||
MessageTags.enabled = false;
|
||||
MoreCommands.enabled = true;
|
||||
MoreKaomoji.enabled = true;
|
||||
MoreUserTags.enabled = true;
|
||||
Moyai.enabled = false;
|
||||
MuteNewGuild = {
|
||||
enabled = true;
|
||||
guild = false;
|
||||
everyone = true;
|
||||
role = true;
|
||||
};
|
||||
MutualGroupDMs.enabled = true;
|
||||
NoBlockedMessages = {
|
||||
enabled = false;
|
||||
ignoreBlockedMessages = false;
|
||||
};
|
||||
NoDevtoolsWarning.enabled = false;
|
||||
NoF1.enabled = false;
|
||||
NoPendingCount.enabled = false;
|
||||
NoProfileThemes.enabled = true;
|
||||
NoReplyMention = {
|
||||
enabled = true;
|
||||
userList = "372809091208445953";
|
||||
shouldPingListed = false;
|
||||
inverseShiftReply = true;
|
||||
};
|
||||
NoScreensharePreview.enabled = true;
|
||||
NoTypingAnimation = true;
|
||||
NoUnblockToJump.enabled = true;
|
||||
NSFWGateBypass.enabled = true;
|
||||
oneko.enabled = false;
|
||||
OpenInApp.enabled = false;
|
||||
"Party mode 🎉".enabled = false;
|
||||
PermissionFreeWill = {
|
||||
enabled = true;
|
||||
lockout = true;
|
||||
onboarding = true;
|
||||
};
|
||||
PermissionsViewer = {
|
||||
enabled = true;
|
||||
permissionsSortOrder = 0;
|
||||
defaultPermissionsDropdownState = false;
|
||||
};
|
||||
petpet.enabled = true;
|
||||
PictureInPicture = {
|
||||
enabled = true;
|
||||
loop = false;
|
||||
};
|
||||
PinDMs.enabled = true;
|
||||
PlainFolderIcon.enabled = false;
|
||||
PlatformIndicators = {
|
||||
enabled = true;
|
||||
list = true;
|
||||
badges = true;
|
||||
messages = true;
|
||||
colorMobileIndicator = true;
|
||||
};
|
||||
PreviewMessage.enabled = true;
|
||||
PronounDB.enabled = false;
|
||||
QuickMention.enabled = false;
|
||||
QuickReply.enabled = false;
|
||||
ReactErrorDecoder.enabled = false;
|
||||
ReadAllNotificationsButton.enabled = false;
|
||||
RelationshipNotifier = {
|
||||
enabled = true;
|
||||
notices = true;
|
||||
offlineRemovals = true;
|
||||
friends = true;
|
||||
friendRequestCancels = true;
|
||||
servers = true;
|
||||
groups = true;
|
||||
};
|
||||
RevealAllSpoilers.enabled = true;
|
||||
ReverseImageSearch.enabled = false;
|
||||
ReviewDB.enabled = false;
|
||||
RoleColorEverywhere = {
|
||||
enabled = true;
|
||||
chatMentions = true;
|
||||
memberList = true;
|
||||
voiceUsers = true;
|
||||
};
|
||||
SearchReply.enabled = true;
|
||||
SendTimestamps.enabled = false;
|
||||
ServerListIndicators = {
|
||||
enabled = true;
|
||||
mode = 3;
|
||||
};
|
||||
ServerProfile.enabled = true;
|
||||
ShikiCodeblocks = {
|
||||
enabled = true;
|
||||
theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
|
||||
tryHljs = "SECONDARY";
|
||||
uesDevIcon = "GREYSCALE";
|
||||
bgOpacity = 100;
|
||||
};
|
||||
ShowAllMessageButtons.enabled = true;
|
||||
ShowConnections = {
|
||||
enabled = true;
|
||||
iconSize = 32;
|
||||
iconSpacing = 1;
|
||||
};
|
||||
ShowHiddenChannels = {
|
||||
enabled = true;
|
||||
hideUnreads = true;
|
||||
showMode = 0;
|
||||
defaultAllowedUsersAndRolesDropdownState = true;
|
||||
};
|
||||
ShowMeYourName.enabled = false;
|
||||
ShowTimeouts.enabled = true;
|
||||
SilentMessageToggle = {
|
||||
enabled = true;
|
||||
persistState = false;
|
||||
autoDisable = true;
|
||||
};
|
||||
SilentTyping = {
|
||||
enabled = true;
|
||||
showIcon = false;
|
||||
isEnabled = true;
|
||||
};
|
||||
SortFriendRequests.enabled = false;
|
||||
SpotifyControls.enabled = false;
|
||||
SpotifyCrack.enabled = false;
|
||||
SpotifyShareCommands.enabled = false;
|
||||
StartupTimings.enabled = false;
|
||||
SupportHelper.enabled = true;
|
||||
TextReplace.enabled = false;
|
||||
TimeBarAllActivities.enabled = false;
|
||||
Translate.enabled = false;
|
||||
TypingIndicator = {
|
||||
enabled = true;
|
||||
includeMutedChannels = false;
|
||||
includeBlockedUsers = true;
|
||||
};
|
||||
TypingTweaks = {
|
||||
enabled = true;
|
||||
showAvatars = true;
|
||||
showRoleColors = true;
|
||||
alternativeFormatting = true;
|
||||
};
|
||||
Unindent.enabled = true;
|
||||
UnsuppressEmbeds.enabled = true;
|
||||
UrbanDictionary.enabled = false;
|
||||
UserVoiceShow = {
|
||||
enabled = true;
|
||||
showInUserProfileModal = true;
|
||||
showVoiceChannelSectionHeader = true;
|
||||
};
|
||||
USRBG.enabled = false;
|
||||
UwUifier.enabled = false;
|
||||
ValidUser.enabled = false;
|
||||
VoiceChatDoubleClick.enabled = true;
|
||||
VcNarrator.enabled = false;
|
||||
VencordToolbox.enabled = false;
|
||||
ViewIcons = {
|
||||
enabled = true;
|
||||
format = "png";
|
||||
imgSize = "2048";
|
||||
};
|
||||
ViewRaw = {
|
||||
enabled = true;
|
||||
clickMethod = "Left";
|
||||
};
|
||||
VoiceMessages = {
|
||||
enabled = true;
|
||||
noiseSuppression = true;
|
||||
echoCancellation = true;
|
||||
};
|
||||
WebContextMenus = {
|
||||
enabled = true;
|
||||
addBack = true;
|
||||
};
|
||||
WebKeybinds.enabled = true;
|
||||
GreetStickerPicker.enabled = false;
|
||||
WhoReacted.enabled = true;
|
||||
Wikisearch.enabled = false;
|
||||
NormalizeMessageLinks.enabled = false;
|
||||
"AI Noise Suppression" = {
|
||||
enabled = true;
|
||||
isEnabled = true;
|
||||
};
|
||||
SecretRingToneEnabler.enabled = false;
|
||||
};
|
||||
notifications = {
|
||||
timeout = 5000;
|
||||
position = "bottom-right";
|
||||
useNative = "not-focused";
|
||||
logLimit = 50;
|
||||
};
|
||||
cloud = {
|
||||
authenticated = false;
|
||||
url = "https://api.vencord.dev/";
|
||||
settingsSync = false;
|
||||
settingsSyncVersion = 1682768329526;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
75
modules/vali/gui/gtk.nix
Normal file
75
modules/vali/gui/gtk.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.themes.gtk;
|
||||
username = config.myOptions.other.system.username;
|
||||
hmCfg = config.home-manager.users.${username};
|
||||
in {
|
||||
options.myOptions.themes.gtk = {
|
||||
enable = mkEnableOption "gtk theming";
|
||||
name = mkOption {
|
||||
description = "gtk theme name";
|
||||
type = types.str;
|
||||
};
|
||||
variant = mkOption {
|
||||
description = "gtk theme variant";
|
||||
type = types.str;
|
||||
};
|
||||
accentColour = mkOption {
|
||||
description = "accent colour for gtk theme";
|
||||
type = types.str;
|
||||
};
|
||||
package = mkOption {
|
||||
description = "gtk theme package";
|
||||
type = types.package;
|
||||
};
|
||||
iconTheme = mkOption {
|
||||
description = "gtk icon theme";
|
||||
type = with types; submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
description = "gtk icon theme name";
|
||||
type = str;
|
||||
};
|
||||
package = mkOption {
|
||||
description = "gtk icon theme package";
|
||||
type = package;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
inherit (cfg) name;
|
||||
package = cfg.package.override {
|
||||
size = "standard";
|
||||
accents = [ cfg.accentColour ];
|
||||
inherit (cfg) variant;
|
||||
tweaks = [ "normal" ];
|
||||
};
|
||||
};
|
||||
iconTheme = {
|
||||
inherit (cfg.iconTheme) name;
|
||||
package = cfg.iconTheme.package.override {
|
||||
accent = cfg.accentColour;
|
||||
flavor = cfg.variant;
|
||||
};
|
||||
};
|
||||
gtk2 = {
|
||||
configLocation = "${hmCfg.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
GTK_THEME = cfg.name;
|
||||
GTK_USE_PORTAL = "1";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
32
modules/vali/gui/mpv.nix
Normal file
32
modules/vali/gui/mpv.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.mpv;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.mpv.enable = mkEnableOption "mpv";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
hwdec = "auto";
|
||||
volume = 50;
|
||||
osc = "no";
|
||||
osd-bar = "no";
|
||||
border = "no";
|
||||
};
|
||||
scripts = with pkgs.mpvScripts; [
|
||||
mpris
|
||||
thumbfast
|
||||
sponsorblock
|
||||
uosc
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
87
modules/vali/gui/qt.nix
Normal file
87
modules/vali/gui/qt.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.themes.qt;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.themes.qt = {
|
||||
enable = mkEnableOption "qt theming";
|
||||
name = mkOption {
|
||||
description = "qt theme name";
|
||||
type = types.str;
|
||||
};
|
||||
variant = mkOption {
|
||||
description = "qt theme variant";
|
||||
type = types.str;
|
||||
};
|
||||
accentColour = mkOption {
|
||||
description = "accent colour for qt theme";
|
||||
type = types.str;
|
||||
};
|
||||
package = mkOption {
|
||||
description = "qt theme package";
|
||||
type = types.package;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
# thanks raf :3 https://github.com/NotAShelf/nyx/blob/main/homes/notashelf/themes/qt.nix
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "qtct";
|
||||
style = {
|
||||
inherit (cfg) name;
|
||||
package = cfg.package.override {
|
||||
flavour = [ cfg.variant ];
|
||||
accents = [ cfg.accentColour ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
qt5.qttools
|
||||
qt6Packages.qtstyleplugin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
breeze-icons
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
#QT_STYLE_OVERRIDE = "kvantum";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
DISABLE_QT_COMPAT = "0";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO somehow make this configurable IDK
|
||||
xdg.configFile = {
|
||||
"Kvantum/catppuccin/catppuccin.kvconfig".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/catppuccin/Kvantum/main/src/Catppuccin-Mocha-Green/Catppuccin-Mocha-Green.kvconfig";
|
||||
sha256 = "16ry4k09nf5w1gyawwz2ny14zn6infqk40l35lqlg30lhgbdmr5f";
|
||||
};
|
||||
"Kvantum/catppuccin/catppuccin.svg".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/catppuccin/Kvantum/main/src/Catppuccin-Mocha-Green/Catppuccin-Mocha-Green.svg";
|
||||
sha256 = "1djh625qag34rjsp7y67nzbi9nbmiwgq63ydfizsh65n3fyfakf1";
|
||||
};
|
||||
"Kvantum/kvantum.kvconfig".text = ''
|
||||
[General]
|
||||
theme=catppuccin
|
||||
|
||||
[Applications]
|
||||
catppuccin=qt5ct, org.qbittorrent.qBittorrent, hyprland-share-picker
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
104
modules/vali/gui/schizofox.nix
Normal file
104
modules/vali/gui/schizofox.nix
Normal file
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.schizofox;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.schizofox = {
|
||||
enable = mkEnableOption "schizofox";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ inputs.schizofox.homeManagerModule ];
|
||||
|
||||
programs.schizofox = {
|
||||
enable = true;
|
||||
theme = {
|
||||
background-darker = "181825";
|
||||
background = "1e1e2e";
|
||||
foreground = "cdd6f4";
|
||||
font = "Lexend";
|
||||
simplefox.enable = false;
|
||||
darkreader.enable = true;
|
||||
extraCss = ''
|
||||
body {
|
||||
color: red !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
search = {
|
||||
defaultSearchEngine = "Startpage";
|
||||
removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"];
|
||||
searxUrl = "https://search.notashelf.dev";
|
||||
searxQuery = "https://search.notashelf.dev/search?q={searchTerms}";
|
||||
addEngines = [
|
||||
{
|
||||
Name = "NixOS Packages";
|
||||
Description = "NixOS Unstable package search";
|
||||
Alias = "!np";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "NixOS Options";
|
||||
Description = "NixOS Unstable option search";
|
||||
Alias = "!no";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "NixOS Wiki";
|
||||
Description = "NixOS Wiki search";
|
||||
Alias = "!nw";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "Home Manager Options";
|
||||
Description = "Home Manager option search";
|
||||
Alias = "!hm";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "Arch Wiki";
|
||||
Description = "Arch Wiki search";
|
||||
Alias = "!aw";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "Gentoo Wiki";
|
||||
Description = "Gentoo Wiki search";
|
||||
Alias = "!gw";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "Debian Wiki";
|
||||
Description = "Debian Wiki search";
|
||||
Alias = "!dw";
|
||||
Method = "GET";
|
||||
URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
security = {
|
||||
sanitizeOnShutdown = true;
|
||||
sandbox = true;
|
||||
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
|
||||
};
|
||||
|
||||
misc = {
|
||||
drmFix = false;
|
||||
disableWebgl = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
7
modules/vali/other/default.nix
Normal file
7
modules/vali/other/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./home-manager.nix
|
||||
./system.nix
|
||||
./xdg.nix
|
||||
];
|
||||
}
|
38
modules/vali/other/home-manager.nix
Normal file
38
modules/vali/other/home-manager.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.other.home-manager;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.other.home-manager = {
|
||||
enable = mkEnableOption "home-manager";
|
||||
enableDirenv = mkEnableOption "direnv";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {inherit inputs self;};
|
||||
users.${username} = {
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
direnv = mkIf cfg.enableDirenv {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = lib.mkDefault "23.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
28
modules/vali/other/system.nix
Normal file
28
modules/vali/other/system.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.other.system;
|
||||
in {
|
||||
options.myOptions.other.system = {
|
||||
hostname = mkOption {
|
||||
description = "hostname for this system";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
username = mkOption {
|
||||
description = "username for this system";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking.hostName = cfg.hostname;
|
||||
|
||||
users.users.${cfg.username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
}
|
118
modules/vali/other/xdg.nix
Normal file
118
modules/vali/other/xdg.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
username = config.myOptions.other.system.username;
|
||||
hmCfg = config.home-manager.users.${username};
|
||||
|
||||
primary_browser = "firefox-schizo.desktop";
|
||||
secondary_browser = "firefox-unschizo.desktop";
|
||||
mail_client = "betterbird.desktop";
|
||||
file_manager = "pcmanfm.desktop";
|
||||
media_player = "mpv.desktop";
|
||||
image_viewer = "imv.desktop";
|
||||
text_editor = "nvim.desktop";
|
||||
in {
|
||||
|
||||
environment.sessionVariables = {
|
||||
CARGO_HOME = "${hmCfg.xdg.dataHome}/cargo";
|
||||
GOPATH = "${hmCfg.xdg.dataHome}/go";
|
||||
GNUPGHOME = "${hmCfg.xdg.dataHome}/gnupg";
|
||||
GRADLE_USER_HOME = "${hmCfg.xdg.dataHome}/gradle";
|
||||
HISTFILE = "${hmCfg.xdg.stateHome}/bash/history";
|
||||
MYSQL_HISTFILE = "${hmCfg.xdg.stateHome}/mysql/history";
|
||||
NPM_CONFIG_USERCONFIG = "${hmCfg.xdg.configHome}/npm/npmrc";
|
||||
NUGET_PACKAGES = "${hmCfg.xdg.cacheHome}/NuGetPackages";
|
||||
JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hmCfg.xdg.configHome}/java";
|
||||
PARALLEL_HOME = "${hmCfg.xdg.configHome}/parallel";
|
||||
PYTHONSTARTUP = "${hmCfg.xdg.configHome}/python/pythonrc";
|
||||
RUSTUP_HOME = "${hmCfg.xdg.dataHome}/rustup";
|
||||
WINEPREFIX = "${hmCfg.xdg.dataHome}/wine";
|
||||
XAUTHORITY = "\$XDG_RUNTIME_DIR/Xauthority";
|
||||
};
|
||||
|
||||
myOptions.programs.zsh.extraAliases = {
|
||||
gdb = "gdb -n -x ${hmCfg.xdg.configHome}/gdb/init";
|
||||
pidgin = "pidgin --config=${hmCfg.xdg.dataHome}/purple";
|
||||
svn = "svn --config-dir ${hmCfg.xdg.configHome}/subversion";
|
||||
wget = "wget --hsts-file=\"${hmCfg.xdg.dataHome}/wget-hsts\"";
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
xdg.configFile."npm/npmrc".text = ''
|
||||
prefix=${hmCfg.xdg.dataHome}/npm
|
||||
cache=${hmCfg.xdg.cacheHome}/npm
|
||||
tmp=\$XDG_RUNTIME_DIR/npm
|
||||
init-module=${hmCfg.xdg.configHome}/npm/config/npm-init.js
|
||||
'';
|
||||
|
||||
xdg.configFile."python/pythonrc".text = ''
|
||||
import os
|
||||
import atexit
|
||||
import readline
|
||||
|
||||
history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history')
|
||||
try:
|
||||
readline.read_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def write_history():
|
||||
try:
|
||||
readline.write_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
atexit.register(write_history)
|
||||
'';
|
||||
|
||||
xdg = {
|
||||
cacheHome = "${hmCfg.home.homeDirectory}/.cache";
|
||||
configHome = "${hmCfg.home.homeDirectory}/.config";
|
||||
dataHome = "${hmCfg.home.homeDirectory}/.local/share";
|
||||
stateHome = "${hmCfg.home.homeDirectory}/.local/state";
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = [ primary_browser secondary_browser ];
|
||||
"x-scheme-handler/http" = [ primary_browser secondary_browser ];
|
||||
"x-scheme-handler/https" = [ primary_browser secondary_browser ];
|
||||
"x-scheme-handler/about" = [ primary_browser secondary_browser ];
|
||||
"x-scheme-handler/unknown" = [ primary_browser secondary_browser ];
|
||||
"x-scheme-handler/mailto" = [ mail_client ];
|
||||
"message/rfc822" = [ mail_client ];
|
||||
"x-scheme-handler/mid" = [ mail_client ];
|
||||
"inode/directory" = [ file_manager ];
|
||||
"x-scheme-handler/heroic" = [ "heroic.desktop" ];
|
||||
"audio/mp3" = [ media_player ];
|
||||
"audio/ogg" = [ media_player ];
|
||||
"audio/mpeg" = [ media_player ];
|
||||
"audio/aac" = [ media_player ];
|
||||
"audio/opus" = [ media_player ];
|
||||
"audio/wav" = [ media_player ];
|
||||
"audio/webm" = [ media_player ];
|
||||
"audio/3gpp" = [ media_player ];
|
||||
"audio/3gpp2" = [ media_player ];
|
||||
"video/mp4" = [ media_player ];
|
||||
"video/x-msvideo" = [ media_player ];
|
||||
"video/mpeg" = [ media_player ];
|
||||
"video/ogg" = [ media_player ];
|
||||
"video/mp2t" = [ media_player ];
|
||||
"video/webm" = [ media_player ];
|
||||
"video/3gpp" = [ media_player ];
|
||||
"video/3gpp2" = [ media_player ];
|
||||
"image/png" = [ image_viewer ];
|
||||
"image/jpeg" = [ image_viewer ];
|
||||
"image/gif" = [ image_viewer ];
|
||||
"image/avif" = [ image_viewer ];
|
||||
"image/bmp" = [ image_viewer ];
|
||||
"image/vnd.microsoft.icon" = [ image_viewer ];
|
||||
"image/svg+xml" = [ image_viewer ];
|
||||
"image/tiff" = [ image_viewer ];
|
||||
"image/webp" = [ image_viewer ];
|
||||
"text/plain" = [ text_editor ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
modules/vali/services/default.nix
Normal file
5
modules/vali/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./pipewire.nix
|
||||
];
|
||||
}
|
16
modules/vali/services/pipewire.nix
Normal file
16
modules/vali/services/pipewire.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
in {
|
||||
options.myOptions.services.enable = mkEnableOption "pipewire";
|
||||
|
||||
config = mkIf config.myOptions.services.pipewire.enable {
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
30
modules/vali/tui/btop.nix
Normal file
30
modules/vali/tui/btop.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.btop;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.btop.enable = mkEnableOption "btop";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
vim_keys = true;
|
||||
update_ms = 1000;
|
||||
cpu_single_graph = true;
|
||||
clock_format = "%X";
|
||||
use_fstab = true;
|
||||
io_mode = true;
|
||||
net_sync = true;
|
||||
net_iface = "enp4s0";
|
||||
log_level = "WARNING";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
8
modules/vali/tui/default.nix
Normal file
8
modules/vali/tui/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
imports = [
|
||||
./btop.nix
|
||||
# ./helix.nix
|
||||
# ./neovim.nix
|
||||
# ./newsboat.nix
|
||||
];
|
||||
}
|
271
modules/vali/tui/neovim.nix
Normal file
271
modules/vali/tui/neovim.nix
Normal file
|
@ -0,0 +1,271 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.neovim;
|
||||
username = config.myOptions.other.system.username;
|
||||
in {
|
||||
options.myOptions.programs.neovim.enable = mkEnableOption "neovim";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs.overlays = [ inputs.neovim-nightly-overlay.overlay ];
|
||||
|
||||
home-manager.users.${username} = {
|
||||
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-nightly;
|
||||
enableMan = true;
|
||||
defaultEditor = true;
|
||||
|
||||
colorscheme = "catppuccin";
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
flavour = "mocha";
|
||||
transparentBackground = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
autoread = true;
|
||||
so = 7;
|
||||
cmdheight = 1;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
showmatch = true;
|
||||
timeoutlen = 500;
|
||||
encoding = "utf8";
|
||||
smarttab = true;
|
||||
shiftwidth = 4;
|
||||
tabstop = 4;
|
||||
expandtab = true;
|
||||
linebreak = true;
|
||||
smartindent = true;
|
||||
updatetime = 300;
|
||||
hidden = true;
|
||||
background = "dark";
|
||||
mousemoveevent = true;
|
||||
smoothscroll = true;
|
||||
};
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
# TODO move this to lua to be cool
|
||||
# action = "vim.cmd { cmd = \"Neotree\", args = { \"toggle\" } }";
|
||||
# lua = true;
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
key = "<leader>v";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
action = "vim.cmd.MarkdownPreviewToggle";
|
||||
lua = true;
|
||||
key = "<leader>m";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
airline = {
|
||||
enable = false;
|
||||
settings.theme = "catppuccin";
|
||||
};
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
fugitive.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
folding = false;
|
||||
indent = true;
|
||||
nixvimInjections = true;
|
||||
incrementalSelection.enable = true;
|
||||
};
|
||||
treesitter-context = {
|
||||
enable = true;
|
||||
};
|
||||
coq-nvim = {
|
||||
enable = true;
|
||||
installArtifacts = true;
|
||||
settings = {
|
||||
auto_start = "shut-up";
|
||||
keymap.recommended = true;
|
||||
completion.always = false;
|
||||
};
|
||||
};
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
};
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
direction = "float";
|
||||
openMapping = "<C-\\>";
|
||||
shadeTerminals = true;
|
||||
shadingFactor = 2;
|
||||
size = 10;
|
||||
};
|
||||
# TODO laytan/cloak.nvim
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
current_line_blame = true;
|
||||
numhl = true;
|
||||
signcolumn = true;
|
||||
word_diff = true;
|
||||
on_attach = ''
|
||||
function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, {expr=true})
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, {expr=true})
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>hs', gs.stage_hunk)
|
||||
map('n', '<leader>hr', gs.reset_hunk)
|
||||
map('v', '<leader>hs', function() gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
|
||||
map('v', '<leader>hr', function() gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
|
||||
map('n', '<leader>hS', gs.stage_buffer)
|
||||
map('n', '<leader>hu', gs.undo_stage_hunk)
|
||||
map('n', '<leader>hR', gs.reset_buffer)
|
||||
map('n', '<leader>hp', gs.preview_hunk)
|
||||
map('n', '<leader>hb', function() gs.blame_line{full=true} end)
|
||||
map('n', '<leader>tb', gs.toggle_current_line_blame)
|
||||
map('n', '<leader>hd', gs.diffthis)
|
||||
map('n', '<leader>hD', function() gs.diffthis('~') end)
|
||||
map('n', '<leader>td', gs.toggle_deleted)
|
||||
|
||||
-- Text object
|
||||
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
lua-ls.enable = true;
|
||||
ccls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
bashls.enable = true;
|
||||
tsserver.enable = true;
|
||||
java-language-server.enable = true;
|
||||
#pylyzer.enable = true;
|
||||
};
|
||||
#onAttach = ''
|
||||
# vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
# local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
# vim.keymap.set('n', '<space>wl', function()
|
||||
# print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
# end, bufopts)
|
||||
# vim.keymap.set('n', '<C-f>', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||
#'';
|
||||
keymaps = {
|
||||
lspBuf = {
|
||||
gD = "declaration";
|
||||
gd = "definition";
|
||||
K = "hover";
|
||||
gi = "implementation";
|
||||
"<C-k>" = "signature_help";
|
||||
"<leader>wa" = "add_workspace_folder";
|
||||
"<leader>wr" = "remove_workspace_folder";
|
||||
"<leader>wl" = "list_workspace_folders";
|
||||
"<leader>D" = "type_definition";
|
||||
"<leader>r" = "rename";
|
||||
"<leader>a" = "code_action";
|
||||
gr = "references";
|
||||
"<C-f>" = "format";
|
||||
};
|
||||
diagnostic = {
|
||||
"<leader>e" = "open_float";
|
||||
"<leader>j" = "goto_prev";
|
||||
"<leader>k" = "goto_next";
|
||||
"<leader>q" = "setloclist";
|
||||
};
|
||||
silent = true;
|
||||
};
|
||||
};
|
||||
rust-tools = {
|
||||
enable = true;
|
||||
crateGraph = {
|
||||
enabledGraphvizBackends = ["png" "svg"];
|
||||
backend = "x11";
|
||||
};
|
||||
inlayHints = {
|
||||
auto = true;
|
||||
onlyCurrentLine = true;
|
||||
showParameterHints = true;
|
||||
};
|
||||
};
|
||||
leap.enable = true;
|
||||
fidget.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "git_files";
|
||||
"<leader>fs" = "live_grep";
|
||||
"<leader>fb" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
};
|
||||
keymapsSilent = true;
|
||||
};
|
||||
comment.enable = true;
|
||||
crates-nvim.enable = true;
|
||||
harpoon = {
|
||||
enable = true;
|
||||
package = pkgs.vimPlugins.harpoon.overrideAttrs {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ThePrimeagen";
|
||||
repo = "harpoon";
|
||||
rev = "a38be6e0dd4c6db66997deab71fc4453ace97f9c";
|
||||
hash = "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI=";
|
||||
};
|
||||
};
|
||||
enableTelescope = true;
|
||||
keymapsSilent = false;
|
||||
};
|
||||
markdown-preview = {
|
||||
enable = true;
|
||||
settings.theme = "dark";
|
||||
};
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
zen-mode-nvim
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
4
options/common/pin-registry.nix
Normal file
4
options/common/pin-registry.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ inputs, lib, ...}:
|
||||
{
|
||||
nix.registry = lib.mapAttrs (_: v: {flake = v; }) inputs;
|
||||
}
|
6
options/common/preserve-system.nix
Normal file
6
options/common/preserve-system.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
environment.etc."current-flake".source = self;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue