BIG RESTRUCT

This commit is contained in:
cnst
2024-06-24 20:27:04 +02:00
parent 1b75dc88c4
commit c130053edf
323 changed files with 83677 additions and 38 deletions

50
home/cnst/home.nix Normal file
View File

@@ -0,0 +1,50 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
...
}:
{
# You can import other home-manager modules here
imports = [
../pkgs/cnst.nix
../modules
];
nixpkgs = {
# You can add overlays here
overlays = [ ];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
# TODO: Set your username
home = {
username = "cnst";
homeDirectory = "/home/cnst";
};
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1;
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.05";
}

141
home/home.nix Normal file
View File

@@ -0,0 +1,141 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
...
}:
{
# You can import other home-manager modules here
imports = [
./neovim
./git
./gtk
./shell
./firefox
];
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use 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 ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
# TODO: Set your username
home = {
username = "cnst";
homeDirectory = "/home/cnst";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
home.packages = with pkgs; [
# Desktop
alacritty
wl-clipboard
dunst
keepassxc
ranger
webcord
xfce.thunar
xfce.thunar-volman
xfce.thunar-archive-plugin
gnome.file-roller
swaybg
wireguard-tools
wpa_supplicant
ntfs3g
kdePackages.polkit-kde-agent-1
networkmanagerapplet
blueman
htop
btop
tofi
pamixer
virt-manager
qbittorrent
fastfetch
waybar
nwg-look
mullvad-vpn
thefuck
calcurse
gnome.adwaita-icon-theme
];
programs.steam.enable = true;
# Hyprland & accessories
# wayland.windowManager.hyprland.enable = true;
# programs.waybar.enable = true;
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
xwayland.enable = true;
extraConfig = ''
${builtins.readFile ./hypr/hyprland.conf}
'';
systemd.enable = true;
};
xdg = {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/desktop";
documents = "${config.home.homeDirectory}/documents";
download = "${config.home.homeDirectory}/downloads";
music = "${config.home.homeDirectory}/media/music";
pictures = "${config.home.homeDirectory}/media/images";
publicShare = "${config.home.homeDirectory}/documents/share";
templates = "${config.home.homeDirectory}/documents/templates";
videos = "${config.home.homeDirectory}/media/videos";
};
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config = {
common.default = [ "gtk" ];
hyprland.default = [
"gtk"
"hyprland"
];
};
};
};
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1;
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.05";
}

View File

@@ -0,0 +1,12 @@
{
programs.firefox = {
enable = true;
};
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

@@ -0,0 +1,7 @@
{
programs.git = {
enable = true;
userName = "cnst";
userEmail = "cnst@cana.st";
};
}

View File

@@ -0,0 +1,28 @@
{ pkgs, ... }:
{
home.pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
};
gtk = {
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.gruvbox-plus-icons;
name = "Gruvbox-Plus-Dark";
};
font = {
name = "FiraCode Nerd Font Light";
size = 11;
};
cursorTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
};
};
}

View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
xwayland.enable = true;
extraConfig = ''
${builtins.readFile ./hyprland.conf}
'';
systemd.enable = true;
};
}

View File

@@ -0,0 +1,7 @@
# HYPRLAND CONFIGURATION
source=./land/appearance.conf
source=./land/inputs.conf
source=./land/keybinds.conf
source=./land/rules.conf
source=./land/startup.conf

View File

@@ -0,0 +1,103 @@
{ pkgs, ... }:
with pkgs;
let
tools = [
fswatch # File watcher utility, replacing libuv.fs_event for neovim 10.0
fzf
git
sqlite
tree-sitter
];
c = [
clang
clang-tools
cmake
gcc
gnumake
];
gamedev = [
# parser, linter and formatter for GDScript
gdtoolkit_3
gdtoolkit_4
];
golang = [
delve # debugger
go
gofumpt
goimports-reviser
golines
gopls
gotools
];
lua = [
lua-language-server
stylua
];
markup = [
cbfmt # format codeblocks
codespell
markdownlint-cli
mdformat
typst-lsp
];
nix = [
alejandra
nixd
nixfmt-rfc-style
nixpkgs-fmt
statix
];
python = [
black
isort
python311Packages.jedi-language-server
ruff
ruff-lsp
];
rust = [
cargo
rustfmt
rust-analyzer
];
shell = [
nodePackages.bash-language-server
shellcheck
shfmt
];
web = [
deno
nodePackages.sql-formatter
nodePackages.typescript-language-server
nodejs
prettierd # multi-language formatters
vscode-langservers-extracted
yarn
];
extraPackages =
tools ++ c ++ gamedev ++ golang ++ lua ++ markup ++ nix ++ python ++ rust ++ shell ++ web;
in
{
# for quick development
home.packages = rust;
programs.neovim = {
enable = true;
defaultEditor = true;
package = pkgs.neovim-unwrapped;
plugins = with pkgs.vimPlugins; [ telescope-cheat-nvim ];
inherit extraPackages;
};
}

View File

@@ -0,0 +1,45 @@
{ config, ... }:
{
programs.starship = {
enable = true;
settings = {
add_newline = false;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
};
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
nixconfig = "cd /home/cnst/.nix-config/";
ll = "ls -l";
nixupdate = "sudo nixos-rebuild switch --flake .#cnix";
flakeupdate = "nix flake update";
};
history = {
size = 1000;
path = "${config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
"thefuck"
];
theme = "robbyrussell";
};
initExtra = ''
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241'
eval $(thefuck --alias)
eval $(thefuck --alias FUCK)
eval "$(starship init zsh)"
'';
};
}

View File

@@ -0,0 +1,29 @@
{ pkgs, config, ... }:
{
xdg = {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/desktop";
documents = "${config.home.homeDirectory}/documents";
download = "${config.home.homeDirectory}/downloads";
music = "${config.home.homeDirectory}/media/music";
pictures = "${config.home.homeDirectory}/media/images";
publicShare = "${config.home.homeDirectory}/documents/share";
templates = "${config.home.homeDirectory}/documents/templates";
videos = "${config.home.homeDirectory}/media/videos";
};
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config = {
common.default = [ "gtk" ];
hyprland.default = [
"gtk"
"hyprland"
];
};
};
};
}

36
home/pkgs/cnst.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
# Desktop
alacritty
wl-clipboard
dunst
keepassxc
ranger
webcord
xfce.thunar
xfce.thunar-volman
xfce.thunar-archive-plugin
gnome.file-roller
swaybg
wireguard-tools
wpa_supplicant
ntfs3g
kdePackages.polkit-kde-agent-1
networkmanagerapplet
blueman
htop
btop
tofi
pamixer
virt-manager
qbittorrent
fastfetch
waybar
nwg-look
mullvad-vpn
thefuck
calcurse
gnome.adwaita-icon-theme
];
}