Compare commits
10 Commits
0524def0ad
...
63afa59e34
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63afa59e34 | ||
|
|
9ea1f7801f | ||
|
|
88a3f7d822 | ||
|
|
74b2f1e653 | ||
|
|
6deaef9abf | ||
|
|
6485cb234f | ||
|
|
3defad84fb | ||
|
|
156bd44710 | ||
|
|
a561aa45e9 | ||
|
|
7fd9d83ce1 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
||||
configuration.nix
|
||||
secrets/
|
||||
|
||||
208
configuration.nix
Normal file
208
configuration.nix
Normal file
@@ -0,0 +1,208 @@
|
||||
# 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
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
|
||||
## Boot
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/nvme0n1";
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
## Network
|
||||
networking.hostName = hostname;
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
## Time/Language
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.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";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
## Nix
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
## Global packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
git
|
||||
cifs-utils # required for network mounting the NAS
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
age
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
catppuccin.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extraCompatPackages = [
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
protontricks = {
|
||||
enable = true;
|
||||
};
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
## User config
|
||||
# enable auto-login
|
||||
services.getty.autologinUser = username;
|
||||
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
## NAS Mount
|
||||
|
||||
fileSystems."/mnt/nas" = {
|
||||
device = "//duke.veltnet/smb-share";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"user,users"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
"credentials=/etc/nixos/secrets/nas-share.creds"
|
||||
];
|
||||
};
|
||||
|
||||
# required for zsh completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
#TODO: move kanata config to module
|
||||
keyboards.remap-specials = {
|
||||
config = ''
|
||||
(deflocalkeys-linux
|
||||
ö 39
|
||||
)
|
||||
|
||||
(defsrc
|
||||
a s d j k l ö
|
||||
)
|
||||
|
||||
(defvar
|
||||
tap-time 200
|
||||
hold-time 200
|
||||
)
|
||||
|
||||
(defalias
|
||||
a (tap-hold $tap-time $hold-time a lmet)
|
||||
s (tap-hold $tap-time $hold-time s lctl)
|
||||
d (tap-hold $tap-time $hold-time d lsft)
|
||||
k (tap-hold $tap-time $hold-time k rsft)
|
||||
l (tap-hold $tap-time $hold-time l rctl)
|
||||
ö (tap-hold $tap-time $hold-time ö ralt)
|
||||
|
||||
activate (tap-dance $tap-time (j _ _ (layer-switch home-mods)))
|
||||
deactivate (tap-dance $tap-time (j _ _ (layer-switch base)))
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
a s d @activate k l ö
|
||||
)
|
||||
|
||||
(deflayer home-mods
|
||||
@a @s @d @deactivate @k @l @ö
|
||||
)
|
||||
'';
|
||||
extraDefCfg = ''
|
||||
process-unmapped-keys yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
services.pipewire = {
|
||||
alsa.enable = true;
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
227
flake.lock
generated
227
flake.lock
generated
@@ -1,5 +1,65 @@
|
||||
{
|
||||
"nodes": {
|
||||
"catppuccin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768256610,
|
||||
"narHash": "sha256-IyL6nZo242nDLoLQVwkqAZXp8FO5kBfjL6Fuh+gZO10=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "0734ad8c91342df34f1a1e5c183d053d70ba87c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"ref": "release-25.11",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765835352,
|
||||
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -21,6 +81,34 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754860581,
|
||||
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.1.1",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1768028080,
|
||||
@@ -37,10 +125,147 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767448089,
|
||||
"narHash": "sha256-U1fHsZBnFrUil731NHD9Sg5HoiG+eSHau8OFuClhwW0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "983751b66f255bbea1adc185364e9e7b73f82358",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761730856,
|
||||
"narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin": "catppuccin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"spicetify-nix": "spicetify-nix",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"spicetify-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769316930,
|
||||
"narHash": "sha256-4EOGHYLpIscwr+6drHE28Qj7NDjjowp2Vd8QkXjdBBE=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "b2ce438f386943ef611e196a178af2d79042903b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767618227,
|
||||
"narHash": "sha256-9+XVF47E9NCVs249SSsDtr7YdG/23/lCJmWAjQvOfqI=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "1586e49b3908b058e221f11d843eb46392dba17b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
64
flake.nix
64
flake.nix
@@ -5,29 +5,49 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
#TODO: nixvim, etc
|
||||
nixvim.url = "github:nix-community/nixvim/nixos-25.11";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
catppuccin.url = "github:catppuccin/nix/release-25.11";
|
||||
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
||||
nixosConfigurations.keith =
|
||||
let
|
||||
hostname = "keith";
|
||||
username = "weckyy702";
|
||||
specialArgs = { inherit inputs; inherit hostname; inherit username; };
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/keith
|
||||
./users/${username}/nixos.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 ./users/${username}/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
home-manager.users.${username} = import ./home/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
65
hardware-configuration.nix
Normal file
65
hardware-configuration.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home/${username}/Documents" = {
|
||||
device = "/dev/disk/by-uuid/2d6f2255-eca4-489b-9f0f-6c455cd394fc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
#TODO: add external hdd, nas, and ssd
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7";}
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = [pkgs.rocmPackages.clr.icd];
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles.profiles = {
|
||||
p2p-nas = {
|
||||
connection = {
|
||||
id = "p2p-nas";
|
||||
type = "ethernet";
|
||||
interface-name = "enp1s0";
|
||||
autoconnect = true;
|
||||
};
|
||||
ipv6 = {
|
||||
method = "manual";
|
||||
addresses = "fd00:fa57::1/64";
|
||||
};
|
||||
ipv4.method = "disabled";
|
||||
ethernet.mtu = 9000;
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.extraHosts = ''
|
||||
fd00:fa57::2 duke.veltnet
|
||||
'';
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{username, ...}: {
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
|
||||
stateVersion = "25.11";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import "${home-manager}/nixos")
|
||||
./zsh
|
||||
./hyprland
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.weckyy702 = {
|
||||
isNormalUser = true;
|
||||
description = "Weckyy702";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager.users.weckyy702 = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
bitwarden-desktop
|
||||
];
|
||||
#NOTE: MUST be kept in sync with the channel above!
|
||||
home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{ config, pkgs, ...}: {
|
||||
## System wide configuration
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
useTextGreeter = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libnotify
|
||||
dunst
|
||||
];
|
||||
|
||||
# Required to use hyprlock
|
||||
security.pam.services.hyprlock = {};
|
||||
# Configure electron apps to use wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
## Home-Manager specific configuration
|
||||
home-manager.users.weckyy702 = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = import ./settings.nix;
|
||||
xwayland.enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
};
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
};
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
};
|
||||
services.hyprsunset.enable = true;
|
||||
services.hyprpolkitagent.enable = true;
|
||||
services.hypridle.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"$mod" = "SUPER";
|
||||
general = {
|
||||
border_size = 0;
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
layout = "dwindle";
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
snap = {
|
||||
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
};
|
||||
|
||||
bind = builtins.concatLists [
|
||||
[
|
||||
"$mod, Q, exit"
|
||||
"$mod, Return, exec, kitty"
|
||||
"$mod, D, exec, wofi --show drun"
|
||||
"$mod, F2, exec, firefox"
|
||||
"$mod, c, killactive"
|
||||
"$mod, f, fullscreen"
|
||||
]
|
||||
# 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}, movetoworkspace, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9])
|
||||
];
|
||||
|
||||
decoration = {
|
||||
shadow.enabled = false;
|
||||
blur.enabled = true;
|
||||
};
|
||||
|
||||
misc.disable_hyprland_logo = true;
|
||||
|
||||
cursor.inactive_timeout = 5;
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
ecosystem.no_donation_nag = true;
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{ config, pkgs, lib, ...}: {
|
||||
|
||||
# Required for zsh autocompletion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users.weckyy702 = { pkgs, ... }: {
|
||||
home.shell.enableZshIntegration = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
package = pkgs.zsh;
|
||||
|
||||
enableCompletion = true;
|
||||
autocd = true;
|
||||
autosuggestion.enable = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = ./.;
|
||||
file="p10k.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
||||
file="powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
];
|
||||
};
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [
|
||||
"brackets"
|
||||
];
|
||||
};
|
||||
|
||||
initContent = lib.mkBefore ''
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
#TODO
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
home/borgmatic.nix
Normal file
63
home/borgmatic.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{ hostname
|
||||
, username
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
libnotify
|
||||
];
|
||||
|
||||
programs.borgmatic = {
|
||||
enable = true;
|
||||
package = pkgs.borgmatic;
|
||||
|
||||
backups.default = {
|
||||
location = {
|
||||
repositories = [
|
||||
{
|
||||
label = "duke";
|
||||
path = "ssh://borg@duke.veltnet:2222/home/borg/backups/${hostname}-${username}";
|
||||
}
|
||||
];
|
||||
excludeHomeManagerSymlinks = true;
|
||||
patterns = [
|
||||
#TODO: home.homeDirectory might be usable here
|
||||
"R /home/${username}/Documents"
|
||||
"R /home/${username}/.ssh"
|
||||
"- /home/${username}/Documents/SteamLibrary"
|
||||
"- /home/${username}/Documents/PrismLauncher instances"
|
||||
"- /home/${username}/Documents/.Trash-1000"
|
||||
"- /home/${username}/Documents/VMs/Data"
|
||||
"- **/node_modules"
|
||||
"- **/.git"
|
||||
"- **/.cache"
|
||||
"- **/*build"
|
||||
"- **/target"
|
||||
"- **/.venv"
|
||||
"- **/venv"
|
||||
"- **/.gradle"
|
||||
"- **/out"
|
||||
"- **/dist"
|
||||
"- **/.pio"
|
||||
];
|
||||
};
|
||||
retention.keepWeekly = 2;
|
||||
storage.extraConfig.ssh_command = "ssh -i /home/${username}/.ssh/id_ed25519_borg";
|
||||
#FIXME: consistency checks!!!
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.borgmatic = {
|
||||
Unit.Description = "Create a backup using borgmatic";
|
||||
Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats";
|
||||
};
|
||||
|
||||
systemd.user.timers.borgmatic = {
|
||||
Unit.Description = "Create weekly backups using borgmatic";
|
||||
Timer = {
|
||||
OnCalendar = "Weekly";
|
||||
Persistent = true;
|
||||
};
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
};
|
||||
}
|
||||
221
home/home.nix
Normal file
221
home/home.nix
Normal file
@@ -0,0 +1,221 @@
|
||||
top @ { config
|
||||
, pkgs
|
||||
, username
|
||||
, inputs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
./nixvim
|
||||
./borgmatic.nix
|
||||
];
|
||||
|
||||
#NOTE: MUST be kept up to date with nixpkgs!
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
mpv
|
||||
feh
|
||||
grim
|
||||
slurp
|
||||
xdg-user-dirs
|
||||
hyprpicker
|
||||
libqalculate
|
||||
btop
|
||||
xfce.thunar
|
||||
prismlauncher
|
||||
playerctl
|
||||
signal-desktop
|
||||
qbittorrent
|
||||
unzip
|
||||
file
|
||||
gnucash
|
||||
];
|
||||
|
||||
home.pointerCursor =
|
||||
let
|
||||
size = 24;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-cursors.mochaMauve;
|
||||
name = "catppuccin-mocha-mauve-cursors";
|
||||
inherit size;
|
||||
|
||||
dotIcons.enable = true;
|
||||
gtk.enable = true;
|
||||
hyprcursor.enable = true;
|
||||
hyprcursor.size = size;
|
||||
};
|
||||
|
||||
catppuccin.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
colorScheme = "dark";
|
||||
font.name = "JetBrainsMono";
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "kvantum";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = (import ./hyprland/settings.nix) top;
|
||||
};
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default.isDefault = true;
|
||||
};
|
||||
|
||||
programs.zathura.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
modes = [
|
||||
"combi"
|
||||
"drun"
|
||||
"calc"
|
||||
"ssh"
|
||||
];
|
||||
plugins = [
|
||||
pkgs.rofi-calc
|
||||
];
|
||||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# For automatic login
|
||||
profileExtra = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||
exec hyprland
|
||||
fi
|
||||
'';
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
date
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "p10k-config";
|
||||
src = ./p10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 10;
|
||||
};
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
#TODO: kitty config
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user = {
|
||||
email = "weckyy702@gmail.com";
|
||||
name = "Weckyy702";
|
||||
};
|
||||
#TODO: signing
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
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 = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
BIN
home/hyprland/horizontal_16x9.png
Normal file
BIN
home/hyprland/horizontal_16x9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 MiB |
85
home/hyprland/settings.nix
Normal file
85
home/hyprland/settings.nix
Normal file
@@ -0,0 +1,85 @@
|
||||
{ ... }: {
|
||||
"$mod" = "SUPER";
|
||||
"$browser" = "zen";
|
||||
"$term" = "kitty";
|
||||
|
||||
general = {
|
||||
border_size = 2;
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
snap = { };
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor catppuccin-mocha-mauve-cursors 24"
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"$mod, Q, exit"
|
||||
"$mod, Return, exec, $term"
|
||||
"$mod, D, exec, rofi -show drun -modes drun,calc"
|
||||
"$mod, F2, exec, $browser"
|
||||
"$mod, c, killactive"
|
||||
"$mod, f, fullscreen"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod+SHIFT, h, movewindow, l"
|
||||
"$mod+SHIFT, j, movewindow, d"
|
||||
"$mod+SHIFT, k, movewindow, u"
|
||||
"$mod+SHIFT, l, movewindow, r"
|
||||
", Print, exec, grim -g \"$(slurp)\" \"/home/weckyy702/Pictures/screenshots/$(date -Iseconds).png\""
|
||||
"$mod+SHIFT, s, exec, hyprlock"
|
||||
]
|
||||
++
|
||||
# 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 ]);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl position 5+"
|
||||
", XF86AudioPrev, exec, playerctl position 5-"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
bindo = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
shadow.enabled = false;
|
||||
blur.enabled = true;
|
||||
active_opacity = 0.8;
|
||||
inactive_opacity = 0.8;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc.disable_hyprland_logo = true;
|
||||
|
||||
cursor.inactive_timeout = 3;
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
ecosystem.no_donation_nag = true;
|
||||
}
|
||||
23
home/nixvim/default.nix
Normal file
23
home/nixvim/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
./options.nix
|
||||
./plugins
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
clipboard.register = "unnamedplus";
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.flavour = "mocha";
|
||||
settings.integrations = {
|
||||
gitsigns = true;
|
||||
treesitter = true;
|
||||
cmp = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
home/nixvim/keymaps.nix
Normal file
25
home/nixvim/keymaps.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ ... }: {
|
||||
programs.nixvim.globals.mapleader = " ";
|
||||
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
key = "<esc>";
|
||||
action = ":noh<CR>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Clear search highlight";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "j";
|
||||
action = "gj";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
key = "k";
|
||||
action = "gk";
|
||||
mode = "n";
|
||||
}
|
||||
];
|
||||
}
|
||||
50
home/nixvim/options.nix
Normal file
50
home/nixvim/options.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{...}: {
|
||||
programs.nixvim.opts = {
|
||||
# Expand tabs to 4 spaces
|
||||
shiftwidth = 4;
|
||||
softtabstop = 4;
|
||||
expandtab = true;
|
||||
|
||||
signcolumn = "yes:3";
|
||||
|
||||
# automatically indent and try to be smart about it
|
||||
autoindent = true;
|
||||
smartindent = true;
|
||||
|
||||
# Relative line numbers
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
# See search result as you type
|
||||
inccommand = "split";
|
||||
|
||||
# Visualize whitespace
|
||||
list = true;
|
||||
listchars = {
|
||||
tab = "» ";
|
||||
trail = "·";
|
||||
nbsp = "␣";
|
||||
};
|
||||
|
||||
# Show which line the cursor is on
|
||||
cursorline = true;
|
||||
|
||||
# Keep the cursor somewhat centered on the screen
|
||||
scrolloff = 25;
|
||||
|
||||
# Ask if operations would fail due to unsaved buffers
|
||||
confirm = true;
|
||||
|
||||
# ignore case in search unless multiple capital case letter have been typed
|
||||
smartcase = true;
|
||||
ignorecase = true;
|
||||
|
||||
completeopt = "menu,menuone,noselect";
|
||||
|
||||
# Persistent undos :)
|
||||
undofile = true;
|
||||
|
||||
# enable resize by mouse
|
||||
mouse = "n";
|
||||
};
|
||||
}
|
||||
42
home/nixvim/plugins/cmp/default.nix
Normal file
42
home/nixvim/plugins/cmp/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
];
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
lspkind.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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
home/nixvim/plugins/cmp/keymaps.nix
Normal file
16
home/nixvim/plugins/cmp/keymaps.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
}
|
||||
25
home/nixvim/plugins/default.nix
Normal file
25
home/nixvim/plugins/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./telescope
|
||||
./cmp
|
||||
];
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
lualine.enable = true;
|
||||
|
||||
web-devicons.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
folding = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
|
||||
gitsigns.enable = true;
|
||||
|
||||
which-key.enable = true;
|
||||
|
||||
glow.enable = true;
|
||||
};
|
||||
}
|
||||
38
home/nixvim/plugins/lsp.nix
Normal file
38
home/nixvim/plugins/lsp.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{...}: {
|
||||
programs.nixvim = {
|
||||
dependencies.rust-analyzer.enable = true;
|
||||
|
||||
lsp = {
|
||||
inlayHints.enable = true;
|
||||
servers = {
|
||||
"*" = {
|
||||
config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true;
|
||||
config.root_markers = [
|
||||
".git"
|
||||
];
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
config.root_markers = [
|
||||
"compile_commands.json"
|
||||
];
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
};
|
||||
rnix.enable = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>e";
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
||||
options.desc = "Open Diagnostics";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
plugins.lspconfig.enable = true;
|
||||
plugins.clangd-extensions.enable = true;
|
||||
};
|
||||
}
|
||||
20
home/nixvim/plugins/telescope/default.nix
Normal file
20
home/nixvim/plugins/telescope/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
];
|
||||
programs.nixvim.dependencies.ripgrep.enable = true;
|
||||
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
extensions.file-browser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_status = true;
|
||||
hijack_netrw = true;
|
||||
respect_gitignore = true;
|
||||
fzf-native.enable = true;
|
||||
fzf-native.settings.case_mode = "ignore_case";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
home/nixvim/plugins/telescope/keymaps.nix
Normal file
24
home/nixvim/plugins/telescope/keymaps.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{...}: {
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
key = "<leader>sf";
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
options.desc = "[S]earch [F]iles";
|
||||
}
|
||||
{
|
||||
key = "<leader>sg";
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
options.desc = "[S]earch by [G]rep";
|
||||
}
|
||||
{
|
||||
key = "<leader>sw";
|
||||
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";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
# Generated by Powerlevel10k configuration wizard on 2026-01-10 at 23:35 CET.
|
||||
# Generated by Powerlevel10k configuration wizard on 2026-01-14 at 01:09 CET.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh.
|
||||
# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 2 lines,
|
||||
# disconnected, no frame, compact, few icons, concise, transient_prompt,
|
||||
# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 24h time,
|
||||
# 2 lines, disconnected, no frame, compact, few icons, concise, transient_prompt,
|
||||
# instant_prompt=verbose.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
@@ -35,6 +35,7 @@
|
||||
# os_icon # os identifier
|
||||
dir # current directory
|
||||
vcs # git status
|
||||
command_execution_time # duration of the last command
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
prompt_char # prompt symbol
|
||||
@@ -47,7 +48,6 @@
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
# =========================[ Line #1 ]=========================
|
||||
status # exit code of the last command
|
||||
command_execution_time # duration of the last command
|
||||
background_jobs # presence of background jobs
|
||||
direnv # direnv status (https://direnv.net/)
|
||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||
@@ -106,7 +106,7 @@
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline
|
||||
# ip # ip address and bandwidth usage for a specified network interface
|
||||
@@ -1,88 +0,0 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/nvme0n1";
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = hostname; # Define your hostname.
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.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";
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
kitty
|
||||
];
|
||||
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
#TODO: add external hdd, nas, and ssd
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{pkgs, username, ...}: {
|
||||
|
||||
# enable auto-login
|
||||
#TODO: this should be optional
|
||||
services.getty.autologinUser = username;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
hyprpaper
|
||||
];
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{pkgs, username, ...}: {
|
||||
programs.zsh.enable = true;
|
||||
users.users.${username}.shell = pkgs.zsh;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
# home-manager config for weckyy702
|
||||
{ pkgs, ...}: {
|
||||
imports = [
|
||||
../../home-manager/core.nix
|
||||
|
||||
#TODO: user programs
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
# For autologin
|
||||
profileExtra = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1]; then
|
||||
exec uwsm start -S hyprland-uwsm.desktop
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git.settings = {
|
||||
name = "Weckyy702";
|
||||
email = "konstvelt@gmail.com";
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
../../nixos/zsh.nix
|
||||
../../nixos/hypr.nix
|
||||
];
|
||||
|
||||
users.users.weckyy702 = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user