Compare commits

..

5 Commits

Author SHA1 Message Date
Armel van Ravels
5b00400cc1 Add direnv integration to vscode 2026-01-27 16:23:02 +01:00
Armel van Ravels
9c98f7490f Battery status 2026-01-27 16:23:02 +01:00
Armel van Ravels
f6a6fb2afe Add vscode 2026-01-27 16:23:02 +01:00
Armel van Ravels
fccac91c05 Add vscode to programs 2026-01-27 16:23:02 +01:00
Armel van Ravels
8f31717cb5 Changes for work machine 2026-01-27 16:23:02 +01:00
18 changed files with 60 additions and 278 deletions

12
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1773264488,
"narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=",
"lastModified": 1767910483,
"narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c",
"rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c",
"type": "github"
},
"original": {
@@ -23,11 +23,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1773068389,
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
"lastModified": 1767799921,
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
"type": "github"
},
"original": {

View File

@@ -19,7 +19,10 @@
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
homeConfigurations = {

View File

@@ -9,16 +9,14 @@
imports = [
./other/fonts.nix
./programs/obs-studio.nix
./programs/bitwarden.nix
./programs/kitty.nix
./programs/zsh.nix
./programs/direnv.nix
./programs/firefox.nix
./programs/tmux.nix
./programs/git.nix
./programs/libreoffice.nix
./programs/nvim.nix
./programs/ripgrep.nix
./programs/vscode.nix
./wm/rofi.nix
./wm/cursor.nix
./wm/dconf.nix

View File

@@ -6,8 +6,8 @@
enableZshIntegration = true;
nix-direnv.enable = true;
};
home.file.".config/direnv/direnvrc" = {
source = ./direnv/direnvrc;
home.sessionVariables = {
DIRENV_CACHE = "${config.home.homeDirectory}/.cache/direnv";
};
}

View File

@@ -1,15 +0,0 @@
# Place in ~/.config/direnv/direnvrc
# Two things to know:
# * `direnv_layour_dir` is called once for every {.direnvrc,.envrc} sourced
# * The indicator for a different direnv file being sourced is a different $PWD value
# This means we can hash $PWD to get a fully unique cache path for any given environment
: ${XDG_CACHE_HOME:=$HOME/.cache}
declare -A direnv_layout_dirs
direnv_layout_dir() {
echo "${direnv_layout_dirs[$PWD]:=$(
echo -n "$XDG_CACHE_HOME"/direnv/layouts/
echo -n "$PWD" | sha1sum | cut -d ' ' -f 1
)}"
}

View File

@@ -1,12 +0,0 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/master/doc/json_schema.json",
"modules": [
"os",
"uptime",
"cpu",
"gpu",
"memory",
"swap",
"disk",
]
}

View File

@@ -4,12 +4,6 @@
programs.firefox = {
enable = true;
profiles.default = {
settings = {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
};
};
policies = {
# From https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265/17
ExtensionSettings = with builtins;

View File

@@ -1,11 +0,0 @@
{ pkgs, ... } :
{
programs.git = {
enable = true;
settings.user = {
name = "Armel van Ravels";
email = "armel@armel.nl";
};
};
}

View File

@@ -1,11 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
libreoffice
hunspell
hunspellDicts.en_US
hunspellDicts.nl_NL
];
}

View File

@@ -1,158 +0,0 @@
{ pkgs, ... }:
{
programs.neovim = {
enable = true;
extraLuaPackages = ps: [ ps.magick ];
extraPackages = [
pkgs.ueberzugpp
pkgs.imagemagick
];
plugins = with pkgs.vimPlugins; [
neo-tree-nvim
catppuccin-nvim
tokyonight-nvim
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
cmp-buffer
cmp-path
plenary-nvim
telescope-nvim
(nvim-treesitter.withAllGrammars)
vim-nix
lualine-nvim
image-nvim
];
extraLuaConfig = ''
vim.cmd("colorscheme catppuccin-mocha")
-- Basic settings
vim.o.number = true
vim.o.relativenumber = true
-- =========================
-- LSP (Neovim 0.11+ way)
-- =========================
-- Add cmp capabilities
local capabilities = require("cmp_nvim_lsp").default_capabilities()
vim.lsp.config("nil_ls", {
capabilities = capabilities,
})
-- PHP LSP
vim.lsp.config("intelephense", {
capabilities = capabilities,
})
vim.lsp.enable("intelephense")
vim.lsp.enable("nil_ls")
-- =========================
-- nvim-cmp
-- =========================
local cmp = require("cmp")
cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
sources = {
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = "path" },
}
})
-- =========================
-- Telescope
-- =========================
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
-- =========================
-- Lualine (status line with Git branch)
-- =========================
require('lualine').setup {
options = {
theme = 'catppuccin', -- match your colorscheme
section_separators = {'', ''},
component_separators = {'', ''},
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch'}, -- shows Git branch here
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
}
}
-- =========================
-- image-nvim
-- =========================
require("image").setup({
backend = "ueberzug", -- or "ueberzug" or "sixel"
processor = "magick_cli", -- or "magick_rock"
integrations = {
markdown = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
only_render_image_at_cursor_mode = "popup", -- or "inline"
floating_windows = false, -- if true, images will be rendered in floating markdown windows
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
},
asciidoc = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
only_render_image_at_cursor_mode = "popup",
floating_windows = false,
filetypes = { "asciidoc", "adoc" },
},
neorg = {
enabled = true,
filetypes = { "norg" },
},
rst = {
enabled = true,
},
typst = {
enabled = true,
filetypes = { "typst" },
},
html = {
enabled = false,
},
css = {
enabled = false,
},
},
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
scale_factor = 1.0,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "snacks_notif", "scrollview", "scrollview_sign" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
})
'';
};
}

5
programs/obs-studio.nix Normal file
View File

@@ -0,0 +1,5 @@
{ pkgs, ... }:
{
programs.obs-studio.enable = true;
}

View File

@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ripgrep
];
}

25
programs/vscode.nix Normal file
View File

@@ -0,0 +1,25 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
package = pkgs.vscode.fhs;
profiles.default.extensions = with pkgs.vscode-extensions; [
ms-dotnettools.csharp
ms-dotnettools.csdevkit
ms-dotnettools.vscode-dotnet-runtime
mkhl.direnv # Direnv integration for VSCode
];
profiles.default.userSettings = {
"direnv.restart.automatic" = true;
"terminal.integrated.defaultProfile.linux" = "zsh";
"terminal.integrated.profiles.linux" = {
zsh = {
path = pkgs.zsh;
};
};
};
};
}

View File

@@ -1,9 +1,6 @@
{ pkgs, ... }:
{
home.file.".zsh/fastfetch.jsonc".source =
./fastfetch/config.jsonc;
programs.zsh = {
enable = true;
oh-my-zsh = {
@@ -11,7 +8,7 @@
theme = "agnoster";
};
initContent = ''
initExtra = ''
# Use kitty's ssh helper if running inside kitty
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
'';

View File

@@ -5,8 +5,6 @@
bzmenu
hyprshot
hyprlock
playerctl
speedcrunch
];
wayland.windowManager.hyprland = {
@@ -23,7 +21,6 @@
"$terminal" = "kitty";
"$menu" = "rofi -show drun";
"$bluetoothMenu" = "bzmenu --launcher rofi";
"$files" = "rofi -show filebrowser";
### BASIC LAYOUT
general = {
@@ -32,8 +29,8 @@
};
decoration = {
inactive_opacity = 0.8;
active_opacity = 0.9;
inactive_opacity = 0.9;
active_opacity = 1.0;
rounding = 5;
rounding_power = 2.5;
blur = {
@@ -78,15 +75,11 @@
"$mod, RETURN, exec, $terminal"
"$mod, D, exec, $menu"
"$mod, B, exec, $bluetoothMenu"
"$mod, G, exec, $files"
"$mod, Q, killactive"
"$mod, F, fullscreen"
"$mod, M, exit"
"$mod, L, exec, hyprlock"
# show/hide waybar
"$mod, W, exec, pkill -SIGUSR1 -f '^waybar$'"
# Focus
"$mod, LEFT, movefocus, l"
"$mod, RIGHT, movefocus, r"
@@ -122,16 +115,6 @@
# Hyprshot
"$mod, Z, exec, hyprshot -m region"
# Media keys
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
", XF86Calculator, exec, speedcrunch"
];
bindm = [

View File

@@ -15,6 +15,7 @@ in
];
wallpaper = [
"DP-2,${wallpaper2}"
"HDMI-A-1,${wallpaper2}"
",${wallpaper}"
];
};

View File

@@ -1,10 +1,6 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.rofi-file-browser
];
programs.rofi = {
enable = true;
theme = "material";

View File

@@ -21,26 +21,12 @@
];
modules-right = [
"pulseaudio"
"cpu"
"tray"
"cpu"
"battery"
"clock"
];
pulseaudio = {
format = "{icon} {volume}%";
format-muted = "󰝟 muted";
tooltip = false;
scroll-step = 5;
format-icons = {
default = [ "󰕿" "󰖀" "󰕾" ];
};
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
};
mpris = {
player = "spotify";
format = "{player_icon} {artist} - {title}";
@@ -49,6 +35,10 @@
ignored-players = [ "firefox" "vlc" ];
};
tray = {
spacing = 10;
};
cpu = {
format = " {usage}%";
tooltip = false;
@@ -62,6 +52,11 @@
format = "{icon} {name}";
on-click = "activate";
};
battery = {
"format" = "{icon} {capacity}%";
"format-icons" = ["" "" "" "" ""];
};
};
};
}