BIG RESTRUCT
This commit is contained in:
50
home/cnst/home.nix
Normal file
50
home/cnst/home.nix
Normal 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
141
home/home.nix
Normal 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";
|
||||
}
|
||||
12
home/modules/firefox/default.nix
Normal file
12
home/modules/firefox/default.nix
Normal 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" ];
|
||||
};
|
||||
}
|
||||
7
home/modules/git/default.nix
Normal file
7
home/modules/git/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "cnst";
|
||||
userEmail = "cnst@cana.st";
|
||||
};
|
||||
}
|
||||
28
home/modules/gtk/default.nix
Normal file
28
home/modules/gtk/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/modules/hypr/default.nix
Normal file
12
home/modules/hypr/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
7
home/modules/hypr/hyprland.conf
Normal file
7
home/modules/hypr/hyprland.conf
Normal 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
|
||||
103
home/modules/neovim/default.nix
Normal file
103
home/modules/neovim/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
45
home/modules/shell/default.nix
Normal file
45
home/modules/shell/default.nix
Normal 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)"
|
||||
'';
|
||||
};
|
||||
}
|
||||
29
home/modules/xdg/default.nix
Normal file
29
home/modules/xdg/default.nix
Normal 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
36
home/pkgs/cnst.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user