2026-01-29

This commit is contained in:
Weckyy702
2026-01-29 14:19:33 +01:00
parent 6485cb234f
commit 6deaef9abf
9 changed files with 180 additions and 119 deletions

View File

@@ -1,17 +1,17 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
inputs,
hostname,
username,
...
{ config
, pkgs
, inputs
, hostname
, username
, ...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.catppuccin.nixosModules.catppuccin
];
## Boot
@@ -70,11 +70,13 @@
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
jetbrains-mono
nerd-fonts.jetbrains-mono
];
fontDir.enable = true;
};
catppuccin.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
@@ -89,6 +91,9 @@
protontricks = {
enable = true;
};
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = true;
};
# Some programs need SUID wrappers, can be configured further or are
@@ -105,7 +110,7 @@
users.users.${username} = {
isNormalUser = true;
extraGroups = ["networkmanager" "wheel"];
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh;
};
@@ -125,7 +130,9 @@
};
# required for zsh completion
environment.pathsToLink = ["/share/zsh"];
environment.pathsToLink = [ "/share/zsh" ];
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# List services that you want to enable:
@@ -135,6 +142,11 @@
};
services.mullvad-vpn.enable = true;
services.pipewire = {
alsa.enable = true;
enable = true;
wireplumber.enable = true;
};
networking.firewall.enable = false;

View File

@@ -17,35 +17,37 @@
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
home-manager,
nixvim,
...
} @ inputs: {
nixosConfigurations.keith = let
hostname = "keith";
username = "weckyy702";
specialArgs = {
inherit inputs;
inherit hostname;
inherit username;
};
in
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
outputs =
{ self
, nixpkgs
, home-manager
, catppuccin
, nixvim
, ...
} @ inputs: {
nixosConfigurations.keith =
let
hostname = "keith";
username = "weckyy702";
specialArgs = {
inherit inputs;
inherit hostname;
inherit username;
};
in
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home/home.nix;
}
];
};
};
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home/home.nix;
}
];
};
};
}

View File

@@ -1,9 +1,8 @@
top @ {
config,
pkgs,
username,
inputs,
...
top @ { config
, pkgs
, username
, inputs
, ...
}: {
imports = [
inputs.nixvim.homeModules.nixvim
@@ -20,15 +19,19 @@ top @ {
home.packages = with pkgs; [
mpv
bitwarden-desktop
feh
grim
slurp
xdg-user-dirs
hyprpicker
libqalculate
btop
xfce.thunar
prismlauncher
playerctl
signal-desktop
qbittorrent
unzip
];
catppuccin.enable = true;
@@ -44,7 +47,7 @@ top @ {
settings = (import ./hyprland/settings.nix) top;
};
#TODO: decide on waybar
programs.zathura.enable = true;
programs.direnv = {
enable = true;
@@ -60,28 +63,38 @@ top @ {
];
};
programs.spicetify = let
spkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
enable = true;
enabledExtensions = with spkgs.extensions; [
fullAppDisplay
shuffle
aiBandBlocker
];
enabledCustomApps = with spkgs.apps; [
newReleases
];
theme = spkgs.themes.catppuccin;
colorScheme = "mocha";
};
programs.spicetify =
let
spkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
enable = true;
enabledExtensions = with spkgs.extensions; [
fullAppDisplay
shuffle
aiBandBlocker
];
enabledCustomApps = with spkgs.apps; [
newReleases
];
theme = spkgs.themes.catppuccin;
colorScheme = "mocha";
};
programs.vesktop = {
enable = true;
vencord.useSystem = true;
};
programs.vesktop.enable = true;
programs.wofi.enable = true;
programs.rofi = {
enable = true;
modes = [
"combi"
"drun"
"calc"
"ssh"
];
plugins = [
pkgs.rofi-calc
];
};
programs.zsh = {
enable = true;
# For automatic login
@@ -153,19 +166,23 @@ top @ {
services.hyprpaper = {
enable = true;
settings = let
# TODO: this should be done more cleanly
wallpaper_path = ./hyprland/horizontal_16x9.png;
in {
preload = toString wallpaper_path;
wallpaper = [
#TODO: this should be dynamic
"DP-1,${wallpaper_path}"
"HDMI-A-1,${wallpaper_path}"
];
};
settings =
let
# TODO: this should be done more cleanly
wallpaper_path = ./hyprland/horizontal_16x9.png;
in
{
preload = "${wallpaper_path}";
wallpaper = [
#TODO: this should be dynamic
"DP-1,${wallpaper_path}"
"HDMI-A-1,${wallpaper_path}"
];
};
};
services.dunst.enable = true;
services.hyprpolkitagent.enable = true;
services.ssh-agent = {

View File

@@ -1,4 +1,4 @@
{...}: {
{ ... }: {
"$mod" = "SUPER";
"$browser" = "zen";
"$term" = "kitty";
@@ -12,8 +12,7 @@
resize_on_border = true;
};
snap = {
};
snap = { };
input = {
kb_layout = "de";
@@ -24,7 +23,7 @@
[
"$mod, Q, exit"
"$mod, Return, exec, $term"
"$mod, D, exec, wofi --show drun"
"$mod, D, exec, rofi -show drun -modes drun,calc"
"$mod, F2, exec, $browser"
"$mod, c, killactive"
"$mod, f, fullscreen"
@@ -41,8 +40,8 @@
]
++
# Switch workspaces
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9])
++ (map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9]);
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [ 1 2 3 4 5 6 7 8 9 ])
++ (map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [ 1 2 3 4 5 6 7 8 9 ]);
bindm = [
"$mod, mouse:272, movewindow"

View File

@@ -1,4 +1,4 @@
{...}: {
{ ... }: {
programs.nixvim.globals.mapleader = " ";
programs.nixvim.keymaps = [

View File

@@ -1,40 +1,42 @@
{...}: {
imports = [
./keymaps.nix
];
programs.nixvim.plugins = {
lspkind.enable = true;
blink-cmp.enable = true;
cmp-nvim-lsp-signature-help.enable = true;
# cmp-nvim-lsp-signature-help.enable = true;
#
# cmp = {
# enable = true;
# autoEnableSources = true;
# autoLoad = true;
#
# settings.sources = [
# { name = "nvim_lsp"; }
# { name = "nvim_lsp_signature_help"; }
# { name = "path"; }
# ];
#
# settings.mapping = {
# "<Tab>" = "cmp.mapping.select_next_item()";
# "<S-Tab>" = "cmp.mapping.select_prev_item()";
# "<C-Space>" = "cmp.mapping.complete()";
# "<C-S-Space>" = "cmp.mapping.close()";
# "<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
# };
# };
#
# lsp-format.enable = true;
#
# none-ls = {
# enable = true;
# enableLspFormat = true;
# sources.formatting = {
# alejandra.enable = true;
# nixpkgs_fmt.enable = true;
# };
# };
cmp = {
enable = true;
autoEnableSources = true;
autoLoad = true;
settings.sources = [
{name = "nvim_lsp";}
{name = "nvim_lsp_signature_help";}
{name = "path";}
];
settings.mapping = {
"<Tab>" = "cmp.mapping.select_next_item()";
"<S-Tab>" = "cmp.mapping.select_prev_item()";
"<C-Space>" = "cmp.mapping.complete()";
"<C-S-Space>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
};
};
lsp-format.enable = true;
none-ls = {
enable = true;
enableLspFormat = true;
sources.formatting = {
alejandra.enable = true;
nixpkgs_fmt.enable = true;
};
};
};
}

View File

@@ -0,0 +1,16 @@
{...}: {
programs.nixvim.keymaps = [
{
key = "grd";
action = "<cmd>Telescope lsp_definitions<CR>";
mode = "n";
options.desc = "LSP: [G]oto [D]efinition";
}
{
key = "gri";
action = "<cmd>Telescope lsp_implementations<CR>";
mode = "n";
options.desc = "LSP: [G]oto [I]mplementations";
}
];
}

View File

@@ -22,6 +22,14 @@
};
rnix.enable = true;
};
keymaps = [
{
key = "<leader>e";
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
options.desc = "Open Diagnostics";
}
];
};
plugins.lspconfig.enable = true;

View File

@@ -15,5 +15,10 @@
action = "<cmd>Telescope grep_string<CR>";
options.desc = "[S]earch current [W]ord";
}
{
key = "<leader>q";
action = "<cmd>Telescope diagnostics<CR>";
options.desc = "Lsp Diagnostics";
}
];
}