split home manager config into multiple files
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.vbm = ./home.nix;
|
||||
home-manager.users.vbm = ./home/home.nix;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.sharedModules = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
|
||||
699
home.nix
699
home.nix
@@ -1,699 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.age.keyFile = "${config.xdg.configHome}/sops/age/personal.txt";
|
||||
sops.defaultSopsFile = ./secrets/secret.yaml;
|
||||
sops.secrets."email/pvv/password" = { };
|
||||
|
||||
home = {
|
||||
username = "vbm";
|
||||
homeDirectory = "/home/vbm";
|
||||
stateVersion = "25.11";
|
||||
sessionVariables = {
|
||||
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
||||
XDG_STATE_HOME = "${config.xdg.stateHome}";
|
||||
|
||||
ECLIPSE_HOME = "${config.xdg.configHome}/eclipse";
|
||||
PSQL_HISTORY = "${config.xdg.stateHome}/psql_history";
|
||||
MAVEN_OPTS = "-Dmaven.repo.local=${config.xdg.dataHome}/maven/repository";
|
||||
MAVEN_ARGS = "--settings ${config.xdg.configHome}/maven/settings.xml";
|
||||
|
||||
HISTFILE = "${config.xdg.stateHome}/bash/history";
|
||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
BROWSER = "librewolf";
|
||||
SCREENRC = "${config.xdg.configHome}/screen/screenrc";
|
||||
SCREENDIR = "${config.xdg.stateHome}/screen";
|
||||
GNUPGHOME = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".ssh/allowed_signers".text =
|
||||
"* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFI0JYlUwTrHgvjvd4q03ZxDOmoQJ8rSAUDw0dlUMAXb vbm@nixos-xenon";
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"libretro-snes9x"
|
||||
"libretro-fbneo"
|
||||
];
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
mimeApps.enable = true;
|
||||
userDirs.enable = true;
|
||||
userDirs.setSessionVariables = true;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 24;
|
||||
sway.enable = true;
|
||||
dotIcons.enable = false;
|
||||
};
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
layer = "overlay";
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
services.batsignal = {
|
||||
enable = true;
|
||||
extraArgs = [
|
||||
"-w"
|
||||
"35"
|
||||
"-c"
|
||||
"10"
|
||||
"-d"
|
||||
"5"
|
||||
"-f"
|
||||
"65"
|
||||
];
|
||||
};
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# My mbsync config is kinda weird, need the program to make sure the config file exists.
|
||||
programs.mbsync.enable = true;
|
||||
services.mbsync.enable = true;
|
||||
accounts.email.maildirBasePath = "Mail";
|
||||
accounts.email.accounts."pvv" = {
|
||||
userName = "vegardbm";
|
||||
primary = true;
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
extraConfig.account = {
|
||||
AuthMechs = "PLAIN";
|
||||
};
|
||||
};
|
||||
address = "vegardbm@pvv.ntnu.no";
|
||||
neomutt.enable = true;
|
||||
realName = "Vegard Bieker Matthey";
|
||||
flavor = "plain";
|
||||
imap = {
|
||||
port = 993;
|
||||
host = "imap.pvv.ntnu.no";
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
port = 465;
|
||||
host = "smtp.pvv.ntnu.no";
|
||||
authentication = "plain";
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${
|
||||
config.sops.secrets."email/pvv/password".path
|
||||
}";
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableNushellIntegration = config.programs.nushell.enable;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome-themes-extra;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk4.theme = null;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks."*" = {
|
||||
addKeysToAgent = "yes";
|
||||
forwardAgent = false;
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
matchBlocks."pvv-git git.pvv.ntnu.no" = {
|
||||
port = 2222;
|
||||
user = "Gitea";
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
addressFamily = "inet";
|
||||
proxyJump = "microbel";
|
||||
identityFile = "~/.ssh/pvv_gitea_id_ed25519";
|
||||
};
|
||||
matchBlocks."github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "~/.ssh/nixos_xeon_github_id_ed25519";
|
||||
};
|
||||
matchBlocks."microbel" = {
|
||||
user = "vegardbm";
|
||||
hostname = "microbel.pvv.ntnu.no";
|
||||
addressFamily = "inet";
|
||||
identityFile = "~/.ssh/pvv_gitea_id_ed25519";
|
||||
};
|
||||
matchBlocks."pvv-login login.pvv.ntnu.no" = {
|
||||
user = "vegardbm";
|
||||
hostname = "login.pvv.ntnu.no";
|
||||
};
|
||||
};
|
||||
|
||||
programs.tofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
anchor = "top";
|
||||
background-color = "#222222FF";
|
||||
border-width = "0";
|
||||
default-result-background = "#222222FF";
|
||||
default-result-background-padding = "0";
|
||||
font = "Hack";
|
||||
font-size = "12";
|
||||
height = "21";
|
||||
hide-cursor = "true";
|
||||
horizontal = "true";
|
||||
input-background = "#222222FF";
|
||||
input-color = "#FFFFFF";
|
||||
min-input-width = "240";
|
||||
outline-width = "0";
|
||||
padding-bottom = "0";
|
||||
padding-left = "8";
|
||||
padding-right = "0";
|
||||
padding-top = "0";
|
||||
prompt-background = "#222222FF";
|
||||
prompt-color = "#FFFFFF";
|
||||
prompt-text = "\"\"";
|
||||
result-spacing = "16";
|
||||
selection-background = "#005577FF";
|
||||
selection-color = "#FFFFFF";
|
||||
text-cursor = "true";
|
||||
text-cursor-style = "bar";
|
||||
width = "100%";
|
||||
};
|
||||
};
|
||||
|
||||
programs.retroarch = {
|
||||
enable = true;
|
||||
cores = {
|
||||
# https://docs.retroachievements.org/general/emulator-support-and-issues.html
|
||||
snes9x.enable = true;
|
||||
fbneo.enable = true;
|
||||
fceumm.enable = true;
|
||||
gambatte.enable = true;
|
||||
mgba.enable = true;
|
||||
mupen64plus.enable = true;
|
||||
};
|
||||
settings = {
|
||||
video_driver = "vulkan";
|
||||
video_fullscreen = "true";
|
||||
audio_driver = "pipewire";
|
||||
microphone_driver = "pipewire";
|
||||
input_driver = "wayland";
|
||||
materialui_thumbnail_background_enable = "true";
|
||||
preemptive_frames_enable = "true";
|
||||
run_ahead_frames = "2";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ncmpcpp_directory = "${config.xdg.dataHome}/ncmpcpp";
|
||||
lyrics_directory = "${config.xdg.cacheHome}/ncmpcpp-lyrics";
|
||||
};
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
dependencies.ripgrep.enable = true;
|
||||
dependencies.fd.enable = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
shiftwidth = 4;
|
||||
mouse = "";
|
||||
};
|
||||
globals.mapleader = " ";
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
lspServersToEnable = "all";
|
||||
};
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
lua_ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
jdtls.enable = true;
|
||||
tinymist = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatterMode = "typstyle";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
plugins.tresitter.enable = true;
|
||||
plugins.telescope.enable = true;
|
||||
plugins.fidget.enable = true;
|
||||
plugins.cmp = {
|
||||
enable = false;
|
||||
autEnableSources = true;
|
||||
settings.sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
};
|
||||
plugins.web-devicons.enable = true;
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.format()<CR>";
|
||||
key = "<leader>fm";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
key = "<leader>fg";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
key = "<leader>ff";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
editor = {
|
||||
mouse = false;
|
||||
line-number = "relative";
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "rust";
|
||||
auto-format = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false; # necessary for wallpaper since the file is not available in sandbox.
|
||||
config = rec {
|
||||
bars = [
|
||||
{
|
||||
extraConfig = "
|
||||
position top
|
||||
status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done
|
||||
font Hack 9";
|
||||
}
|
||||
];
|
||||
modifier = "Mod4";
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "no";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "1";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
"*" = {
|
||||
scale = "0";
|
||||
bg = "${config.xdg.userDirs.pictures}/Wallpapers/d3.png fill";
|
||||
};
|
||||
};
|
||||
defaultWorkspace = "workspace number 1";
|
||||
fonts = {
|
||||
names = [ "Hack" ];
|
||||
style = "Regular";
|
||||
size = 11.0;
|
||||
};
|
||||
terminal = "foot";
|
||||
menu = "tofi-drun --drun-launch=true";
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+Return" = "exec ${terminal}";
|
||||
"${modifier}+Shift+q" = "kill";
|
||||
"${modifier}+p" = "exec ${menu}";
|
||||
"XF86Search" = "exec ${menu}";
|
||||
"${modifier}+Shift+e" = "exec swaymsg exit";
|
||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+";
|
||||
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"${modifier}+Delete" = "exec shutdown now";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.river = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
map = {
|
||||
normal = {
|
||||
"Mod4 Return" = "spawn 'foot'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "Hack:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
colors-dark = {
|
||||
cursor = "11111b f5e0dc";
|
||||
foreground = "cdd6f4";
|
||||
background = "1e1e2e";
|
||||
|
||||
regular0 = "45475a";
|
||||
regular1 = "f38ba8";
|
||||
regular2 = "a6e3a1";
|
||||
regular3 = "f9e2af";
|
||||
regular4 = "89b4fa";
|
||||
regular5 = "f5c2e7";
|
||||
regular6 = "94e2d5";
|
||||
regular7 = "bac2de";
|
||||
|
||||
bright0 = "585b70";
|
||||
bright1 = "f38ba8";
|
||||
bright2 = "a6e3a1";
|
||||
bright3 = "f9e2af";
|
||||
bright4 = "89b4fa";
|
||||
bright5 = "f5c2e7";
|
||||
bright6 = "94e2d5";
|
||||
bright7 = "a6adc8";
|
||||
|
||||
"16" = "fab387";
|
||||
"17" = "f5e0dc";
|
||||
|
||||
selection-foreground = "cdd6f4";
|
||||
selection-background = "414356";
|
||||
|
||||
search-box-no-match = "11111b f38ba8";
|
||||
search-box-match = "cdd6f4 313244";
|
||||
|
||||
jump-labels = "11111b fab387";
|
||||
urls = "89b4fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "master";
|
||||
safe.directory = "/etc/nixos";
|
||||
user = {
|
||||
name = "Vegard Bieker Matthey";
|
||||
email = "VegardMatthey@protonmail.com";
|
||||
signingkey = "~/.ssh/pvv_gitea_sign_id_ed25519.pub";
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
tag.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||
# push.gpgSign = true; Usually not supported
|
||||
};
|
||||
};
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
profile = "gpu-hq";
|
||||
ao = "pipewire";
|
||||
gpu-api = "opengl"; # TODO: Change to vulkan. This is a stupid hack because NVIDIA bad, see: https://github.com/mpv-player/mpv/issues/13019
|
||||
fullscreen = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
mvn = "mvn -gs ${config.xdg.configHome}/maven/settings.xml";
|
||||
};
|
||||
settings = {
|
||||
show_banner = false;
|
||||
show_hints = false;
|
||||
};
|
||||
environmentVariables = config.home.sessionVariables;
|
||||
extraConfig = "$env.config.edit_mode = 'vi'";
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "k";
|
||||
baseIndex = 1;
|
||||
keyMode = "vi";
|
||||
extraConfig = ''
|
||||
set-option -sa terminal-overrides "*:RGB"
|
||||
set -g status-style "bg=default"
|
||||
set -g window-status-current-style "fg=blue bold"
|
||||
set -g status-left ""
|
||||
set-option -g default-terminal "screen-256color"
|
||||
set-option -g focus-events on
|
||||
set-option -sg escape-time 10
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
};
|
||||
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"browser.warnOnQuit" = false;
|
||||
"browser.urlbar.suggest.bookmark" = false;
|
||||
"browser.urlbar.suggest.engines" = false;
|
||||
"browser.urlbar.suggest.history" = false;
|
||||
"browser.urlbar.suggest.openpage" = false;
|
||||
"browser.urlbar.suggest.quickactions" = false;
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
"browser.urlbar.suggest.recentsearches" = false;
|
||||
"places.history.enabled" = false;
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
# extensions.packages = with pkgs.repos.rycee.firefox-addons; [
|
||||
# darkreader
|
||||
# bypass-paywalls-clean
|
||||
# ];
|
||||
search.force = true;
|
||||
search.engines = {
|
||||
nix-packages = {
|
||||
name = "Nix Packages";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "np" ];
|
||||
};
|
||||
|
||||
nixos-wiki = {
|
||||
name = "NixOS Wiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
|
||||
definedAliases = [ "nw" ];
|
||||
};
|
||||
|
||||
nixos-options = {
|
||||
name = "Nix Options";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "options";
|
||||
}
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "no" ];
|
||||
};
|
||||
|
||||
home-manager-options = {
|
||||
name = "Home Manager Options";
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com";
|
||||
params = [
|
||||
{
|
||||
name = "release";
|
||||
value = "master";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "ho" ];
|
||||
};
|
||||
|
||||
arch-wiki = {
|
||||
name = "ArchWiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.archlinux.org/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://archlinux.org/static/logos/legacy/arch-legacy-aqua.svg";
|
||||
definedAliases = [ "aw" ];
|
||||
};
|
||||
|
||||
rust-docs = {
|
||||
name = "Docs.rs";
|
||||
urls = [
|
||||
{
|
||||
template = "https://docs.rs/releases/search";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://raw.githubusercontent.com/rust-lang/rust-artwork/refs/heads/master/logo/rust-logo-blk.svg";
|
||||
definedAliases = [ "rd" ];
|
||||
};
|
||||
|
||||
rust-crates = {
|
||||
name = "crates.io";
|
||||
urls = [
|
||||
{
|
||||
template = "https://crates.io/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://crates.io/assets/cargo.png";
|
||||
definedAliases = [ "rc" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/email.nix
Normal file
47
home/email.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets."email/pvv/password" = { };
|
||||
|
||||
# My mbsync config is kinda weird, need the program to make sure the config file exists.
|
||||
programs.mbsync.enable = true;
|
||||
services.mbsync.enable = true;
|
||||
accounts.email.maildirBasePath = "Mail";
|
||||
accounts.email.accounts."pvv" = {
|
||||
userName = "vegardbm";
|
||||
primary = true;
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
extraConfig.account = {
|
||||
AuthMechs = "PLAIN";
|
||||
};
|
||||
};
|
||||
address = "vegardbm@pvv.ntnu.no";
|
||||
neomutt.enable = true;
|
||||
realName = "Vegard Bieker Matthey";
|
||||
flavor = "plain";
|
||||
imap = {
|
||||
port = 993;
|
||||
host = "imap.pvv.ntnu.no";
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
port = 465;
|
||||
host = "smtp.pvv.ntnu.no";
|
||||
authentication = "plain";
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${
|
||||
config.sops.secrets."email/pvv/password".path
|
||||
}";
|
||||
};
|
||||
}
|
||||
244
home/home.nix
Normal file
244
home/home.nix
Normal file
@@ -0,0 +1,244 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./email.nix
|
||||
./programs/sway.nix
|
||||
./programs/neovim.nix
|
||||
./programs/retroarch.nix
|
||||
./programs/librewolf.nix
|
||||
./programs/ssh.nix
|
||||
./programs/tofi.nix
|
||||
./programs/foot.nix
|
||||
];
|
||||
|
||||
sops.age.keyFile = "${config.xdg.configHome}/sops/age/personal.txt";
|
||||
# sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/" ];
|
||||
sops.defaultSopsFile = ../secrets/secret.yaml;
|
||||
|
||||
home = {
|
||||
username = "vbm";
|
||||
homeDirectory = "/home/vbm";
|
||||
stateVersion = "25.11";
|
||||
sessionVariables = {
|
||||
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
||||
XDG_STATE_HOME = "${config.xdg.stateHome}";
|
||||
|
||||
ECLIPSE_HOME = "${config.xdg.configHome}/eclipse";
|
||||
PSQL_HISTORY = "${config.xdg.stateHome}/psql_history";
|
||||
MAVEN_OPTS = "-Dmaven.repo.local=${config.xdg.dataHome}/maven/repository";
|
||||
MAVEN_ARGS = "--settings ${config.xdg.configHome}/maven/settings.xml";
|
||||
|
||||
HISTFILE = "${config.xdg.stateHome}/bash/history";
|
||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
BROWSER = "librewolf";
|
||||
SCREENRC = "${config.xdg.configHome}/screen/screenrc";
|
||||
SCREENDIR = "${config.xdg.stateHome}/screen";
|
||||
GNUPGHOME = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".ssh/allowed_signers".text =
|
||||
"* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFI0JYlUwTrHgvjvd4q03ZxDOmoQJ8rSAUDw0dlUMAXb vbm@nixos-xenon";
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"libretro-snes9x"
|
||||
"libretro-fbneo"
|
||||
];
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
mimeApps.enable = true;
|
||||
userDirs.enable = true;
|
||||
userDirs.setSessionVariables = true;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 24;
|
||||
sway.enable = true;
|
||||
dotIcons.enable = false;
|
||||
};
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
layer = "overlay";
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
services.batsignal = {
|
||||
enable = true;
|
||||
extraArgs = [
|
||||
"-w"
|
||||
"35"
|
||||
"-c"
|
||||
"10"
|
||||
"-d"
|
||||
"5"
|
||||
"-f"
|
||||
"65"
|
||||
];
|
||||
};
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableNushellIntegration = config.programs.nushell.enable;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome-themes-extra;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk4.theme = null;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ncmpcpp_directory = "${config.xdg.dataHome}/ncmpcpp";
|
||||
lyrics_directory = "${config.xdg.cacheHome}/ncmpcpp-lyrics";
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
editor = {
|
||||
mouse = false;
|
||||
line-number = "relative";
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "rust";
|
||||
auto-format = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.river = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
map = {
|
||||
normal = {
|
||||
"Mod4 Return" = "spawn 'foot'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "master";
|
||||
safe.directory = "/etc/nixos";
|
||||
user = {
|
||||
name = "Vegard Bieker Matthey";
|
||||
email = "VegardMatthey@protonmail.com";
|
||||
signingkey = "~/.ssh/pvv_gitea_sign_id_ed25519.pub";
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
tag.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||
# push.gpgSign = true; Usually not supported
|
||||
};
|
||||
};
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
profile = "gpu-hq";
|
||||
ao = "pipewire";
|
||||
gpu-api = "opengl"; # TODO: Change to vulkan. This is a stupid hack because NVIDIA bad, see: https://github.com/mpv-player/mpv/issues/13019
|
||||
fullscreen = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
mvn = "mvn -gs ${config.xdg.configHome}/maven/settings.xml";
|
||||
};
|
||||
settings = {
|
||||
show_banner = false;
|
||||
show_hints = false;
|
||||
};
|
||||
environmentVariables = config.home.sessionVariables;
|
||||
extraConfig = "$env.config.edit_mode = 'vi'";
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "k";
|
||||
baseIndex = 1;
|
||||
keyMode = "vi";
|
||||
extraConfig = ''
|
||||
set-option -sa terminal-overrides "*:RGB"
|
||||
set -g status-style "bg=default"
|
||||
set -g window-status-current-style "fg=blue bold"
|
||||
set -g status-left ""
|
||||
set-option -g default-terminal "screen-256color"
|
||||
set-option -g focus-events on
|
||||
set-option -sg escape-time 10
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
};
|
||||
|
||||
}
|
||||
51
home/programs/foot.nix
Normal file
51
home/programs/foot.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "Hack:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
colors-dark = {
|
||||
cursor = "11111b f5e0dc";
|
||||
foreground = "cdd6f4";
|
||||
background = "1e1e2e";
|
||||
|
||||
regular0 = "45475a";
|
||||
regular1 = "f38ba8";
|
||||
regular2 = "a6e3a1";
|
||||
regular3 = "f9e2af";
|
||||
regular4 = "89b4fa";
|
||||
regular5 = "f5c2e7";
|
||||
regular6 = "94e2d5";
|
||||
regular7 = "bac2de";
|
||||
|
||||
bright0 = "585b70";
|
||||
bright1 = "f38ba8";
|
||||
bright2 = "a6e3a1";
|
||||
bright3 = "f9e2af";
|
||||
bright4 = "89b4fa";
|
||||
bright5 = "f5c2e7";
|
||||
bright6 = "94e2d5";
|
||||
bright7 = "a6adc8";
|
||||
|
||||
"16" = "fab387";
|
||||
"17" = "f5e0dc";
|
||||
|
||||
selection-foreground = "cdd6f4";
|
||||
selection-background = "414356";
|
||||
|
||||
search-box-no-match = "11111b f38ba8";
|
||||
search-box-match = "cdd6f4 313244";
|
||||
|
||||
jump-labels = "11111b fab387";
|
||||
urls = "89b4fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
167
home/programs/librewolf.nix
Normal file
167
home/programs/librewolf.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"browser.warnOnQuit" = false;
|
||||
"browser.urlbar.suggest.bookmark" = false;
|
||||
"browser.urlbar.suggest.engines" = false;
|
||||
"browser.urlbar.suggest.history" = false;
|
||||
"browser.urlbar.suggest.openpage" = false;
|
||||
"browser.urlbar.suggest.quickactions" = false;
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
"browser.urlbar.suggest.recentsearches" = false;
|
||||
"places.history.enabled" = false;
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
# extensions.packages = with pkgs.repos.rycee.firefox-addons; [
|
||||
# darkreader
|
||||
# bypass-paywalls-clean
|
||||
# ];
|
||||
search.force = true;
|
||||
search.engines = {
|
||||
nix-packages = {
|
||||
name = "Nix Packages";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "np" ];
|
||||
};
|
||||
|
||||
nixos-wiki = {
|
||||
name = "NixOS Wiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
|
||||
definedAliases = [ "nw" ];
|
||||
};
|
||||
|
||||
nixos-options = {
|
||||
name = "Nix Options";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "options";
|
||||
}
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "no" ];
|
||||
};
|
||||
|
||||
home-manager-options = {
|
||||
name = "Home Manager Options";
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com";
|
||||
params = [
|
||||
{
|
||||
name = "release";
|
||||
value = "master";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "ho" ];
|
||||
};
|
||||
|
||||
arch-wiki = {
|
||||
name = "ArchWiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.archlinux.org/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://archlinux.org/static/logos/legacy/arch-legacy-aqua.svg";
|
||||
definedAliases = [ "aw" ];
|
||||
};
|
||||
|
||||
rust-docs = {
|
||||
name = "Docs.rs";
|
||||
urls = [
|
||||
{
|
||||
template = "https://docs.rs/releases/search";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://raw.githubusercontent.com/rust-lang/rust-artwork/refs/heads/master/logo/rust-logo-blk.svg";
|
||||
definedAliases = [ "rd" ];
|
||||
};
|
||||
|
||||
rust-crates = {
|
||||
name = "crates.io";
|
||||
urls = [
|
||||
{
|
||||
template = "https://crates.io/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "https://crates.io/assets/cargo.png";
|
||||
definedAliases = [ "rc" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
69
home/programs/neovim.nix
Normal file
69
home/programs/neovim.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
dependencies.ripgrep.enable = true;
|
||||
dependencies.fd.enable = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
shiftwidth = 4;
|
||||
mouse = "";
|
||||
};
|
||||
globals.mapleader = " ";
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
lspServersToEnable = "all";
|
||||
};
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
lua_ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
jdtls.enable = true;
|
||||
tinymist = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatterMode = "typstyle";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
plugins.tresitter.enable = true;
|
||||
plugins.telescope.enable = true;
|
||||
plugins.fidget.enable = true;
|
||||
plugins.cmp = {
|
||||
enable = false;
|
||||
autEnableSources = true;
|
||||
settings.sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
};
|
||||
plugins.web-devicons.enable = true;
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.format()<CR>";
|
||||
key = "<leader>fm";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
key = "<leader>fg";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
key = "<leader>ff";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
25
home/programs/retroarch.nix
Normal file
25
home/programs/retroarch.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.retroarch = {
|
||||
enable = true;
|
||||
cores = {
|
||||
# https://docs.retroachievements.org/general/emulator-support-and-issues.html
|
||||
snes9x.enable = true;
|
||||
fbneo.enable = true;
|
||||
fceumm.enable = true;
|
||||
gambatte.enable = true;
|
||||
mgba.enable = true;
|
||||
mupen64plus.enable = true;
|
||||
};
|
||||
settings = {
|
||||
video_driver = "vulkan";
|
||||
video_fullscreen = "true";
|
||||
audio_driver = "pipewire";
|
||||
microphone_driver = "pipewire";
|
||||
input_driver = "wayland";
|
||||
materialui_thumbnail_background_enable = "true";
|
||||
preemptive_frames_enable = "true";
|
||||
run_ahead_frames = "2";
|
||||
};
|
||||
};
|
||||
}
|
||||
41
home/programs/ssh.nix
Normal file
41
home/programs/ssh.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks."*" = {
|
||||
addKeysToAgent = "yes";
|
||||
forwardAgent = false;
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
matchBlocks."pvv-git git.pvv.ntnu.no" = {
|
||||
port = 2222;
|
||||
user = "Gitea";
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
addressFamily = "inet";
|
||||
proxyJump = "microbel";
|
||||
identityFile = "~/.ssh/pvv_gitea_id_ed25519";
|
||||
};
|
||||
matchBlocks."github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "~/.ssh/nixos_xeon_github_id_ed25519";
|
||||
};
|
||||
matchBlocks."microbel" = {
|
||||
user = "vegardbm";
|
||||
hostname = "microbel.pvv.ntnu.no";
|
||||
addressFamily = "inet";
|
||||
identityFile = "~/.ssh/pvv_gitea_id_ed25519";
|
||||
};
|
||||
matchBlocks."pvv-login login.pvv.ntnu.no" = {
|
||||
user = "vegardbm";
|
||||
hostname = "login.pvv.ntnu.no";
|
||||
};
|
||||
};
|
||||
}
|
||||
56
home/programs/sway.nix
Normal file
56
home/programs/sway.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false; # necessary for wallpaper since the file is not available in sandbox.
|
||||
config = rec {
|
||||
bars = [
|
||||
{
|
||||
extraConfig = "
|
||||
position top
|
||||
status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done
|
||||
font Hack 9";
|
||||
}
|
||||
];
|
||||
modifier = "Mod4";
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "no";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "1";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
"*" = {
|
||||
scale = "0";
|
||||
bg = "${config.xdg.userDirs.pictures}/Wallpapers/d3.png fill";
|
||||
};
|
||||
};
|
||||
defaultWorkspace = "workspace number 1";
|
||||
fonts = {
|
||||
names = [ "Hack" ];
|
||||
style = "Regular";
|
||||
size = 11.0;
|
||||
};
|
||||
terminal = "foot";
|
||||
menu = "tofi-drun --drun-launch=true";
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+Return" = "exec ${terminal}";
|
||||
"${modifier}+Shift+q" = "kill";
|
||||
"${modifier}+p" = "exec ${menu}";
|
||||
"XF86Search" = "exec ${menu}";
|
||||
"${modifier}+Shift+e" = "exec swaymsg exit";
|
||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+";
|
||||
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"${modifier}+Delete" = "exec shutdown now";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
35
home/programs/tofi.nix
Normal file
35
home/programs/tofi.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.tofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
anchor = "top";
|
||||
background-color = "#222222FF";
|
||||
border-width = "0";
|
||||
default-result-background = "#222222FF";
|
||||
default-result-background-padding = "0";
|
||||
font = "Hack";
|
||||
font-size = "12";
|
||||
height = "21";
|
||||
hide-cursor = "true";
|
||||
horizontal = "true";
|
||||
input-background = "#222222FF";
|
||||
input-color = "#FFFFFF";
|
||||
min-input-width = "240";
|
||||
outline-width = "0";
|
||||
padding-bottom = "0";
|
||||
padding-left = "8";
|
||||
padding-right = "0";
|
||||
padding-top = "0";
|
||||
prompt-background = "#222222FF";
|
||||
prompt-color = "#FFFFFF";
|
||||
prompt-text = "\"\"";
|
||||
result-spacing = "16";
|
||||
selection-background = "#005577FF";
|
||||
selection-color = "#FFFFFF";
|
||||
text-cursor = "true";
|
||||
text-cursor-style = "bar";
|
||||
width = "100%";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user