Compare commits
No commits in common. "755c55c976192ffba21ea7d78f478c4a43831946" and "2d6e5194400ce73d4cfbdb0e35b40ed150acd851" have entirely different histories.
755c55c976
...
2d6e519440
31 changed files with 490 additions and 683 deletions
|
@ -37,7 +37,6 @@
|
|||
nixpkgs.lib.nixosSystem {
|
||||
system = arch;
|
||||
modules = [
|
||||
./nixosModules
|
||||
./hosts/${host}
|
||||
./hosts/base
|
||||
];
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./desktop
|
||||
./programs
|
||||
./packages
|
||||
];
|
||||
config = {
|
||||
home.username = "krop";
|
||||
home.homeDirectory = "/home/krop";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./gnome.nix
|
||||
];
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.krop.hm.desktop.gnome = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable my gnome configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
size = 24;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.grand-theft-focus
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.appindicator
|
||||
gnome-commander
|
||||
];
|
||||
dconf = {
|
||||
settings = {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = with pkgs.gnomeExtensions; [
|
||||
grand-theft-focus.extensionUuid
|
||||
vitals.extensionUuid
|
||||
appindicator.extensionUuid
|
||||
];
|
||||
favorite-apps = [
|
||||
"firefox.desktop"
|
||||
"Alacritty.desktop"
|
||||
"thunderbird.desktop"
|
||||
"org.gnome.gnome-commander.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
accent-color = "red";
|
||||
show-battery-percentage = true;
|
||||
gtk-enable-primary-paste = false;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
natural-scroll = false;
|
||||
click-method = "areas";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "appmenu:minimize,maximize,close";
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
event-sounds = false;
|
||||
};
|
||||
"org/gnome/desktop/search-providers" = {
|
||||
disabled = [
|
||||
"org.gnome.Contacts.desktop"
|
||||
"org.gnome.Calculator.desktop"
|
||||
"org.gnome.Calendar.desktop"
|
||||
"org.gnome.Characters.desktop"
|
||||
"org.gnome.clocks.desktop"
|
||||
"org.gnome.Software.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/vitals" = {
|
||||
position-in-panel = 0;
|
||||
show-battery = true;
|
||||
icon-style = 1;
|
||||
hot-sensors = [
|
||||
"__temperature_max__"
|
||||
"_memory_available_"
|
||||
"_storage_free_"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/background" =
|
||||
let
|
||||
bgPath = "file://${./assets/nyan_cat.jpg}";
|
||||
in
|
||||
{
|
||||
picture-options = "zoom";
|
||||
picture-uri = bgPath;
|
||||
picture-uri-dark = bgPath;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "Adwaita-dark";
|
||||
style = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.adwaita-qt;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./octave.nix
|
||||
./development.nix
|
||||
./misc.nix
|
||||
];
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.packages.development;
|
||||
in
|
||||
{
|
||||
options.krop.hm.packages.development = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my development configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gh
|
||||
d2
|
||||
iperf
|
||||
];
|
||||
programs.go = {
|
||||
enable = true;
|
||||
goPath = "Repositories/go";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.packages.misc;
|
||||
in
|
||||
{
|
||||
options.krop.hm.packages.misc = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my misc applications";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
moonlight-qt
|
||||
jetbrains-mono
|
||||
mattermost-desktop
|
||||
gparted
|
||||
prismlauncher # REMOVE AND MOVE TO games module after refactoring
|
||||
joplin-desktop
|
||||
wireshark
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.packages.octave;
|
||||
in
|
||||
{
|
||||
options.krop.hm.packages.octave = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my octave configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
ghostscript
|
||||
(octaveFull.withPackages (
|
||||
ps: with ps; [
|
||||
octavePackages.signal
|
||||
]
|
||||
))
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.alacritty;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.alacritty = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my alacritty configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ alacritty-theme ];
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
import = [ "${pkgs.alacritty-theme}/gnome_terminal.toml" ];
|
||||
};
|
||||
font = {
|
||||
size = 16;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.codium;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.codium = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my codium configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gopls
|
||||
nixd
|
||||
];
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
tamasfe.even-better-toml
|
||||
vscodevim.vim
|
||||
ms-azuretools.vscode-docker
|
||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||
redhat.vscode-yaml
|
||||
ms-python.python
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
golang.go
|
||||
];
|
||||
mutableExtensionsDir = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./codium.nix
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./micro.nix
|
||||
./tmux.nix
|
||||
./zoxide.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.direnv;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.direnv = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my direnv configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
stdlib = ''
|
||||
: ''${XDG_CACHE_HOME:=$HOME/.cache}
|
||||
declare -A direnv_layout_dirs
|
||||
direnv_layout_dir() {
|
||||
echo "''${direnv_layout_dirs[$PWD]:=$(
|
||||
echo -n "$XDG_CACHE_HOME"/direnv/layouts/
|
||||
echo -n "$PWD" | sha1sum | cut -d ' ' -f 1
|
||||
)}"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.git;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.git = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my git configuration";
|
||||
};
|
||||
work-config = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Generate my job configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jakub Kropáček";
|
||||
userEmail = "kropikuba@gmail.com";
|
||||
includes =
|
||||
if cfg.work-config then
|
||||
let
|
||||
workcfg = {
|
||||
user = {
|
||||
email = "jakub.kropacek@olc.cz";
|
||||
name = "Jakub Kropáček";
|
||||
};
|
||||
};
|
||||
in
|
||||
[
|
||||
{
|
||||
condition = "gitdir:~/Repositories/OLC/**";
|
||||
contents = workcfg;
|
||||
}
|
||||
{
|
||||
condition = "gitdir:~/Repositories/OLC-Hexpol/**";
|
||||
contents = workcfg;
|
||||
}
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
status = {
|
||||
submoduleSummary = true;
|
||||
};
|
||||
diff = {
|
||||
submodule = "log";
|
||||
};
|
||||
core = {
|
||||
autocrlf = "input";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.micro;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.micro = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my micro configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
colorscheme = "atom-dark";
|
||||
wordwrap = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.tmux;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.tmux = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my tmux configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
terminal = "tmux-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
yank
|
||||
sensible
|
||||
];
|
||||
extraConfig = ''
|
||||
# Move status bar to top
|
||||
set -g status-position top
|
||||
|
||||
# Indexing from 1 instead of 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.zoxide;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.zoxide = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my zoxide configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.hm.programs.zsh;
|
||||
in
|
||||
{
|
||||
options.krop.hm.programs.zsh = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Enable my zsh configuration";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initExtra = ''
|
||||
bindkey "^[[1;3D" backward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
autoload -Uz vcs_info
|
||||
setopt auto_menu
|
||||
setopt complete_in_word
|
||||
setopt always_to_end
|
||||
|
||||
# zstyle command format
|
||||
# zstyle :<namespace>:<function>:<completer>:<command>:<argument>:<tag> <style> <value>
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' special-dirs true
|
||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "$ZSH/.zsh/.zcompcache"
|
||||
|
||||
|
||||
precmd() {
|
||||
vcs_info
|
||||
is_toolbx_container
|
||||
}
|
||||
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
zstyle ':vcs_info:git:*' formats '[%b] '
|
||||
|
||||
is_toolbx_container() {
|
||||
if [[ -f /run/.containerenv ]]; then
|
||||
CONTAINER_NAME=$(grep -oP 'name="\K[^"]+' /run/.containerenv)
|
||||
TOOLBX_INDICATOR="[%F{magenta}''${CONTAINER_NAME}%f] "
|
||||
else
|
||||
TOOLBX_INDICATOR=""
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='%2~ ''${TOOLBX_INDICATOR}''${vcs_info_msg_0_}»%b '
|
||||
'';
|
||||
dotDir = ".zsh";
|
||||
completionInit = "autoload -U compinit; compinit -d $ZSH/.zcompdump";
|
||||
history.path = "$ZDOTDIR/.zsh_history";
|
||||
shellAliases = {
|
||||
lg = "lazygit";
|
||||
cls = "clear";
|
||||
open = "xdg-open";
|
||||
fire = "firefox";
|
||||
la = "ls -al --color=auto";
|
||||
gs = "git status";
|
||||
ga = "git add";
|
||||
gaa = "git add --all";
|
||||
cg-run = "cargo run";
|
||||
cg-build = "cargo build";
|
||||
cg-test = "cargo test";
|
||||
dc = "docker compose";
|
||||
dc-build = "dc build";
|
||||
dc-run = "dc run --rm";
|
||||
dc-runr = "dc-run -u root";
|
||||
dc-up = "dc up";
|
||||
dc-upd = "dc up -d";
|
||||
dc-down = "dc down";
|
||||
dc-ls = "dc ls";
|
||||
dc-pull = "dc pull";
|
||||
ds-env = "env $(cat .env | grep \"^[A-Z]\" | xargs) docker stack";
|
||||
bw-unlock = "BW_SESSION=$(bw unlock --raw) && export BW_SESSION";
|
||||
t = "tmux";
|
||||
pc = "pre-commit";
|
||||
tb = "toolbox";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
|
@ -13,6 +14,7 @@
|
|||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
../../nixosModules
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
@ -75,7 +77,9 @@
|
|||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
programs = {
|
||||
tmux.enable = true;
|
||||
zsh.enable = true;
|
||||
git.enable = true;
|
||||
dconf.enable = true;
|
||||
thunderbird.enable = true;
|
||||
firefox.enable = true;
|
||||
|
@ -134,17 +138,6 @@
|
|||
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
sharedModules = [
|
||||
../../homeManagerModules
|
||||
];
|
||||
};
|
||||
|
||||
# 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
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
|
@ -13,9 +14,8 @@
|
|||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking.hostName = "lenar";
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
|
@ -24,6 +24,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.hostName = "lenar"; # Define your hostname.
|
||||
|
||||
# My own modules configuration
|
||||
krop = {
|
||||
audio = {
|
||||
|
@ -61,8 +63,13 @@
|
|||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
users = {
|
||||
"krop" = import ./home.nix;
|
||||
"krop" = import ../../users/krop;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.username = "krop";
|
||||
home.homeDirectory = "/home/krop";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
krop.hm = {
|
||||
desktop.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
programs.git = {
|
||||
work-config = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
|
@ -12,8 +14,10 @@
|
|||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking.hostName = "wenar-nix";
|
||||
|
||||
networking.hostName = "wenar-nix"; # Define your hostname.
|
||||
|
||||
# My own modules configuration
|
||||
krop = {
|
||||
|
@ -49,7 +53,7 @@
|
|||
inherit inputs;
|
||||
};
|
||||
users = {
|
||||
"krop" = import ./home.nix;
|
||||
"krop" = import ../../users/krop;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.username = "krop";
|
||||
home.homeDirectory = "/home/krop";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
32
hosts/work-ntb/default.nix
Normal file
32
hosts/work-ntb/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "work-ntb"; # Define your hostname.
|
||||
|
||||
# My own modules configuration
|
||||
krop = {
|
||||
ide = {
|
||||
enable = true;
|
||||
install-pycharm = true;
|
||||
};
|
||||
python.install-additional = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
users = {
|
||||
"krop" = import ../../users/krop;
|
||||
};
|
||||
};
|
||||
}
|
54
hosts/work-ntb/hardware-configuration.nix
Normal file
54
hosts/work-ntb/hardware-configuration.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
# 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 = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/360cfb7a-07d9-445b-83e2-6ef19bd55948";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5F8E-3C09";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}@inputs:
|
||||
let
|
||||
cfg = config.krop.cli;
|
||||
in
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}@inputs:
|
||||
{
|
||||
imports = [
|
||||
./python.nix
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
|
376
users/krop/default.nix
Normal file
376
users/krop/default.nix
Normal file
|
@ -0,0 +1,376 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "krop";
|
||||
home.homeDirectory = "/home/krop";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.grand-theft-focus
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.appindicator
|
||||
spotify
|
||||
moonlight-qt
|
||||
alacritty
|
||||
alacritty-theme
|
||||
nixd
|
||||
nil
|
||||
fzf
|
||||
zoxide
|
||||
jetbrains-mono
|
||||
mattermost-desktop
|
||||
gh
|
||||
gparted
|
||||
prismlauncher # REMOVE AND MOVE TO games module after refactoring
|
||||
joplin-desktop
|
||||
albert
|
||||
ghostscript
|
||||
(octaveFull.withPackages (
|
||||
ps: with ps; [
|
||||
octavePackages.signal
|
||||
]
|
||||
))
|
||||
wireshark
|
||||
iperf
|
||||
d2
|
||||
gopls
|
||||
gnome-commander
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# hello
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
size = 24;
|
||||
};
|
||||
|
||||
dconf = {
|
||||
settings = {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = with pkgs.gnomeExtensions; [
|
||||
grand-theft-focus.extensionUuid
|
||||
vitals.extensionUuid
|
||||
appindicator.extensionUuid
|
||||
];
|
||||
favorite-apps = [
|
||||
"firefox.desktop"
|
||||
"Alacritty.desktop"
|
||||
"thunderbird.desktop"
|
||||
"org.gnome.gnome-commander.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
accent-color = "red";
|
||||
show-battery-percentage = true;
|
||||
gtk-enable-primary-paste = false;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
natural-scroll = false;
|
||||
click-method = "areas";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "appmenu:minimize,maximize,close";
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
event-sounds = false;
|
||||
};
|
||||
"org/gnome/desktop/search-providers" = {
|
||||
disabled = [
|
||||
"org.gnome.Contacts.desktop"
|
||||
"org.gnome.Calculator.desktop"
|
||||
"org.gnome.Calendar.desktop"
|
||||
"org.gnome.Characters.desktop"
|
||||
"org.gnome.clocks.desktop"
|
||||
"org.gnome.Software.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/vitals" = {
|
||||
position-in-panel = 0;
|
||||
show-battery = true;
|
||||
icon-style = 1;
|
||||
hot-sensors = [
|
||||
"__temperature_max__"
|
||||
"_memory_available_"
|
||||
"_storage_free_"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/background" =
|
||||
let
|
||||
bgPath = "file://${./nyan_cat.jpg}";
|
||||
in
|
||||
{
|
||||
picture-options = "zoom";
|
||||
picture-uri = bgPath;
|
||||
picture-uri-dark = bgPath;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "Adwaita-dark";
|
||||
style = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.adwaita-qt;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.go = {
|
||||
enable = true;
|
||||
goPath = "Repositories/go";
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
tamasfe.even-better-toml
|
||||
vscodevim.vim
|
||||
ms-azuretools.vscode-docker
|
||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||
redhat.vscode-yaml
|
||||
ms-python.python
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
golang.go
|
||||
];
|
||||
mutableExtensionsDir = false;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
colorscheme = "atom-dark";
|
||||
wordwrap = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
stdlib = ''
|
||||
: ''${XDG_CACHE_HOME:=$HOME/.cache}
|
||||
declare -A direnv_layout_dirs
|
||||
direnv_layout_dir() {
|
||||
echo "''${direnv_layout_dirs[$PWD]:=$(
|
||||
echo -n "$XDG_CACHE_HOME"/direnv/layouts/
|
||||
echo -n "$PWD" | sha1sum | cut -d ' ' -f 1
|
||||
)}"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initExtra = ''
|
||||
bindkey "^[[1;3D" backward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
autoload -Uz vcs_info
|
||||
setopt auto_menu
|
||||
setopt complete_in_word
|
||||
setopt always_to_end
|
||||
|
||||
# zstyle command format
|
||||
# zstyle :<namespace>:<function>:<completer>:<command>:<argument>:<tag> <style> <value>
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' special-dirs true
|
||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "$ZSH/.zsh/.zcompcache"
|
||||
|
||||
|
||||
precmd() {
|
||||
vcs_info
|
||||
is_toolbx_container
|
||||
}
|
||||
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
zstyle ':vcs_info:git:*' formats '[%b] '
|
||||
|
||||
is_toolbx_container() {
|
||||
if [[ -f /run/.containerenv ]]; then
|
||||
CONTAINER_NAME=$(grep -oP 'name="\K[^"]+' /run/.containerenv)
|
||||
TOOLBX_INDICATOR="[%F{magenta}''${CONTAINER_NAME}%f] "
|
||||
else
|
||||
TOOLBX_INDICATOR=""
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='%2~ ''${TOOLBX_INDICATOR}''${vcs_info_msg_0_}»%b '
|
||||
'';
|
||||
dotDir = ".zsh";
|
||||
completionInit = "autoload -U compinit; compinit -d $ZSH/.zcompdump";
|
||||
history.path = "$ZDOTDIR/.zsh_history";
|
||||
shellAliases = {
|
||||
lg = "lazygit";
|
||||
cls = "clear";
|
||||
open = "xdg-open";
|
||||
fire = "firefox";
|
||||
la = "ls -al --color=auto";
|
||||
gs = "git status";
|
||||
ga = "git add";
|
||||
gaa = "git add --all";
|
||||
cg-run = "cargo run";
|
||||
cg-build = "cargo build";
|
||||
cg-test = "cargo test";
|
||||
dc = "docker compose";
|
||||
dc-build = "dc build";
|
||||
dc-run = "dc run --rm";
|
||||
dc-runr = "dc-run -u root";
|
||||
dc-up = "dc up";
|
||||
dc-upd = "dc up -d";
|
||||
dc-down = "dc down";
|
||||
dc-ls = "dc ls";
|
||||
dc-pull = "dc pull";
|
||||
ds-env = "env $(cat .env | grep \"^[A-Z]\" | xargs) docker stack";
|
||||
bw-unlock = "BW_SESSION=$(bw unlock --raw) && export BW_SESSION";
|
||||
t = "tmux";
|
||||
pc = "pre-commit";
|
||||
tb = "toolbox";
|
||||
};
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
import = [ "${pkgs.alacritty-theme}/gnome_terminal.toml" ];
|
||||
};
|
||||
font = {
|
||||
size = 16;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
terminal = "tmux-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
yank
|
||||
sensible
|
||||
];
|
||||
extraConfig = ''
|
||||
# Move status bar to top
|
||||
set -g status-position top
|
||||
|
||||
# Indexing from 1 instead of 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jakub Kropáček";
|
||||
userEmail = "kropikuba@gmail.com";
|
||||
includes =
|
||||
let
|
||||
workcfg = {
|
||||
user = {
|
||||
email = "jakub.kropacek@olc.cz";
|
||||
name = "Jakub Kropáček";
|
||||
};
|
||||
};
|
||||
in
|
||||
[
|
||||
{
|
||||
condition = "gitdir:~/Repositories/OLC/**";
|
||||
contents = workcfg;
|
||||
}
|
||||
{
|
||||
condition = "gitdir:~/Repositories/OLC-Hexpol/**";
|
||||
contents = workcfg;
|
||||
}
|
||||
];
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
status = {
|
||||
submoduleSummary = true;
|
||||
};
|
||||
diff = {
|
||||
submodule = "log";
|
||||
};
|
||||
core = {
|
||||
autocrlf = "input";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
Loading…
Reference in a new issue