Compare commits

..

No commits in common. "main" and "v1" have entirely different histories.
main ... v1

315 changed files with 7388 additions and 13615 deletions

View file

@ -1,7 +0,0 @@
keys:
- &franz age1uauvjwfvg8u0zkn58ematurcptf43gz6vx44nwkq3xcnmwq95psqna9psw
creation_rules:
- path_regex: secrets/franz.yaml$
key_groups:
- age:
- *franz

View file

@ -1,20 +0,0 @@
# Nix-Config
## Installation
The NixOS installer image comes with password SSH auth disabled. Simply allowing the public Git keys is a nice workaround.
```sh
sudo systemctl start sshd
mkdir ~/.ssh; curl https://git.ghoscht.com/ghoscht.keys > ~/.ssh/authorized_keys
```
The specific config from "hosts" can be installed using the following command. Limiting the download speed is optional, but can come in handy.
```sh
sudo nixos-install --option download-speed 4000 --flake .#<CONFIG_NAME_HERE>
```
## RPi Image generation
```sh
nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
sudo dd if=./result/sd-image/<IMAGE_NAME>.img of=/dev/<DEVICE_NAME> bs=1M status=progress
```

View file

@ -1,74 +0,0 @@
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
disko.devices = {
disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
swap = {
size = "4G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "root_vg";
};
};
};
};
};
lvm_vg = {
root_vg = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
};
"/home" = {
mountOptions = ["compress=zstd"];
mountpoint = "/home";
};
"/nix" = {
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
}

1596
flake.lock

File diff suppressed because it is too large Load diff

232
flake.nix
View file

@ -1,178 +1,76 @@
#
# flake.nix *
# ├─ ./hosts
# │ └─ default.nix
# ├─ ./darwin
# │ └─ default.nix
# └─ ./nix
# └─ default.nix
#
{
description = "GHOSCHT's NixOS config";
description = "Nix, NixOS and Nix Darwin System Flake Configuration";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
hardware.url = "github:nixos/nixos-hardware";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
xremap = {
url = "github:xremap/nix-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
heliox-cli = {
url = "git+https://git.ghoscht.com/heliox/cli?ref=custom-dimming";
inputs.nixpkgs.follows = "nixpkgs";
};
picokontroller = {
url = "git+https://git.ghoscht.com/ghoscht/picoKontroller";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
arion = {
url = "github:hercules-ci/arion";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim/nixos-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, home-manager
, ...
} @ inputs:
let
inherit (self) outputs;
# Supported systems for your flake packages, shell, etc.
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
vars = import ./vars.nix;
in
inputs =
# References Used by Flake
{
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Stable Nix Packages (Default)
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Unstable Nix Packages
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays { inherit inputs; };
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
adalbert = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs vars; };
modules = [
./hosts/adalbert
];
};
ludwig = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs vars; };
modules = [
./hosts/ludwig
];
};
leopold = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs vars; };
modules = [
./hosts/leopold
];
};
franz = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs vars; };
modules = [
./hosts/franz
];
};
# build with nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
eustachius = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
./hosts/eustachius
# extra config for sdImage generator
{
sdImage.compressImage = false;
}
];
};
home-manager = {
# User Environment Manager
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs outputs vars; };
modules = [
./home/adalbert.nix
];
};
nur = {
# NUR Community Packages
url = "github:nix-community/NUR"; # Requires "nur.nixosModules.nur" to be added to the host modules
};
"${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs outputs vars; };
modules = [
./home/ludwig.nix
];
hyprland = {
# Official Hyprland Flake
url = "github:hyprwm/Hyprland"; # Requires "hyprland.nixosModules.default" to be added the host modules
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
"${vars.user}@franz" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs outputs vars; };
modules = [
./home/franz.nix
];
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
};
# "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance
# extraSpecialArgs = {inherit inputs outputs vars;};
# modules = [
# ./home/eustachius.nix
# ];
# };
};
outputs = inputs @ {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
nur,
hyprland,
split-monitor-workspaces,
...
}:
# Function telling flake which inputs to use
let
vars = {
# Variables Used In Flake
user = "ghoscht";
location = "$HOME/.setup";
terminal = "alacritty";
editor = "nvim";
};
in {
nixosConfigurations = ( # NixOS Configurations
import ./hosts {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-unstable home-manager nur hyprland split-monitor-workspaces vars; # Inherit inputs
}
);
homeConfigurations = ( # Nix Configurations
import ./nix/home.nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-unstable home-manager vars hyprland split-monitor-workspaces;
}
);
};
}

View file

@ -1,48 +0,0 @@
{ inputs
, pkgs
, ...
}: {
imports = [
./global
./features/desktop/awesome
./features/desktop/hyprland
./features/games
./features/coding
./features/desktop/common/alacritty.nix
];
home.packages = [
inputs.picokontroller.packages.x86_64-linux.default
];
nixpkgs = {
config = {
permittedInsecurePackages = [
"electron-25.9.0"
"nix-2.15.3"
];
};
};
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"picokontroller" # volume & light control
"easyeffects --gapplication-service"
"xrandr --output DP-3 --primary" # since wayland doesn't have a concept of primary monitors
];
};
};
home.file = {
".local/share/jellyfinmediaplayer/scripts/mpris.so".source = "${pkgs.mpvScripts.mpris}/share/mpv/scripts/mpris.so";
};
services.flatpak.overrides = {
"com.github.iwalton3.jellyfin-media-player".Context = {
sockets = [
"!wayland"
"x11"
];
};
};
}

View file

@ -1,5 +0,0 @@
{
programs.bat = {
enable = true;
};
}

View file

@ -1,12 +0,0 @@
{config, ...}: {
programs.btop = {
enable = true;
settings = {
theme_background = false;
truecolor = true;
vim_keys = true;
rounded_corners = true;
proc_gradient = false;
};
};
}

View file

@ -1,40 +0,0 @@
{pkgs, ...}: {
imports = [
./bat.nix
./direnv.nix
./fish.nix
./git.nix
./gpg.nix
./btop.nix
./nix-index.nix
./lazygit.nix
];
home.packages = with pkgs; [
comma # Install and run programs by sticking a , before them
distrobox # Nice escape hatch, integrates docker images with my environment
bc # Calculator
eza # Better ls
ripgrep # Better grep
fd # Better find
httpie # Better curl
diffsitter # Better diff
jq # JSON pretty printer and manipulator
timer # Nice looking timer
lazydocker # Docker TUI
fastfetch # Unixporn stuff
tldr # Nice & short manual snippets
ntfy-sh # Push notifications to other devices
ipinfo # IP geolocation
ranger # TUI file manager
trickle # cli network limiter
du-dust # disk usage visualizer
lftp # FTP client
unar # unarchive files like rar, zip, tar
glow # fancy markdown viewer
nvd # Differ
nix-output-monitor
nh # Nice wrapper for NixOS and HM
];
}

View file

@ -1,6 +0,0 @@
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -1,106 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
hasLftp = hasPackage "lftp";
hasExa = hasPackage "eza";
hasLazygit = config.programs.lazygit.enable;
hasLazydocker = hasPackage "lazydocker";
hasNixYourShell = hasPackage "nix-your-shell";
hasWezterm = config.programs.wezterm.enable;
in {
programs.fish = {
enable = true;
interactiveShellInit = ''
${
if hasNixYourShell
then "nix-your-shell fish | source"
else ""
}
'';
plugins = [
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
{
name = "tide";
src = pkgs.fishPlugins.tide.src;
}
{
name = "sponge";
src = pkgs.fishPlugins.sponge.src;
}
{
name = "autopair";
src = pkgs.fishPlugins.autopair.src;
}
{
name = "puffer";
src = pkgs.fishPlugins.puffer.src;
}
{
name = "z";
src = pkgs.fishPlugins.z.src;
}
];
shellAliases = {
lzg = mkIf hasLazygit "lazygit";
lzd = mkIf hasLazydocker "lazydocker";
batt = ''upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -e "percentage" -e "state"'';
slp = "systemctl suspend";
sdn = "shutdown 0";
nrs = "nh os switch ~/.setup";
ls = mkIf hasExa "eza";
ll = mkIf hasExa "eza -l";
la = mkIf hasExa "eza -la";
exa = mkIf hasExa "eza";
imgcat = mkIf hasWezterm "wezterm imgcat";
};
shellAbbrs = rec {
jqless = "jq -C | less -r";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
glk = "gpg --list-keys --with-keygrip";
gssh = "gpg --export-ssh-key";
gnk = "gpg --full-generate-key --expert";
gek = "gpg --edit-key --expert";
udmount = "udisksctl mount -b";
udumount = "udisksctl unmount -b";
fftp = mkIf hasLftp "lftp -u ghoscht, sftp://192.168.178.35";
arss = "sudo autorestic exec -av -- snapshots";
};
functions = {
# Disable greeting
fish_greeting = "";
fish_init_custom = ''
tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time=No --rainbow_prompt_separators=Vertical --powerline_prompt_heads=Slanted --powerline_prompt_tails=Flat --powerline_prompt_style='Two lines, frame' --prompt_connection=Solid --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Compact --icons='Many icons' --transient=Yes
'';
};
};
home.packages = with pkgs; [grc fzf nix-your-shell];
# Applies tide configure on rebuild
home.activation.configureTide = lib.hm.dag.entryAfter ["writeBoundary"] ''
${lib.getExe pkgs.fish} -c "fish_init_custom"
'';
}

View file

@ -1,22 +0,0 @@
{pkgs, ...}: {
#Prefer IPv4 for ssh
# home.file.".ssh/config".text = "AddressFamily inet";
programs.git = {
enable = true;
userName = "GHOSCHT";
userEmail = "31184695+GHOSCHT@users.noreply.github.com";
package = pkgs.gitAndTools.gitFull;
extraConfig = {
commit.gpgsign = true;
user.signingkey = "0x2C2C1C62A5388E82";
init.defaultBranch = "main";
pull.rebase = false; # merge by default
};
lfs.enable = true;
aliases = {
graph = "log --decorate --oneline --graph";
};
};
}

View file

@ -1,25 +0,0 @@
{
lib,
pkgs,
...
}: {
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableFishIntegration = true;
enableZshIntegration = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
# Prevent clobbering SSH_AUTH_SOCK
home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1";
# Disable gnome-keyring ssh-agent
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
${lib.fileContents "${pkgs.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"}
Hidden=true
'';
}

View file

@ -1,5 +0,0 @@
{config, ...}: {
programs.lazygit = {
enable = true;
};
}

View file

@ -1,33 +0,0 @@
{pkgs, ...}: let
update-script = pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [wget coreutils];
text = ''
filename="index-x86_64-linux"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
ln -f "$filename" files
'';
};
in {
programs.nix-index.enable = true;
systemd.user.services.nix-index-database-sync = {
Unit = {Description = "fetch mic92/nix-index-database";};
Service = {
Type = "oneshot";
ExecStart = "${update-script}/bin/fetch-nix-index-database";
Restart = "on-failure";
RestartSec = "5m";
};
};
systemd.user.timers.nix-index-database-sync = {
Unit = {Description = "Automatic github:mic92/nix-index-database fetching";};
Timer = {
OnBootSec = "10m";
OnUnitActiveSec = "24h";
};
Install = {WantedBy = ["timers.target"];};
};
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
imports = [
# ./nvim
./nixvim
./vscode.nix
./intellij.nix
./tmux.nix
];
}

View file

@ -1,14 +0,0 @@
{ pkgs, ... }:
let
intellij = pkgs.unstable.jetbrains.idea-ultimate.override {
jdk = pkgs.pkgs.openjdk17;
};
in
{
home.packages = [
(pkgs.unstable.jetbrains.plugins.addPlugins intellij [ "ideavim" ])
];
home.sessionVariables = {
LD_LIBRARY_PATH = "${pkgs.libGL}/lib:${pkgs.gtk3}/lib:${pkgs.glib.out}/lib:${pkgs.xorg.libXtst}/lib";
};
}

View file

@ -1,95 +0,0 @@
{
programs.nixvim.plugins = {
cmp-emoji = {
enable = true;
};
cmp = {
enable = true;
settings = {
completion = {
completeopt = "menu,menuone,noinsert";
};
autoEnableSources = true;
experimental = {ghost_text = true;};
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
snippet = {
expand = ''
function(args)
require('luasnip').lsp_expand(args.body)
end
'';
};
formatting = {fields = ["kind" "abbr" "menu"];};
sources = [
{name = "nvim_lsp";}
{name = "emoji";}
{
name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3;
}
# { name = "copilot"; } # enable/disable copilot
{
name = "path"; # file system paths
keywordLength = 3;
}
{
name = "luasnip"; # snippets
keywordLength = 3;
}
];
window = {
completion = {border = "solid";};
documentation = {border = "solid";};
};
mapping = {
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
"<C-e>" = "cmp.mapping.abort()";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
"<C-l>" = ''
cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' })
'';
"<C-h>" = ''
cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' })
'';
};
};
};
cmp-nvim-lsp = {
enable = true; # LSP
};
cmp-buffer = {
enable = true;
};
cmp-path = {
enable = true; # file system paths
};
cmp_luasnip = {
enable = true; # snippets
};
cmp-cmdline = {
enable = true; # autocomplete for cmdline
};
};
}

View file

@ -1,12 +0,0 @@
{inputs, ...}: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
./options.nix
./plugins.nix
./cmp.nix
./lsp.nix
./none-ls.nix
./keymaps.nix
];
programs.nixvim.enable = true;
}

View file

@ -1,118 +0,0 @@
{
programs.nixvim.keymaps = [
{
mode = [
"n"
"v"
];
key = "<leader>fc";
action = "<cmd>lua vim.lsp.buf.format()<cr>";
options = {
silent = true;
desc = "Format Code";
};
}
{
mode = "n";
key = "<leader>ch";
action = "<cmd>noh<CR>";
options = {
silent = true;
desc = "Clear Highlighting";
};
}
{
mode = "n";
key = "<C-p>";
action = "<cmd>Telescope live_grep<CR>";
options = {
desc = "Telescope LiveGrep";
};
}
{
mode = "n";
key = "<leader>fg";
action = "<cmd>Telescope find_files<CR>";
options = {
desc = "Telescope File Search";
};
}
{
mode = "n";
key = "<C-n>";
action = "<Cmd>Neotree toggle<CR>";
options = {
silent = true;
desc = "Toggle Neotree";
};
}
{
mode = "n";
key = "<leader><tab><tab>";
action = "<cmd>tabnew<cr>";
options = {
desc = "New Tab";
};
}
{
mode = "n";
key = "<leader><tab>]";
action = "<cmd>BufferNext<cr>";
options = {
desc = "Next Tab";
};
}
{
mode = "n";
key = "<leader><tab>d";
action = "<cmd>BufferClose<cr>";
options = {
desc = "Close Tab";
};
}
{
mode = "n";
key = "<leader><tab>[";
action = "<cmd>BufferPrevious<cr>";
options = {
desc = "Previous Tab";
};
}
{
mode = "n";
key = "<c-k>";
action = ":wincmd k<CR>";
options = {
silent = true;
desc = "Go Up";
};
}
{
mode = "n";
key = "<c-j>";
action = ":wincmd j<CR>";
options = {
silent = true;
desc = "Go Down";
};
}
{
mode = "n";
key = "<c-h>";
action = ":wincmd h<CR>";
options = {
silent = true;
desc = "Go Left";
};
}
{
mode = "n";
key = "<c-l>";
action = ":wincmd l<CR>";
options = {
silent = true;
desc = "Go Right";
};
}
];
}

View file

@ -1,29 +0,0 @@
{
programs.nixvim.plugins = {
rustaceanvim.enable = true;
lsp = {
enable = true;
inlayHints = true;
servers = {
ts_ls.enable = true; # TS/JS
cssls.enable = true; # CSS
html.enable = true; # HTML
pyright.enable = true; # Python
marksman.enable = true; # Markdown
nil_ls.enable = true; # Nix
dockerls.enable = true; # Docker
bashls.enable = true; # Bash
clangd.enable = true; # C/C++
yamlls.enable = true; # YAML
gopls.enable = true; # Go
lua_ls = {
# Lua
enable = true;
settings.telemetry.enable = false;
};
};
};
};
}

View file

@ -1,44 +0,0 @@
{
programs.nixvim.plugins = {
none-ls = {
enable = true;
sources = {
code_actions = {
statix.enable = true;
gitsigns.enable = true;
};
diagnostics = {
statix.enable = true;
deadnix.enable = true;
pylint.enable = true;
checkstyle.enable = true;
golangci_lint.enable = true; # Go
};
formatting = {
alejandra.enable = true;
stylua.enable = true;
shfmt.enable = true;
nixpkgs_fmt.enable = true;
google_java_format.enable = false;
gofmt.enable = true; # Go
prettier = {
enable = true;
disableTsServerFormatter = true;
};
black = {
enable = true;
settings = ''
{
extra_args = { "--fast" },
}
'';
};
};
completion = {
luasnip.enable = true;
spell.enable = true;
};
};
};
};
}

View file

@ -1,53 +0,0 @@
{
programs.nixvim = {
config = {
# System clipboard support, needs xclip/wl-clipboard
clipboard = {
providers = {
wl-copy.enable = true; # Wayland
xsel.enable = true; # For X11
};
register = "unnamedplus";
};
globals.mapleader = " ";
opts = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 0; # Tab width should be 2
tabstop = 3; # Tab width should be 4
# Always show the signcolumn, otherwise text would be shifted when displaying error icons
signcolumn = "yes";
# Enable mouse
mouse = "a";
# Search
ignorecase = true;
smartcase = true;
# Save undo history
undofile = true;
# Global substitution by default
gdefault = true;
# Start scrolling when the cursor is X lines away from the top/bottom
scrolloff = 8;
# Enable 24-bit RGB color in the TUI
termguicolors = true;
# Wrap long lines at a character in 'breakat'
linebreak = true;
smartindent = true;
# Remove EOB
fillchars = {
eob = " ";
};
};
};
};
}

View file

@ -1,112 +0,0 @@
{pkgs, ...}: {
programs.nixvim.plugins = {
lualine.enable = true;
oil.enable = true;
nvim-surround.enable = true;
treesitter = {
enable = true;
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
markdown
# nix
vim
bash
lua
python
json
java
rust
cpp
c
css
csv
dockerfile
diff
gitignore
git_config
gitattributes
make
yaml
toml
typescript
xml
];
};
# Autopairs
nvim-autopairs = {
enable = true;
};
luasnip.enable = true;
lazygit.enable = true;
barbar.enable = true;
rainbow-delimiters.enable = true;
web-devicons.enable = true;
telescope = {
enable = true;
extensions = {
fzf-native = {
enable = true;
};
};
};
# Dashboard
alpha = {
enable = true;
theme = "dashboard";
};
# File tree
neo-tree = {
enable = true;
enableDiagnostics = false;
enableGitStatus = true;
enableModifiedMarkers = true;
enableRefreshOnWrite = true;
closeIfLastWindow = true;
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
buffers = {
bindToCwd = false;
followCurrentFile = {
enabled = true;
};
};
window = {
width = 40;
height = 15;
autoExpandWidth = false;
mappings = {
"<space>" = "none";
};
};
};
# Todo comments
todo-comments = {
enable = true;
settings.colors = {
error = ["DiagnosticError" "ErrorMsg" "#DC2626"];
warning = ["DiagnosticWarn" "WarningMsg" "#FBBF24"];
info = ["DiagnosticInfo" "#2563EB"];
hint = ["DiagnosticHint" "#10B981"];
default = ["Identifier" "#7C3AED"];
test = ["Identifier" "#FF00FF"];
};
};
# Highlight word under cursor
illuminate = {
enable = true;
underCursor = false;
filetypesDenylist = [
"Outline"
"TelescopePrompt"
"alpha"
"harpoon"
"reason"
];
};
};
}

View file

@ -1,245 +0,0 @@
{
config,
lib,
pkgs,
# vars,
...
}: let
vars = import ../../../../vars.nix;
stableExtraPkgs = with pkgs; [
# LSP
lua-language-server
pkgs.nodePackages.typescript-language-server
clang-tools
# Formatters
stylua # lua
black # pyton
alejandra # nix
clang-tools_16 # c/c++
rustfmt
yamlfmt
prettierd
vscode-langservers-extracted
# Linters
ruff # python
nodePackages.jsonlint # json
nodePackages.eslint_d # javascript
# Tools
xclip
wl-clipboard
fzf
gcc
# idk?
lua
];
unstableExtraPkgs = with pkgs.unstable; [
# LSP
nixd
];
in {
home.sessionVariables.EDITOR = "nvim";
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
extraPackages = stableExtraPkgs ++ unstableExtraPkgs;
plugins = with pkgs.vimPlugins; [
{
plugin = neodev-nvim;
type = "lua";
config = ''
require("neodev").setup({
override = function(root_dir, library)
if root_dir:find("/home/${vars.user + "/" + vars.dir_name}", 1, true) == 1 then
library.enabled = true
library.plugins = true
end
end,
})
'';
}
{
plugin = nvim-lspconfig;
config = builtins.readFile ./plugin/lsp.lua;
type = "lua";
}
{
plugin = comment-nvim;
config = "require('Comment').setup()";
type = "lua";
}
cmp-path
nvim-cmp
{
plugin = nvim-cmp;
config = builtins.readFile ./plugin/cmp.lua;
type = "lua";
}
{
plugin = telescope-nvim;
config = builtins.readFile ./plugin/telescope.lua;
type = "lua";
}
telescope-fzf-native-nvim
telescope-ui-select-nvim
cmp_luasnip
cmp-nvim-lsp
luasnip
friendly-snippets
{
plugin = nvim-treesitter.withPlugins (p: [
p.vim
p.bash
p.lua
p.python
p.json
p.java
p.rust
p.cpp
p.c
p.css
p.csv
p.dockerfile
p.diff
p.gitignore
p.git_config
p.gitattributes
p.make
p.yaml
p.toml
p.typescript
p.xml
]);
config = builtins.readFile ./plugin/treesitter.lua;
type = "lua";
}
vim-nix
{
plugin = lualine-nvim;
config = builtins.readFile ./plugin/lualine.lua;
type = "lua";
}
nvim-web-devicons
plenary-nvim
nui-nvim
{
plugin = neo-tree-nvim;
config = builtins.readFile ./plugin/neo-tree.lua;
type = "lua";
}
{
plugin = gitsigns-nvim;
config = "require('gitsigns').setup()";
type = "lua";
}
diffview-nvim
lazygit-nvim
{
plugin = todo-comments-nvim;
config = builtins.readFile ./plugin/todo.lua;
type = "lua";
}
{
plugin = alpha-nvim;
config = builtins.readFile ./plugin/alpha.lua;
type = "lua";
}
{
plugin = none-ls-nvim;
config = builtins.readFile ./plugin/none-ls.lua;
type = "lua";
}
{
plugin = nvim-autopairs;
config = "require('nvim-autopairs').setup()";
type = "lua";
}
barbar-nvim
{
plugin = nvim-surround;
config = "require('nvim-surround').setup({})";
type = "lua";
}
vim-be-good
rainbow-delimiters-nvim
rustaceanvim
{
plugin = vim-tmux-navigator;
config = builtins.readFile ./plugin/vim-tmux-navigator.lua;
type = "lua";
}
{
plugin = nvim-ts-autotag;
config = "require('nvim-ts-autotag').setup({})";
type = "lua";
}
];
extraLuaConfig = ''
${builtins.readFile ./options.lua}
'';
};
xdg.desktopEntries = {
nvim = {
name = "Neovim";
genericName = "Text Editor";
comment = "Edit text files";
exec = "nvim %F";
icon = "nvim";
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
terminal = true;
type = "Application";
categories = ["Utility" "TextEditor"];
};
};
}

View file

@ -1,25 +0,0 @@
vim.keymap.set("", "<Space>", "<Nop>")
vim.keymap.set("", "<C-Space>", "<Nop>")
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.o.clipboard = "unnamedplus"
-- vim.o.number = true
vim.o.relativenumber = true
vim.o.signcolumn = "yes"
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.updatetime = 300
vim.o.termguicolors = true
vim.o.mouse = "a"
-- disable empty line ~
vim.o.fillchars = "eob: "
vim.o.undofile = true

View file

@ -1,32 +0,0 @@
local dashboard = require("alpha.themes.dashboard")
local function button(sc, txt, keybind, keybind_opts)
local b = dashboard.button(sc, txt, keybind, keybind_opts)
b.opts.hl = "Identifier"
b.opts.hl_shortcut = "Identifier"
return b
end
dashboard.section.buttons.val = {
button("r", " > Recent files", ":Telescope oldfiles<CR>"),
button("n", " > New file", ":ene <BAR> startinsert <CR>"),
button("f", " > Find files", ":Telescope find_files hidden=true<CR>"),
button("u", " > Update plugins", ":PackerSync<CR>"),
button("q", " > Quit Neovim", ":qa<CR>"),
}
dashboard.section.footer.val = require("alpha.fortune")
dashboard.section.header.val = {
[[ ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓]],
[[ ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒]],
[[▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░]],
[[▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ]],
[[▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒]],
[[░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░]],
[[░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░]],
[[ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ]],
[[ ░ ░ ░ ░ ░ ░ ░ ░ ]],
[[ ░ ]],
}
dashboard.section.header.opts.hl = "Function"
dashboard.section.footer.opts.hl = "Function"
require("alpha").setup(require("alpha.themes.dashboard").opts)

View file

@ -1,47 +0,0 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load()
luasnip.config.setup({})
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete({}),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}),
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "path" },
},
})

View file

@ -1,75 +0,0 @@
local on_attach = function(_, bufnr)
local bufmap = function(keys, func)
vim.keymap.set("n", keys, func, { buffer = bufnr })
end
bufmap("<leader>r", vim.lsp.buf.rename)
bufmap("<leader>a", vim.lsp.buf.code_action)
bufmap("gd", vim.lsp.buf.definition)
bufmap("gD", vim.lsp.buf.declaration)
bufmap("gI", vim.lsp.buf.implementation)
bufmap("<leader>D", vim.lsp.buf.type_definition)
bufmap("gr", require("telescope.builtin").lsp_references)
bufmap("<leader>s", require("telescope.builtin").lsp_document_symbols)
bufmap("<leader>S", require("telescope.builtin").lsp_dynamic_workspace_symbols)
bufmap("K", vim.lsp.buf.hover)
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, {})
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
require("lspconfig").lua_ls.setup({
on_attach = on_attach,
capabilities = capabilities,
root_dir = function()
return vim.loop.cwd()
end,
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
})
require("lspconfig").nixd.setup({
on_attach = on_attach,
capabilities = capabilities,
})
require("lspconfig").ts_lsp.setup({
on_attach = on_attach,
capabilities = capabilities,
})
require("lspconfig").eslint.setup({
settings = {
packageManager = "yarn",
},
on_attach = function(client, bufnr)
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
command = "EslintFixAll",
})
vim.api.nvim_create_autocmd("BufWritePost", {
callback = function()
vim.lsp.buf.format()
end,
})
end,
})
require("lspconfig").clangd.setup({
on_attach = function(client, bufnr)
client.server_capabilities.signatureHelpProvider = false
on_attach(client, bufnr)
end,
capabilities = capabilities,
})

View file

@ -1,10 +0,0 @@
local lualine = require("lualine")
local config = {
options = {
theme = "base16",
globalstatus = true,
},
}
lualine.setup(config)

View file

@ -1,19 +0,0 @@
require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
hide_root_node = true, -- Hide the root node
filesystem = {
filtered_items = {
visible = false,
hide_dotfiles = false,
hide_gitignored = false,
hide_by_name = {
".git",
".DS_Store",
"thumbs.db",
},
show_hidden_count = false,
},
},
})
vim.keymap.set("n", "<C-n>", "<Cmd>Neotree toggle<CR>")

View file

@ -1,47 +0,0 @@
local null_ls = require("null-ls")
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
local opts = {
sources = {
-- Lua
null_ls.builtins.formatting.stylua,
-- Python
null_ls.builtins.formatting.black,
-- null_ls.builtins.diagnostics.ruff,
-- Javascript
-- null_ls.builtins.diagnostics.eslint_d,
-- null_ls.builtins.diagnostics.jsonlint,
-- C/C++
null_ls.builtins.formatting.clang_format,
-- Nix
null_ls.builtins.formatting.alejandra,
-- Rust
-- null_ls.builtins.formatting.rustfmt,
-- YAML
null_ls.builtins.formatting.yamlfmt,
-- Typescript
null_ls.builtins.formatting.prettier.with({
condition = function(utils)
return utils.has_file({ ".prettierrc.js" })
end,
}),
},
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({
group = augroup,
buffer = bufnr,
})
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
end
end,
}
null_ls.setup(opts)
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})

View file

@ -1 +0,0 @@

View file

@ -1,20 +0,0 @@
require("telescope").setup({
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
},
})
require("telescope").load_extension("fzf")
require("telescope").load_extension("ui-select")
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})

View file

@ -1,55 +0,0 @@
require("todo-comments").setup({
signs = true,
sign_priority = 8,
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "󰑮 ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "󰤑 ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" },
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- pattern = [[\b(KEYWORDS):]], -- ripgrep regex
pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon.
},
})

View file

@ -1,9 +0,0 @@
require("nvim-treesitter.configs").setup({
ensure_installed = {},
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
})

View file

@ -1,5 +0,0 @@
-- Navigate vim panes better
vim.keymap.set("n", "<c-k>", ":wincmd k<CR>")
vim.keymap.set("n", "<c-j>", ":wincmd j<CR>")
vim.keymap.set("n", "<c-h>", ":wincmd h<CR>")
vim.keymap.set("n", "<c-l>", ":wincmd l<CR>")

View file

@ -1,46 +0,0 @@
{pkgs, ...}: {
home.packages = [pkgs.tmuxinator-fzf-start];
programs.tmux = {
enable = true;
keyMode = "vi";
customPaneNavigationAndResize = true;
mouse = true;
tmuxinator.enable = true;
shortcut = "Space";
extraConfig = ''
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
set -sg escape-time 0
'';
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g status-position top
set-option -sa terminal-features ',xterm-256color:RGB'
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "directory session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
'';
}
];
};
}

View file

@ -1,68 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: let
in {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions;
[
catppuccin.catppuccin-vsc
pkief.material-icon-theme
vscodevim.vim
bbenoist.nix
ms-python.python
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
ms-toolsai.jupyter-keymap
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "remote-ssh-edit";
publisher = "ms-vscode-remote";
version = "0.47.2";
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
}
];
userSettings = {
#Theming
"window.menuBarVisibility" = "toggle";
"editor.minimap.autohide" = false;
#Extensions - General
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
# Startup
"workbench.startupEditor" = "none";
# Vim
"editor.lineNumbers" = "relative";
};
keybindings = [
# Navigating Autosuggest and Quick Open entries
{
"key" = "ctrl+j";
"command" = "selectNextSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+k";
"command" = "selectPrevSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+j";
"command" = "workbench.action.quickOpenSelectNext";
"when" = "inQuickOpen";
}
{
"key" = "ctrl+k";
"command" = "workbench.action.quickOpenSelectPrevious";
"when" = "inQuickOpen";
}
];
};
}

View file

@ -1,28 +0,0 @@
{pkgs, ...}: {
imports = [
../common
./zathura.nix
];
home = {
file.".wallpapers" = {
source = ../../../../rsc/wallpaper;
recursive = true;
};
file.".config/awesome/" = {
source = ../../../../rsc/config/awesome;
recursive = true;
};
packages = with pkgs; [
rofi
redshift
xbindkeys
clipmenu
flameshot
xclip
brightnessctl
feh
];
};
}

View file

@ -1,9 +0,0 @@
{
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
statusbar-home-tilde = true;
};
};
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [freecad cura];
}

View file

@ -1,11 +0,0 @@
{
programs.alacritty.enable = true;
programs.alacritty.settings = {
window = {
padding = {
x = 0;
y = 5;
};
};
};
}

View file

@ -1,24 +0,0 @@
{pkgs, ...}: {
imports = [
./firefox.nix
./wezterm.nix
./font.nix
./playerctl.nix
./easyeffects.nix
./nextcloud.nix
./flatpak.nix
./notes.nix
./fcitx5.nix
];
home.packages = with pkgs;
[
signal-desktop # secure messenger
webcord-vencord # more "privacy friendly" discord client
anki
calibre
mpv # Video player
]
++ (with pkgs.unstable; [feishin]);
}

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
# services.easyeffects.enable = true;
xdg.configFile."easyeffects/output/Beyerdynamic_DT990_Oratory.json" = {
source = ../../../../rsc/config/easyeffects/Beyerdynamic_DT990_Oratory.json;
};
home.packages = with pkgs; [easyeffects];
}

View file

@ -1,107 +0,0 @@
{pkgs, ...}: {
# xdg.configFile."fcitx5" = {
# source = ../../../../rsc/config/fcitx5;
# recursive = true;
# };
xdg.configFile = {
"fcitx5/config" = {
force = true;
text = ''
[Hotkey]
# Enumerate when press trigger key repeatedly
EnumerateWithTriggerKeys=True
# Temporally switch between first and current Input Method
AltTriggerKeys=
# Enumerate Input Method Forward
EnumerateForwardKeys=
# Enumerate Input Method Backward
EnumerateBackwardKeys=
# Skip first input method while enumerating
EnumerateSkipFirst=False
# Enumerate Input Method Group Forward
EnumerateGroupForwardKeys=
# Enumerate Input Method Group Backward
EnumerateGroupBackwardKeys=
# Activate Input Method
ActivateKeys=
# Deactivate Input Method
DeactivateKeys=
# Default Previous page
PrevPage=
# Default Next page
NextPage=
# Default Previous Candidate
PrevCandidate=
# Default Next Candidate
NextCandidate=
# Toggle embedded preedit
TogglePreedit=
[Hotkey/TriggerKeys]
0=Control+Alt+space
[Behavior]
# Active By Default
ActiveByDefault=False
# Share Input State
ShareInputState=No
# Show preedit in application
PreeditEnabledByDefault=True
# Show Input Method Information when switch input method
ShowInputMethodInformation=True
# Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=False
# Show compact input method information
CompactInputMethodInformation=True
# Show first input method information
ShowFirstInputMethodInformation=True
# Default page size
DefaultPageSize=5
# Override Xkb Option
OverrideXkbOption=False
# Custom Xkb Option
CustomXkbOption=
# Force Enabled Addons
EnabledAddons=
# Force Disabled Addons
DisabledAddons=
# Preload input method to be used by default
PreloadInputMethod=True
# Allow input method in the password field
AllowInputMethodForPassword=False
# Show preedit text when typing password
ShowPreeditForPassword=False
# Interval of saving user data in minutes
AutoSavePeriod=30
'';
};
"fcitx5/profile" = {
force = true;
text = ''
[Groups/0]
# Group Name
Name="Group 1"
# Layout
Default Layout=de
# Default Input Method
DefaultIM=mozc
[Groups/0/Items/0]
# Name
Name=keyboard-de
# Layout
Layout=
[Groups/0/Items/1]
# Name
Name=mozc
# Layout
Layout=
[GroupOrder]
0="Group 1"
'';
};
};
}

View file

@ -1,150 +0,0 @@
{ inputs
, pkgs
, ...
}: {
programs.librewolf = {
enable = true;
package = pkgs.librewolf.override {
nativeMessagingHosts = with pkgs; [
kdePackages.plasma-browser-integration
];
};
profiles.Default = {
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
bitwarden
ublock-origin
darkreader
tabliss
consent-o-matic
floccus
gesturefy
plasma-integration
libredirect
yomitan
];
search.engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"Home Manager" = {
urls = [
{
template = "https://home-manager-options.extranix.com";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
"Searx" = {
urls = [
{
template = "https://paulgo.io/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://paulgo.io/favicon.ico";
definedAliases = [ "@sx" ];
};
"Amazon" = {
urls = [
{
template = "https://www.amazon.de/s";
params = [
{
name = "k";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://amazon.de/favicon.ico";
definedAliases = [ "@a" ];
};
"YouTube" = {
urls = [
{
template = "https://efy.piped.pages.dev/results";
params = [
{
name = "search_query";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://piped.video/favicon.ico";
definedAliases = [ "yt" ];
};
};
search = {
force = true;
default = "DuckDuckGo";
privateDefault = "DuckDuckGo";
};
settings = {
"ui.context_menus.after_mouseup" = true; # Fixes context menu after Gesturefy swipe
"extensions.screenshots.disabled" = true; # Firefox Screenshot feature is annoying
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false; # Disable cookie clearing
"media.hardwaremediakeys.enabled" = false; # Interferes with KDE Connect
"browser.urlbar.keepPanelOpenDuringImeComposition" = true; # Improve Firefox IME support
"media.eme.enabled" = true; # Enable DRM for e.g. Spotify
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true; # Automatically decline Canvas request
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # Disable picture in picture
"dom.security.https_only_mode" = true;
"browser.download.panel.shown" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"signon.rememberSignons" = false;
"browser.formfill.enable" = false;
"signon. prefillForms" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["addon_darkreader_org-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","downloads-button","unified-extensions-button","ublock0_raymondhill_net-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","addon_darkreader_org-browser-action","ublock0_raymondhill_net-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","unified-extensions-area"],"currentVersion":20,"newElementCount":4}'';
};
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}

View file

@ -1,23 +0,0 @@
{ inputs, ... }: {
imports = [ inputs.nix-flatpak.homeManagerModules.nix-flatpak ];
services.flatpak = {
uninstallUnmanaged = true;
packages = [
"md.obsidian.Obsidian"
"com.github.iwalton3.jellyfin-media-player"
"com.github.tchx84.Flatseal"
];
overrides = {
global = {
Context = {
sockets = [ "wayland" "!x11" "!fallback-x11" ];
filesystems = [
"~/.local/share/fonts:ro"
"~/.icons:ro"
"/nix/store:ro"
];
};
};
};
};
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
fontProfiles = {
enable = true;
monospace = {
family = "JetBrains Mono Nerd Font";
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
};
regular = {
family = "Fira Sans";
package = pkgs.fira;
};
};
}

View file

@ -1,3 +0,0 @@
{
services.nextcloud-client.enable = true;
}

View file

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

View file

@ -1,6 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [playerctl];
services.playerctld = {
enable = true;
};
}

View file

@ -1,22 +0,0 @@
{
pkgs,
config,
...
}: {
programs.wezterm = {
enable = true;
extraConfig = ''
return {
front_end = "WebGpu", -- fixes https://github.com/wez/wezterm/issues/5990H
warn_about_missing_glyphs=false,
enable_wayland = true,
hide_tab_bar_if_only_one_tab = true,
window_close_confirmation = "NeverPrompt",
use_ime = true,
set_environment_variables = {
TERM = 'wezterm',
},
}
'';
};
}

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
imports = [
../common
];
}

View file

@ -1,260 +0,0 @@
{
wayland.windowManager.hyprland = {
settings = {
# autostart
exec-once = [
"systemctl --user start hyprpolkitagent" # polkit agent
"hyprshade on bluelight" # set bluelight shader
"fcitx5 -d" # japanese typing
"webcord --start-minimized --force-audio-share-support" # discord but some privacy
"kdeconnect-indicator & kdeconnect-cli -l" # kde connect
"signal-desktop --start-in-tray"
"wl-clip-persist --clipboard both &" # Keep Wayland clipboard even after programs close
"wl-paste --watch cliphist store &" # Store clipboard contents in cliphist on each change
];
input = {
kb_layout = "de";
numlock_by_default = true;
follow_mouse = 1;
sensitivity = 0; # 0 means no modification
touchpad = {
natural_scroll = true;
};
};
general = {
"$mainMod" = "SUPER";
"$terminal" = "alacritty";
"$menu" = "wofi --show drun --allow-images --no-actions";
layout = "dwindle";
gaps_in = 5;
gaps_out = 10;
border_size = 2;
border_part_of_window = false;
no_border_on_floating = false;
};
plugin = {
hyprsplit = {
num_workspaces = 10;
};
};
misc = {
disable_hyprland_logo = true;
always_follow_on_dnd = true;
layers_hog_keyboard_focus = true;
animate_manual_resizes = false;
enable_swallow = true;
focus_on_activate = true;
new_window_takes_over_fullscreen = 2;
middle_click_paste = false;
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
master = {
new_status = "master";
};
decoration = {
rounding = 10;
blur = {
enabled = true;
passes = 3;
};
shadow = {
enabled = true;
range = 4;
render_power = 3;
};
};
animations = {
enabled = true;
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
bind = [
"$mainMod, Return, exec, $terminal"
"$mainMod SHIFT, C, killactive"
"$mainMod, C ,exec, hyprshade off && hyprpicker -a && hyprshade on bluelight"
"$mainMod SHIFT, Q, exit"
"$mainMod, T, togglefloating"
"$mainMod, Space, exec, $menu"
"$mainMod, P, pseudo" # determine subsplit
"$mainMod, F, fullscreen, 0"
"$mainMod SHIFT, F, fullscreen, 1"
", Print, exec, hyprshade off && grim -g \"$(slurp -w 0 -d -b 00000080)\" - | wl-copy && hyprshade on bluelight"
"$mainMod, L, exec, hyprlock" # lockscreen
"$mainMod SHIFT, L, exec, hyprlock & disown && systemctl suspend" # hibernation with lockscreen
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, j, movefocus, d"
"$mainMod, k, movefocus, u"
"$mainMod, l, movefocus, r"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, split:workspace, 1"
"$mainMod, 2, split:workspace, 2"
"$mainMod, 3, split:workspace, 3"
"$mainMod, 4, split:workspace, 4"
"$mainMod, 5, split:workspace, 5"
"$mainMod, 6, split:workspace, 6"
"$mainMod, 7, split:workspace, 7"
"$mainMod, 8, split:workspace, 8"
"$mainMod, 9, split:workspace, 9"
"$mainMod, 0, split:workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, split:movetoworkspacesilent, 1"
"$mainMod SHIFT, 2, split:movetoworkspacesilent, 2"
"$mainMod SHIFT, 3, split:movetoworkspacesilent, 3"
"$mainMod SHIFT, 4, split:movetoworkspacesilent, 4"
"$mainMod SHIFT, 5, split:movetoworkspacesilent, 5"
"$mainMod SHIFT, 6, split:movetoworkspacesilent, 6"
"$mainMod SHIFT, 7, split:movetoworkspacesilent, 7"
"$mainMod SHIFT, 8, split:movetoworkspacesilent, 8"
"$mainMod SHIFT, 9, split:movetoworkspacesilent, 9"
"$mainMod SHIFT, 0, split:movetoworkspacesilent, 10"
# window control
"$mainMod SHIFT, left, movewindow, l"
"$mainMod SHIFT, right, movewindow, r"
"$mainMod SHIFT, up, movewindow, u"
"$mainMod SHIFT, down, movewindow, d"
"$mainMod SHIFT, h, movewindow, l"
"$mainMod SHIFT, j, movewindow, d"
"$mainMod SHIFT, k, movewindow, u"
"$mainMod SHIFT, l, movewindow, r"
"$mainMod CTRL, left, resizeactive, -80 0"
"$mainMod CTRL, right, resizeactive, 80 0"
"$mainMod CTRL, up, resizeactive, 0 -80"
"$mainMod CTRL, down, resizeactive, 0 80"
"$mainMod CTRL, h, resizeactive, -80 0"
"$mainMod CTRL, j, resizeactive, 0 80"
"$mainMod CTRL, k, resizeactive, 0 -80"
"$mainMod CTRL, l, resizeactive, 80 0"
"$mainMod ALT, left, moveactive, -80 0"
"$mainMod ALT, right, moveactive, 80 0"
"$mainMod ALT, up, moveactive, 0 -80"
"$mainMod ALT, down, moveactive, 0 80"
"$mainMod ALT, h, moveactive, -80 0"
"$mainMod ALT, j, moveactive, 0 80"
"$mainMod ALT, k, moveactive, 0 -80"
"$mainMod ALT, l, moveactive, 80 0"
# Example special workspace (scratchpad)
"$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
# media and volume controls
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86AudioStop,exec, playerctl stop"
# clipboard manager
"$mainMod, V, exec, cliphist list | wofi --show dmenu | cliphist decode | wl-copy"
];
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
windowrulev2 = [
"suppressevent maximize, class:.*" # Ignore maximize requests from apps. You'll probably like this.
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # Fix some dragging issues with XWayland
"float, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"float,class:^(pavucontrol)$"
"float,class:^(SoundWireServer)$"
"float,class:^(.sameboy-wrapped)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
"float,class:^(dialog)$"
"float,class:^(download)$"
"float,class:^(notification)$"
"float,class:^(error)$"
"float,class:^(confirmreset)$"
"float,title:^(Open File)$"
"float,title:^(File Upload)$"
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
# workspace setup
"workspace 10, class:^(feishin)$"
# nextcloud
"float,class:^(com.nextcloud.desktopclient.nextcloud)$"
"stayfocused,class:^(com.nextcloud.desktopclient.nextcloud)$" # otherwise window immediately closes
# Remove context menu transparency in chromium based apps
"opaque,class:^()$,title:^()$"
"noshadow,class:^()$,title:^()$"
"noblur,class:^()$,title:^()$"
];
monitor = [
"DP-1, 1920x1080@74.97, auto-left, 1" # Adalbert: Left
"DP-3, 2560x1440@143.86, auto-right, 1" # Adalbert: Right
"eDP-1, 1920x1080@60, auto, 1" # Ludwig
",preferred,auto,auto"
];
misc = {
vrr = 1;
};
};
};
}

View file

@ -1,117 +0,0 @@
{ lib
, pkgs
, ...
}: {
imports = [ ./config.nix ./variables.nix ./hyprlock.nix];
home.packages = with pkgs; [
hyprpicker # color picker
wofi # dmenu replacement
hyprshade # shader control, used for rudimentary blue-light filter
hyprpolkitagent
grim
slurp
# clipboard management
wl-clip-persist
wl-clipboard
cliphist
];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
};
services.dunst = {
enable = true;
settings = {
global = {
corner_radius = 5;
};
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ];
modules-right = lib.mkDefault [ "tray" "memory" "cpu" "clock" ];
tray.spacing = 10;
clock.tooltip-format = "{:%d.%m.%Y}";
cpu.format = "{}% ";
memory.format = " | {}% ";
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
"9" = "";
"10" = "󰝚";
"11" = "1";
"12" = "2";
"13" = "3";
"14" = "4";
"15" = "5";
"16" = "6";
"17" = "7";
"18" = "8";
"19" = "9";
"20" = "10";
"urgent" = "";
"focused" = "";
};
};
};
};
};
xdg.configFile."hypr/shaders/bluelight.glsl".text = ''
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
const float temperature = 4000.0;
const float temperatureStrength = 1.0;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature) {
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275))
: mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0), smoothstep(1000.0, 0.0, temperature));
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}
'';
}

View file

@ -1,36 +0,0 @@
{ config, ... }:
let
textColor = config.lib.stylix.colors.base05;
in
{
programs.hyprlock = {
enable = true;
settings = {
# background = {
# blur_passes = 1;
# };
label = [
# Date
{
text = ''cmd[update:3600000] echo -e "<b> "$(date +'%A, %-d. %B %Y')" </b>"'';
font_size = 35;
color = "rgb(${textColor})";
position = "0, -150";
halign = "center";
valign = "top";
shadow_passes = 3;
}
# Time
{
text = ''cmd[update:3600000] echo -e "<b><big> $(date +"%H:%M") </big></b>"'';
font_size = 94;
color = "rgb(${textColor})";
position = "0, -210";
halign = "center";
valign = "top";
shadow_passes = 3;
}
];
};
};
}

View file

@ -1,11 +0,0 @@
{
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
DIRENV_LOG_FORMAT = "";
QT_QPA_PLATFORM = "xcb";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
};
}

View file

@ -1,12 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
protonup-rs
heroic
(lutris.override {
extraLibraries = pkgs: [
wine
wineWowPackages.stable
];
})
];
}

View file

@ -1,14 +0,0 @@
{
xdg.userDirs = {
enable = true;
createDirectories = true;
desktop = "/home/ghoscht/Uni";
download = "/home/ghoscht/Downloads";
documents = "/home/ghoscht/Documents";
music = null;
pictures = "/home/ghoscht/Pictures";
publicShare = null;
templates = null;
videos = null;
};
}

View file

@ -1,24 +0,0 @@
{
inputs,
outputs,
...
}: let
in {
imports = [
./global
./features/coding/nixvim
./features/coding/tmux.nix
];
home.file.".docker" = {
source = ../rsc/docker/franz;
recursive = true;
};
nixpkgs = {
config = {
permittedInsecurePackages = [
"nix-2.15.3"
];
};
};
}

View file

@ -1,84 +0,0 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
vars,
...
}: {
# You can import other home-manager modules here
imports =
[
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules
# You can also split up your configuration and import pieces of it here:
../features/cli
../features/general/xdg-dirs.nix
]
++ (builtins.attrValues outputs.homeManagerModules);
nixpkgs = {
# You can add overlays here
overlays =
[
# Add overlays your own flake exports (from overlays and pkgs dir):
# outputs.overlays.additions
# outputs.overlays.modifications
# outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
]
++ (builtins.attrValues outputs.overlays);
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
permittedInsecurePackages = [
"electron-24.8.6" #fixes Feishin & Webcord
];
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = ["nix-command" "flakes"];
warn-dirty = false;
};
};
home = {
username = lib.mkDefault vars.user;
homeDirectory = lib.mkDefault "/home/${config.home.username}";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
stateVersion = "23.11";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
}

View file

@ -1,52 +0,0 @@
{ lib
, pkgs
, ...
}: {
imports = [
./global
./features/desktop/awesome
./features/desktop/common/alacritty.nix
./features/desktop/hyprland
./features/desktop/gnome
./features/coding
];
home.packages = with pkgs; [ nextcloud-client ];
nixpkgs = {
config = {
permittedInsecurePackages = [
"electron-25.9.0"
"nix-2.15.3"
];
};
};
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"${lib.getExe pkgs.batsignal} -c 20 -w 30 -f 80 -n BAT0 -a Battery"
];
bind = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +10%"
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 10%-"
];
};
};
programs.waybar = {
settings = {
mainBar = {
modules-right = [ "tray" "memory" "cpu" "battery" "clock" ];
battery = {
format = "{capacity}% {icon} ";
format-icons = [ "" "" "" "" "" ];
max-length = 25;
};
};
};
};
}

View file

@ -1,84 +0,0 @@
{ inputs
, outputs
, pkgs
, ...
}: {
imports = [
inputs.hardware.nixosModules.common-cpu-amd-pstate
inputs.hardware.nixosModules.common-gpu-nvidia-nonprime
inputs.hardware.nixosModules.common-pc-ssd
./hardware-configuration.nix
../common/global
../common/optional/desktop/awesome.nix
../common/optional/desktop/hyprland.nix
../common/optional/systemd-boot.nix
../common/optional/wireshark.nix
../common/optional/kde-connect.nix
../common/optional/gnome-keyring.nix
../common/optional/adb.nix
../common/optional/docker.nix
../common/optional/gaming/gamemode.nix
../common/optional/gaming/steam.nix
../common/optional/desktop/japanese.nix
../common/optional/udisks.nix
../common/optional/fhs-compat.nix
../common/optional/stylix.nix
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
firefox.enablePlasmaBrowserIntegration = true;
segger-jlink.acceptLicense = true;
permittedInsecurePackages = [ "segger-jlink-qt4-796s" "dotnet-runtime-6.0.36" "dotnet-sdk-wrapped-6.0.428" "dotnet-sdk-6.0.428" ];
};
};
networking.hostName = "adalbert";
services.udev.packages = [ inputs.heliox-cli.packages.x86_64-linux.default pkgs.segger-jlink ];
environment.systemPackages = [ inputs.heliox-cli.packages.x86_64-linux.default ];
services.xserver.displayManager.gdm.enable = true;
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"riscv64-linux"
];
programs = {
adb.enable = true;
dconf.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
};
# Personalausweis reader
ausweisapp = {
enable = true;
openFirewall = true; # also sets firewall entry
};
};
hardware = {
graphics.enable = true;
opentabletdriver.enable = true;
nvidia = {
open = false;
powerManagement.enable = true;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
}

View file

@ -1,32 +0,0 @@
# This file (and the global directory) holds config that i use on all hosts
{
inputs,
outputs,
...
}: {
imports =
[
inputs.home-manager.nixosModules.home-manager
./user.nix
./fish.nix
./locale.nix
./nix.nix
./power-button.nix
./documentation.nix
]
++ (builtins.attrValues outputs.nixosModules);
home-manager.extraSpecialArgs = {inherit inputs outputs;};
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
};
};
# Enable networking
networking.networkmanager.enable = true;
boot.supportedFilesystems = ["ntfs"];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [man-pages man-pages-posix];
documentation.dev.enable = true;
documentation.man = {
# In order to enable to mandoc man-db has to be disabled.
man-db.enable = false;
mandoc.enable = true;
};
}

View file

@ -1,17 +0,0 @@
{
inputs,
pkgs,
...
}: {
programs.fish = {
enable = true;
vendor = {
completions.enable = true;
config.enable = true;
functions.enable = true;
};
useBabelfish = true;
};
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [fish];
}

View file

@ -1,20 +0,0 @@
{lib, ...}: {
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
console.keyMap = "de";
services.xserver.xkb.layout = "de";
}

View file

@ -1,28 +0,0 @@
{
inputs,
lib,
...
}: {
nix = {
settings = {
auto-optimise-store = lib.mkDefault true;
experimental-features = ["nix-command" "flakes"];
warn-dirty = false;
system-features = ["kvm" "big-parallel" "nixos-test"];
};
gc = {
automatic = true;
dates = "weekly";
# Keep the last 3 generations
options = "--delete-older-than +3";
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# Add nixpkgs input to NIX_PATH
# This lets nix2 commands still use <nixpkgs>
nixPath = ["nixpkgs=${inputs.nixpkgs.outPath}"];
};
}

View file

@ -1,10 +0,0 @@
{config, ...}: let
dockerEnabled = config.virtualisation.docker.enable;
in {
virtualisation.podman = {
enable = true;
dockerCompat = !dockerEnabled;
dockerSocket.enable = !dockerEnabled;
defaultNetwork.settings.dns_enabled = true;
};
}

View file

@ -1,10 +0,0 @@
{
inputs,
lib,
...
}: {
services.logind.extraConfig = ''
# don't shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
}

View file

@ -1,45 +0,0 @@
{
inputs,
outputs,
pkgs,
config,
vars,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.users.${vars.user} = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups =
[
"wheel"
"video"
"audio"
"camera"
]
++ ifTheyExist [
"minecraft"
"network"
"networkmanager"
"wireshark"
"i2c"
"mysql"
"docker"
"podman"
"git"
"libvirtd"
"deluge"
"lp"
"scanner"
"kvm"
"libvirtd"
"tty"
"dialout"
];
packages = [pkgs.home-manager];
};
home-manager.users.${vars.user} = import ../../../home/${config.networking.hostName}.nix;
}

View file

@ -1,5 +0,0 @@
{vars, ...}: let
in {
programs.adb.enable = true;
users.users.${vars.user}.extraGroups = ["adbusers"];
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./global.nix ./x11.nix];
services = {
xserver = {
# dpi = 180;
windowManager.awesome.enable = true;
};
};
}

View file

@ -1,14 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
# Enable Flatpak
services.flatpak.enable = true;
# Create folder where all fonts are linked to /run/current-system/sw/share/X11/fonts
fonts.fontDir.enable = true;
xdg.portal.enable = true;
}

View file

@ -1,16 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xremap.nix];
# Enable for GTK
programs.dconf.enable = true;
# Fix for qt6 plugins
environment.profileRelativeSessionVariables = {
QT_PLUGIN_PATH = ["/lib/qt-6/plugins"];
};
}

View file

@ -1,47 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./global.nix ./x11.nix ./wayland.nix];
services = {
libinput.enable = true;
xserver = {
desktopManager.gnome = {
enable = true;
};
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
};
udev.packages = with pkgs; [
gnome-settings-daemon
];
};
environment = {
systemPackages = with pkgs; [
# System-Wide Packages
adwaita-icon-theme
dconf-editor
gnome-tweaks
gnomeExtensions.kimpanel
gnomeExtensions.vitals
gnomeExtensions.tray-icons-reloaded
];
gnome.excludePackages = with pkgs; [
gnome-tour
gedit
atomix
epiphany
geary
gnome-characters
gnome-contacts
gnome-initial-setup
hitori
iagno
tali
];
};
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }: {
imports = [ ./global.nix ./x11.nix ./wayland.nix ];
programs.hyprland.enable = true;
security.pam.services.hyprlock = { }; # Enable Hyprlock PAM support
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
}

View file

@ -1,14 +0,0 @@
{pkgs, ...}: {
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
fcitx5.waylandFrontend = true;
};
fonts.packages = with pkgs; [
noto-fonts-cjk-sans
];
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [pavucontrol pulseaudio qpwgraph];
}

View file

@ -1,15 +0,0 @@
{pkgs, ...}: {
imports = [./global.nix ./x11.nix];
services.xserver.desktopManager.plasma5.enable = true;
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
elisa
gwenview
okular
oxygen
khelpcenter
konsole
plasma-browser-integration
print-manager
];
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
# Hint electron apps to use wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
xwaylandvideobridge
libsForQt5.qt5.qtwayland
qt6.qtwayland
];
}

View file

@ -1,29 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
services = {
libinput.enable = true; # Enable touchpad support
libinput.touchpad.naturalScrolling = true;
# Enable the X11 windowing system.
xserver = {
enable = true;
# Remove xterm terminal
excludePackages = with pkgs; [xterm];
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
};
};
# Install installation
environment = {
systemPackages = with pkgs; [
# X11
xorg.xkbutils
xorg.xkill
];
};
}

View file

@ -1,14 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
configPackages = with pkgs; [gnome.gnome-session];
};
}

View file

@ -1,67 +0,0 @@
{
pkgs,
inputs,
lib,
...
}: {
imports = [
inputs.xremap.nixosModules.default
];
hardware.uinput.enable = true;
users.groups.uinput.members = ["ghoscht"];
users.groups.input.members = ["ghoscht"];
systemd.user.services.set-xhost = {
description = "Run a one-shot command upon user login";
path = [pkgs.xorg.xhost];
wantedBy = ["default.target"];
script = "xhost +SI:localuser:root";
environment.DISPLAY = ":0"; # NOTE: This is hardcoded for this flake
};
services.xremap = {
withX11 = true;
watch = true;
debug = false;
userName = "ghoscht";
serviceMode = "user";
config = {
keymap = [
{
name = "Global";
remap = {
"CapsLock" = "Esc";
"Esc" = "CapsLock";
super-x = {
launch = ["${lib.getExe pkgs.wezterm}"];
};
# super-space = {
# launch = ["${lib.getExe pkgs.rofi}" "-i" "-show" "drun" "-show-icons"];
# };
# super-control-l = {
# launch = ["${lib.getExe pkgs.firefox}"];
# };
# super-control-shift-l = {
# launch = ["${lib.getExe pkgs.firefox}" "--private-window"];
# };
};
}
{
name = "Music";
remap = {
"KEY_PLAYPAUSE" = {
launch = ["${lib.getExe pkgs.playerctl}" "play-pause"];
};
"KEY_NEXTSONG" = {
launch = ["${lib.getExe pkgs.playerctl}" "next"];
};
"KEY_PREVIOUSSONG" = {
launch = ["${lib.getExe pkgs.playerctl}" "previous"];
};
};
}
];
};
};
}

View file

@ -1,13 +0,0 @@
{
virtualisation.docker = {
enable = true;
daemon.settings = {
"default-address-pools" = [
{
"base" = "172.29.0.0/16";
"size" = 24;
}
];
};
};
}

View file

@ -1,7 +0,0 @@
{config, ...}: let
hostname = config.networking.hostName;
in {
boot.initrd = {
luks.devices."${hostname}".device = "/dev/disk/by-label/${hostname}_crypt";
};
}

View file

@ -1,69 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
services.envfs.enable = lib.mkDefault true;
programs.nix-ld.enable = lib.mkDefault true;
programs.nix-ld.libraries = with pkgs;
[
acl
attr
bzip2
dbus
expat
fontconfig
freetype
fuse3
icu
libnotify
libsodium
libssh
libunwind
libusb1
libuuid
nspr
nss
stdenv.cc.cc
util-linux
zlib
zstd
]
++ lib.optionals (config.hardware.graphics.enable) [
pipewire
cups
libxkbcommon
pango
mesa
libdrm
libglvnd
libpulseaudio
atk
cairo
alsa-lib
at-spi2-atk
at-spi2-core
gdk-pixbuf
glib
gtk3
libGL
libappindicator-gtk3
vulkan-loader
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxcb
xorg.libxkbfile
xorg.libxshmfence
];
}

View file

@ -1,3 +0,0 @@
{
programs.gamemode.enable = true;
}

View file

@ -1,17 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
programs = {
steam = {
enable = true;
};
};
xdg.mime = {
defaultApplications."x-scheme-handler/steam" = "steam.desktop";
addedAssociations."x-scheme-handler/steam" = "steam.desktop";
};
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }: {
programs.kdeconnect.enable = true;
# Create system services for KDE connect
systemd.user.services.kdeconnect = {
description = "Adds communication between your desktop and your smartphone";
after = [ "graphical-session-pre.target" ];
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.plasma5Packages.kdeconnect-kde}/libexec/kdeconnectd";
Restart = "on-abort";
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
services = {
# Printer Setup
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
nssmdns6 = true;
# for a WiFi printer
openFirewall = true;
};
udev.packages = [pkgs.utsushi];
};
# Scanner Setup
hardware.sane = {
enable = true;
extraBackends = [pkgs.utsushi];
};
}

View file

@ -1,12 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
services.hardware.openrgb = {
enable = true;
package = pkgs.openrgb-with-all-plugins;
motherboard = lib.mkDefault config.variables.machine.motherboard;
};
}

View file

@ -1,36 +0,0 @@
{
inputs,
pkgs,
...
}: {
imports = [inputs.stylix.nixosModules.stylix];
stylix = {
enable = true;
polarity = "dark";
image = ../../../rsc/wallpaper/rolltreppe-gluehwein.jpg;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
opacity.terminal = 0.83;
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 25;
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
};
};
}

View file

@ -1,10 +0,0 @@
{
boot.loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
configurationLimit = 42;
};
efi.canTouchEfiVariables = true;
};
}

View file

@ -1,6 +0,0 @@
{
imports = [../global/tailscale.nix];
services.tailscale = {
useRoutingFeatures = "both";
};
}

View file

@ -1,10 +0,0 @@
{lib, ...}: {
services.tailscale = {
enable = true;
useRoutingFeatures = lib.mkDefault "client";
};
networking.firewall = {
checkReversePath = "loose";
allowedUDPPorts = [41641]; # Facilitate firewall punching
};
}

View file

@ -1,3 +0,0 @@
{
services.udisks2.enable = true;
}

View file

@ -1,7 +0,0 @@
{
services.vsftpd = {
enable = true;
writeEnable = true;
localUsers = true;
};
}

Some files were not shown because too many files have changed in this diff Show more