mirror of
https://github.com/FabricSoul/nixos-configs.git
synced 2025-08-03 16:50:24 -04:00
revert: use old flake
This commit is contained in:
parent
d164e5e53d
commit
a2e660782f
20 changed files with 1158 additions and 3 deletions
37
README.md
Normal file
37
README.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
nixos-configs/
|
||||||
|
├── flake.nix
|
||||||
|
├── .gitignore
|
||||||
|
├── hosts/
|
||||||
|
│ ├── common/
|
||||||
|
│ │ ├── global/
|
||||||
|
│ │ │ ├── default.nix
|
||||||
|
│ │ │ ├── fonts.nix
|
||||||
|
│ │ │ └── locale.nix
|
||||||
|
│ │ └── optional/
|
||||||
|
│ │ ├── nvidia.nix
|
||||||
|
│ │ ├── docker.nix
|
||||||
|
│ │ └── steam.nix
|
||||||
|
│ ├── tatara/
|
||||||
|
│ │ ├── default.nix
|
||||||
|
│ │ └── hardware-configuration.nix
|
||||||
|
│ └── nix/
|
||||||
|
│ ├── default.nix
|
||||||
|
│ └── hardware-configuration.nix
|
||||||
|
├── home/
|
||||||
|
│ ├── fabric/
|
||||||
|
│ │ ├── default.nix
|
||||||
|
│ │ ├── programs/
|
||||||
|
│ │ │ ├── git.nix
|
||||||
|
│ │ │ ├── kitty.nix
|
||||||
|
│ │ │ ├── nixvim.nix
|
||||||
|
│ │ │ ├── tmux.nix
|
||||||
|
│ │ │ └── zsh.nix
|
||||||
|
│ │ └── desktop/
|
||||||
|
│ │ ├── hyprland.nix
|
||||||
|
│ │ └── hyprpanel.nix
|
||||||
|
│ └── home.nix
|
||||||
|
```
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
pkgsUnstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
pkgsUnstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
Tatara = lib.nixosSystem {
|
zion = lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./hosts/zion/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
hyprpanel.overlay
|
hyprpanel.overlay
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
./home.nix
|
./home/fabric/default.nix
|
||||||
nixvim.homeManagerModules.nixvim
|
nixvim.homeManagerModules.nixvim
|
||||||
hyprpanel.homeManagerModules.hyprpanel
|
hyprpanel.homeManagerModules.hyprpanel
|
||||||
];
|
];
|
||||||
|
|
131
home/fabric/default.nix
Normal file
131
home/fabric/default.nix
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
{
|
||||||
|
nixvim,
|
||||||
|
hyprpanel,
|
||||||
|
pkgs,
|
||||||
|
pkgsUnstable,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Import program configurations
|
||||||
|
./programs/git.nix
|
||||||
|
./programs/kitty.nix
|
||||||
|
./programs/nixvim.nix
|
||||||
|
./programs/tmux.nix
|
||||||
|
./programs/zsh.nix
|
||||||
|
|
||||||
|
# Import desktop configurations
|
||||||
|
./desktop/hyprland.nix
|
||||||
|
# ./desktop/hyprpanel.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should manage
|
||||||
|
home.username = "fabric";
|
||||||
|
home.homeDirectory = "/home/fabric";
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
|
# Session variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
SHELL = "zsh";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Common packages used across your system
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
git
|
||||||
|
kitty
|
||||||
|
firefox
|
||||||
|
mpv
|
||||||
|
nerdfonts
|
||||||
|
tmux
|
||||||
|
discord
|
||||||
|
fzf
|
||||||
|
yazi
|
||||||
|
zsh
|
||||||
|
pavucontrol
|
||||||
|
wofi
|
||||||
|
deno
|
||||||
|
hyprpanel
|
||||||
|
alejandra
|
||||||
|
rustup
|
||||||
|
tmuxPlugins.sensible
|
||||||
|
tmuxPlugins.vim-tmux-navigator
|
||||||
|
tmuxPlugins.onedark-theme
|
||||||
|
nodePackages.prettier
|
||||||
|
nodePackages.tailwindcss
|
||||||
|
prettierd
|
||||||
|
nodejs_23
|
||||||
|
qbittorrent
|
||||||
|
go
|
||||||
|
gccgo14
|
||||||
|
hypridle
|
||||||
|
dprint
|
||||||
|
code-cursor
|
||||||
|
delve
|
||||||
|
ldtk
|
||||||
|
libresprite
|
||||||
|
];
|
||||||
|
|
||||||
|
# Wayland settings for hyprpanel
|
||||||
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
exec-once = [
|
||||||
|
"${pkgs.hyprpanel}/bin/hyprpanel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprpanel = {
|
||||||
|
# Enable the module.
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Add to Hyprland config
|
||||||
|
hyprland.enable = true;
|
||||||
|
|
||||||
|
# Fix the overwrite issue
|
||||||
|
overwrite.enable = false;
|
||||||
|
|
||||||
|
# Import a theme
|
||||||
|
theme = "rose_pine_moon_split";
|
||||||
|
|
||||||
|
# Configure bar layouts for monitors
|
||||||
|
layout = {
|
||||||
|
"bar.layouts" = {
|
||||||
|
"0" = {
|
||||||
|
left = ["dashboard" "workspaces" "windowtitle"];
|
||||||
|
middle = ["clock"];
|
||||||
|
right = ["volume" "network" "bluetooth" "systray" "media" "notifications"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure and theme options
|
||||||
|
settings = {
|
||||||
|
bar.launcher.autoDetectIcon = true;
|
||||||
|
bar.workspaces.show_icons = true;
|
||||||
|
|
||||||
|
menus.clock = {
|
||||||
|
time = {
|
||||||
|
military = true;
|
||||||
|
hideSeconds = false;
|
||||||
|
};
|
||||||
|
weather.unit = "metric";
|
||||||
|
};
|
||||||
|
|
||||||
|
menus.dashboard.directories.enabled = false;
|
||||||
|
menus.dashboard.stats.enable_gpu = true;
|
||||||
|
|
||||||
|
theme.bar.transparent = false;
|
||||||
|
|
||||||
|
theme.font = {
|
||||||
|
name = "CaskaydiaCove NF";
|
||||||
|
size = "16px";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable home-manager
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Enable font configuration
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
}
|
82
home/fabric/desktop/hyprland.nix
Normal file
82
home/fabric/desktop/hyprland.nix
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# home/fabric/desktop/hyprland.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"$mainMod" = "SUPER";
|
||||||
|
"$terminal" = "kitty";
|
||||||
|
"$fileManager " = "dolphin";
|
||||||
|
"$menu" = "wofi --show drun";
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 0;
|
||||||
|
gaps_out = "0, 600, 0, 600";
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
"repeat_delay" = 300;
|
||||||
|
"repeat_rate" = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
# "hypridle"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrule = [
|
||||||
|
"workspace 6 silent,^(discord)$"
|
||||||
|
"workspace 4 silent,^(kitty)$"
|
||||||
|
"workspace 5 silent,^(firefox)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
|
bind = [
|
||||||
|
"$mainMod, T, exec, $terminal"
|
||||||
|
"$mainMod, Q, killactive"
|
||||||
|
"$mainMod, M, exit"
|
||||||
|
"$mainMod, E, exec, $fileManager"
|
||||||
|
"$mainMod, V, togglefloating"
|
||||||
|
"$mainMod, SPACE, exec, $menu"
|
||||||
|
# "$mainMod, P, pseudo" # dwindle
|
||||||
|
# "$mainMod, J, togglesplit" # dwindle
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
"$mainMod, H, movefocus, l"
|
||||||
|
"$mainMod, L, movefocus, r"
|
||||||
|
"$mainMod, K, movefocus, u"
|
||||||
|
"$mainMod, J, movefocus, d"
|
||||||
|
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
"$mainMod, 1, workspace, 1"
|
||||||
|
"$mainMod, 2, workspace, 2"
|
||||||
|
"$mainMod, 3, workspace, 3"
|
||||||
|
"$mainMod, 4, workspace, 4"
|
||||||
|
"$mainMod, 5, workspace, 5"
|
||||||
|
"$mainMod, 6, workspace, 6"
|
||||||
|
"$mainMod, 7, workspace, 7"
|
||||||
|
"$mainMod, 8, workspace, 8"
|
||||||
|
"$mainMod, 9, workspace, 9"
|
||||||
|
"$mainMod, 0, workspace, 10"
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
];
|
||||||
|
# monitor = [
|
||||||
|
# "DP-3,preferred,auto,1,workspace=1,addreserved,200,200,0,0"
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
}
|
63
home/fabric/desktop/hyprpanel.nix
Normal file
63
home/fabric/desktop/hyprpanel.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# home/fabric/desktop/hyprpanel.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
exec-once = [
|
||||||
|
"${pkgs.hyprpanel}/bin/hyprpanel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Changed from 'programs.hyprpanel' to just 'hyprpanel'
|
||||||
|
hyprpanel = {
|
||||||
|
# Enable the module.
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Add to Hyprland config
|
||||||
|
hyprland.enable = true;
|
||||||
|
|
||||||
|
# Fix the overwrite issue
|
||||||
|
overwrite.enable = false;
|
||||||
|
|
||||||
|
# Import a theme
|
||||||
|
theme = "rose_pine_moon_split";
|
||||||
|
|
||||||
|
# Configure bar layouts for monitors
|
||||||
|
layout = {
|
||||||
|
"bar.layouts" = {
|
||||||
|
"0" = {
|
||||||
|
left = ["dashboard" "workspaces" "windowtitle"];
|
||||||
|
middle = ["clock"];
|
||||||
|
right = ["volume" "network" "bluetooth" "systray" "media" "notifications"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure and theme options
|
||||||
|
settings = {
|
||||||
|
bar.launcher.autoDetectIcon = true;
|
||||||
|
bar.workspaces.show_icons = true;
|
||||||
|
|
||||||
|
menus.clock = {
|
||||||
|
time = {
|
||||||
|
military = true;
|
||||||
|
hideSeconds = false;
|
||||||
|
};
|
||||||
|
weather.unit = "metric";
|
||||||
|
};
|
||||||
|
|
||||||
|
menus.dashboard.directories.enabled = false;
|
||||||
|
menus.dashboard.stats.enable_gpu = true;
|
||||||
|
|
||||||
|
theme.bar.transparent = false;
|
||||||
|
|
||||||
|
theme.font = {
|
||||||
|
name = "CaskaydiaCove NF";
|
||||||
|
size = "16px";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
12
home/fabric/programs/git.nix
Normal file
12
home/fabric/programs/git.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# home/fabric/programs/git.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "FabricSoul";
|
||||||
|
userEmail = "fabric.soul7@gmail.com";
|
||||||
|
};
|
||||||
|
}
|
76
home/fabric/programs/kitty.nix
Normal file
76
home/fabric/programs/kitty.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
# home/fabric/programs/kitty.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# Basic settings
|
||||||
|
enable_audio_bell = false;
|
||||||
|
font_family = "FiraCodeNerdFont";
|
||||||
|
bold_font = "auto";
|
||||||
|
italic_font = "auto";
|
||||||
|
bold_italic_font = "auto";
|
||||||
|
font_size = 11;
|
||||||
|
background_opacity = "0.80";
|
||||||
|
confirm_os_window_close = 0;
|
||||||
|
|
||||||
|
# Basic colors
|
||||||
|
foreground = "#CDD6F4";
|
||||||
|
background = "#1E1E2E";
|
||||||
|
selection_foreground = "#1E1E2E";
|
||||||
|
selection_background = "#F5E0DC";
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = "#F5E0DC";
|
||||||
|
cursor_text_color = "#1E1E2E";
|
||||||
|
|
||||||
|
# URL underline color
|
||||||
|
url_color = "#F5E0DC";
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = "#B4BEFE";
|
||||||
|
inactive_border_color = "#6C7086";
|
||||||
|
bell_border_color = "#F9E2AF";
|
||||||
|
|
||||||
|
# OS Window titlebar colors
|
||||||
|
wayland_titlebar_color = "#1E1E2E";
|
||||||
|
macos_titlebar_color = "#1E1E2E";
|
||||||
|
|
||||||
|
# Tab bar colors
|
||||||
|
active_tab_foreground = "#11111B";
|
||||||
|
active_tab_background = "#CBA6F7";
|
||||||
|
inactive_tab_foreground = "#CDD6F4";
|
||||||
|
inactive_tab_background = "#181825";
|
||||||
|
tab_bar_background = "#11111B";
|
||||||
|
|
||||||
|
# Mark colors
|
||||||
|
mark1_foreground = "#1E1E2E";
|
||||||
|
mark1_background = "#B4BEFE";
|
||||||
|
mark2_foreground = "#1E1E2E";
|
||||||
|
mark2_background = "#CBA6F7";
|
||||||
|
mark3_foreground = "#1E1E2E";
|
||||||
|
mark3_background = "#74C7EC";
|
||||||
|
|
||||||
|
# The 16 terminal colors
|
||||||
|
color0 = "#45475A";
|
||||||
|
color8 = "#585B70";
|
||||||
|
color1 = "#F38BA8";
|
||||||
|
color9 = "#F38BA8";
|
||||||
|
color2 = "#A6E3A1";
|
||||||
|
color10 = "#A6E3A1";
|
||||||
|
color3 = "#F9E2AF";
|
||||||
|
color11 = "#F9E2AF";
|
||||||
|
color4 = "#89B4FA";
|
||||||
|
color12 = "#89B4FA";
|
||||||
|
color5 = "#F5C2E7";
|
||||||
|
color13 = "#F5C2E7";
|
||||||
|
color6 = "#94E2D5";
|
||||||
|
color14 = "#94E2D5";
|
||||||
|
color7 = "#BAC2DE";
|
||||||
|
color15 = "#A6ADC8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
434
home/fabric/programs/nixvim.nix
Normal file
434
home/fabric/programs/nixvim.nix
Normal file
|
@ -0,0 +1,434 @@
|
||||||
|
# home/fabric/programs/nixvim.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
plugins = {
|
||||||
|
cmp-dictionary.enable = true;
|
||||||
|
cmp-spell.enable = true;
|
||||||
|
toggleterm = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
web-devicons.enable = true;
|
||||||
|
nix.enable = true;
|
||||||
|
bufferline.enable = true;
|
||||||
|
lualine.enable = true;
|
||||||
|
luasnip.enable = true;
|
||||||
|
yanky = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlight.timer = 150;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ts-comments.enable = true;
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
"<leader> " = {
|
||||||
|
action = "git_files";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
defaults = {
|
||||||
|
file_ignore_patterns = [
|
||||||
|
"^.git/"
|
||||||
|
"^.mypy_cache/"
|
||||||
|
"^__pycache__/"
|
||||||
|
"^output/"
|
||||||
|
"^data/"
|
||||||
|
"%.ipynb"
|
||||||
|
"^node_modules/"
|
||||||
|
"^.next/"
|
||||||
|
"%.env"
|
||||||
|
"%.env.local"
|
||||||
|
"%.env.development.local"
|
||||||
|
"%.env.test.local"
|
||||||
|
"%.env.production.local"
|
||||||
|
"^npm-debug.log"
|
||||||
|
"^yarn-debug.log"
|
||||||
|
"^yarn-error.log"
|
||||||
|
"^.vercel/"
|
||||||
|
"^.turbo/"
|
||||||
|
"^build/"
|
||||||
|
"^.DS_Store"
|
||||||
|
"^.tailwindcss/"
|
||||||
|
"^tailwind.config.js.backup"
|
||||||
|
"%.css.map"
|
||||||
|
"^styles/dist/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
|
auto_install = true;
|
||||||
|
ensure_installed = [
|
||||||
|
"bash"
|
||||||
|
"c"
|
||||||
|
"diff"
|
||||||
|
"html"
|
||||||
|
"javascript"
|
||||||
|
"jsdoc"
|
||||||
|
"json"
|
||||||
|
"jsonc"
|
||||||
|
"lua"
|
||||||
|
"luadoc"
|
||||||
|
"luap"
|
||||||
|
"markdown"
|
||||||
|
"markdown_inline"
|
||||||
|
"printf"
|
||||||
|
"python"
|
||||||
|
"query"
|
||||||
|
"regex"
|
||||||
|
"toml"
|
||||||
|
"tsx"
|
||||||
|
"typescript"
|
||||||
|
"vim"
|
||||||
|
"vimdoc"
|
||||||
|
"xml"
|
||||||
|
"yaml"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
snacks = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
indent-blankline.enable = true;
|
||||||
|
harpoon = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
addFile = "<leader>ha";
|
||||||
|
toggleQuickMenu = "<C-e>";
|
||||||
|
navFile = {
|
||||||
|
"1" = "<leader>h;";
|
||||||
|
"2" = "<leader>h,";
|
||||||
|
"3" = "<leader>h.";
|
||||||
|
"4" = "<leader>hp";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
yazi.enable = true;
|
||||||
|
gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
current_line_blame = true;
|
||||||
|
current_line_blame_opts = {
|
||||||
|
virt_text = true;
|
||||||
|
virt_text_pos = "eol";
|
||||||
|
};
|
||||||
|
signcolumn = true;
|
||||||
|
signs = {
|
||||||
|
add = {
|
||||||
|
text = "+";
|
||||||
|
};
|
||||||
|
change = {
|
||||||
|
text = "▎";
|
||||||
|
};
|
||||||
|
changedelete = {
|
||||||
|
text = "-";
|
||||||
|
};
|
||||||
|
delete = {
|
||||||
|
text = "-";
|
||||||
|
};
|
||||||
|
topdelete = {
|
||||||
|
text = "-";
|
||||||
|
};
|
||||||
|
untracked = {
|
||||||
|
text = "!";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
watch_gitdir = {
|
||||||
|
follow_files = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
nix = ["alejandra"];
|
||||||
|
markdown = ["dprint"];
|
||||||
|
# Use prettierd first, fallback to prettier
|
||||||
|
javascript = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
typescript = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
javascriptreact = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
typescriptreact = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
css = ["prettier"];
|
||||||
|
scss = ["prettier"];
|
||||||
|
html = ["prettier"];
|
||||||
|
json = ["prettier"];
|
||||||
|
# Run on all files
|
||||||
|
"_" = ["trim_whitespace" "trim_newlines"];
|
||||||
|
};
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500;
|
||||||
|
lsp_fallback = true;
|
||||||
|
};
|
||||||
|
formatters = {
|
||||||
|
prettier = {
|
||||||
|
command = "prettier";
|
||||||
|
args = [
|
||||||
|
"--plugin=prettier-plugin-tailwindcss"
|
||||||
|
"--print-width=80"
|
||||||
|
"--tab-width=2"
|
||||||
|
"--use-tabs=false"
|
||||||
|
"--semi=true"
|
||||||
|
"--single-quote=false"
|
||||||
|
"--trailing-comma=es5"
|
||||||
|
"--bracket-spacing=true"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# Optional: Add prettierd for faster formatting
|
||||||
|
prettierd = {
|
||||||
|
command = "prettierd";
|
||||||
|
args = ["$FILENAME"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Additional useful settings from the docs
|
||||||
|
log_level = "warn";
|
||||||
|
notify_on_error = true;
|
||||||
|
notify_no_formatters = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
which-key.enable = true;
|
||||||
|
undotree = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
mini = {
|
||||||
|
enable = true;
|
||||||
|
modules = {
|
||||||
|
pairs.enable = true;
|
||||||
|
starter = {
|
||||||
|
enable = true;
|
||||||
|
header = ''
|
||||||
|
███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗
|
||||||
|
████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║
|
||||||
|
██╔██╗ ██║██║ ╚███╔╝ ██║ ██║██║██╔████╔██║
|
||||||
|
██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||||
|
██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
surround = {
|
||||||
|
enable = true;
|
||||||
|
mappings = {
|
||||||
|
add = "gsa";
|
||||||
|
delete = "gsd";
|
||||||
|
find = "gsf";
|
||||||
|
find_left = "gsF";
|
||||||
|
highlight = "gsh";
|
||||||
|
replace = "gsr";
|
||||||
|
update_n_lines = "gsn";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
todo-comments.enable = true;
|
||||||
|
persistence.enable = true;
|
||||||
|
friendly-snippets.enable = true;
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
inlayHints = true;
|
||||||
|
servers = {
|
||||||
|
ts_ls.enable = true;
|
||||||
|
eslint.enable = true;
|
||||||
|
nil_ls.enable = true;
|
||||||
|
tailwindcss.enable = true;
|
||||||
|
gopls.enable = true;
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installCargo = true;
|
||||||
|
installRustc = true;
|
||||||
|
installRustfmt = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
settings = {
|
||||||
|
sources = [
|
||||||
|
{name = "nvim_lsp";}
|
||||||
|
{name = "path";}
|
||||||
|
{name = "buffer";}
|
||||||
|
{name = "luasnip";}
|
||||||
|
{name = "dictionary";}
|
||||||
|
];
|
||||||
|
mapping = {
|
||||||
|
__raw = ''
|
||||||
|
cmp.mapping.preset.insert({
|
||||||
|
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<Tab>"] = cmp.mapping.confirm(),
|
||||||
|
["<Enter>"] = cmp.mapping.confirm(),
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
tmux-navigator.enable = true;
|
||||||
|
vim-suda.enable = true;
|
||||||
|
};
|
||||||
|
globals.mapleader = " ";
|
||||||
|
opts = {
|
||||||
|
relativenumber = true;
|
||||||
|
number = true;
|
||||||
|
tabstop = 2;
|
||||||
|
shiftwidth = 2;
|
||||||
|
expandtab = true;
|
||||||
|
autoindent = true;
|
||||||
|
wrap = false;
|
||||||
|
cursorline = true;
|
||||||
|
mouse = "a";
|
||||||
|
clipboard = "unnamedplus";
|
||||||
|
splitright = true;
|
||||||
|
splitbelow = true;
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
termguicolors = true;
|
||||||
|
signcolumn = "yes";
|
||||||
|
scrolloff = 12;
|
||||||
|
shada = "'1000,f1,<500,%";
|
||||||
|
guicursor = "";
|
||||||
|
colorcolumn = "80";
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-h>";
|
||||||
|
action = "<C-w>h";
|
||||||
|
options = {
|
||||||
|
desc = "Go to Left Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-j>";
|
||||||
|
action = "<C-w>j";
|
||||||
|
options = {
|
||||||
|
desc = "Go to Lower Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-k>";
|
||||||
|
action = "<C-w>k";
|
||||||
|
options = {
|
||||||
|
desc = "Go to Upper Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-l>";
|
||||||
|
action = "<C-w>l";
|
||||||
|
options = {
|
||||||
|
desc = "Go to Right Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Window resizing
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-Up>";
|
||||||
|
action = "<cmd>resize +2<cr>";
|
||||||
|
options.desc = "Increase Window Height";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-Down>";
|
||||||
|
action = "<cmd>resize -2<cr>";
|
||||||
|
options.desc = "Decrease Window Height";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-Left>";
|
||||||
|
action = "<cmd>vertical resize -2<cr>";
|
||||||
|
options.desc = "Decrease Window Width";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-Right>";
|
||||||
|
action = "<cmd>vertical resize +2<cr>";
|
||||||
|
options.desc = "Increase Window Width";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = ":UndotreeToggle<CR>";
|
||||||
|
key = "<leader>u";
|
||||||
|
mode = ["n"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = ":m '>+1<CR>gv=gv";
|
||||||
|
key = "J";
|
||||||
|
mode = ["v"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = ":m '<-2<CR>gv=gv";
|
||||||
|
key = "K";
|
||||||
|
mode = ["v"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>sv";
|
||||||
|
action = "<C-w>v";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>sh";
|
||||||
|
action = "<C-w>s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>e";
|
||||||
|
action = ":Yazi<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-d>";
|
||||||
|
action = "<C-d>zz";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-u>";
|
||||||
|
action = "<C-u>zz";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
key = "<leader>p";
|
||||||
|
action = "\"_dP";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggleterm
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>t";
|
||||||
|
action = ":ToggleTerm direction=float<CR>";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
colorschemes.rose-pine.enable = true;
|
||||||
|
};
|
||||||
|
}
|
32
home/fabric/programs/tmux.nix
Normal file
32
home/fabric/programs/tmux.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# home/fabric/programs/tmux.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
sensible
|
||||||
|
onedark-theme
|
||||||
|
vim-tmux-navigator
|
||||||
|
];
|
||||||
|
|
||||||
|
# General settings
|
||||||
|
baseIndex = 1;
|
||||||
|
mouse = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
|
||||||
|
# Custom key bindings
|
||||||
|
extraConfig = ''
|
||||||
|
# Set pane base index
|
||||||
|
setw -g pane-base-index 1
|
||||||
|
|
||||||
|
# Vi copy mode bindings
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||||
|
bind-key P paste-buffer
|
||||||
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
33
home/fabric/programs/zsh.nix
Normal file
33
home/fabric/programs/zsh.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# home/fabric/programs/zsh.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs = {
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"vi-mode"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
export PATH="/home/fabric/.deno/bin:$PATH"
|
||||||
|
export PATH=$PATH:(go env GOPATH)/bin
|
||||||
|
|
||||||
|
alias wails='$(go env GOPATH)/bin/wails'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
oh-my-posh = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
useTheme = "easy-term";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
55
hosts/common/global/default.nix
Normal file
55
hosts/common/global/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# hosts/common/global/default.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./locale.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable nix flakes
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Basic system packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
greetd.greetd
|
||||||
|
greetd.tuigreet
|
||||||
|
libinput
|
||||||
|
libnotify
|
||||||
|
kitty
|
||||||
|
zsh
|
||||||
|
ollama
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Greetd configuration
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "''${pkgs.greetd.tuigreet}/bin/tuigreet --time ";
|
||||||
|
user = "fabric";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Display manager configuration
|
||||||
|
services.displayManager.defaultSession = "hyprland";
|
||||||
|
|
||||||
|
# Default programs
|
||||||
|
programs = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# This value determines the NixOS release version
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
14
hosts/common/global/locale.nix
Normal file
14
hosts/common/global/locale.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# hosts/common/global/locale.nix
|
||||||
|
{...}: {
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Toronto";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_CA.UTF-8";
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
}
|
4
hosts/common/optional/docker.nix
Normal file
4
hosts/common/optional/docker.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# hosts/common/optional/docker.nix
|
||||||
|
{...}: {
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
}
|
21
hosts/common/optional/nvidia.nix
Normal file
21
hosts/common/optional/nvidia.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# hosts/common/optional/nvidia.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
graphics.enable = true;
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
4
hosts/common/optional/steam.nix
Normal file
4
hosts/common/optional/steam.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# hosts/common/optional/steam.nix
|
||||||
|
{...}: {
|
||||||
|
programs.steam.enable = true;
|
||||||
|
}
|
0
hosts/tatara/default.nix
Normal file
0
hosts/tatara/default.nix
Normal file
38
hosts/tatara/hardware-configuration.nix
Normal file
38
hosts/tatara/hardware-configuration.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# 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" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1cc325bd-91a6-4c69-9593-e2cb27363c93";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/EF24-B12A";
|
||||||
|
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.enp5s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
43
hosts/zion/default.nix
Normal file
43
hosts/zion/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# hosts/zion/default.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Hardware configuration
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# Common configurations
|
||||||
|
../common/global
|
||||||
|
../common/optional/nvidia.nix
|
||||||
|
../common/optional/docker.nix
|
||||||
|
../common/optional/steam.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
networking = {
|
||||||
|
hostName = "zion";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
users.users.fabric = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "fabric";
|
||||||
|
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable Ollama with CUDA
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
acceleration = "cuda";
|
||||||
|
};
|
||||||
|
}
|
39
hosts/zion/hardware-configuration.nix
Normal file
39
hosts/zion/hardware-configuration.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# 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 = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/303cbd05-4811-4560-a136-23ef8fd3a4fa";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/3083-F950";
|
||||||
|
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.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp9s0f3u3u1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
37
rebuild.sh
Executable file
37
rebuild.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
HOSTNAME=$(hostname | tr '[:upper:]' '[:lower:]')
|
||||||
|
USERNAME="fabric"
|
||||||
|
|
||||||
|
# Check if an argument is provided
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "No arguments provided. Usage:"
|
||||||
|
echo " ./rebuild.sh system # Rebuild NixOS configuration"
|
||||||
|
echo " ./rebuild.sh home # Rebuild home-manager configuration"
|
||||||
|
echo " ./rebuild.sh both # Rebuild both configurations"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
"system")
|
||||||
|
echo "Rebuilding NixOS configuration for $HOSTNAME..."
|
||||||
|
sudo nixos-rebuild switch --flake .#$HOSTNAME
|
||||||
|
;;
|
||||||
|
"home")
|
||||||
|
echo "Rebuilding home-manager configuration for $USERNAME@$HOSTNAME..."
|
||||||
|
home-manager switch --flake .#$USERNAME@$HOSTNAME
|
||||||
|
;;
|
||||||
|
"both")
|
||||||
|
echo "Rebuilding NixOS configuration for $HOSTNAME..."
|
||||||
|
sudo nixos-rebuild switch --flake .#$HOSTNAME
|
||||||
|
echo "Rebuilding home-manager configuration for $USERNAME@$HOSTNAME..."
|
||||||
|
home-manager switch --flake .#$USERNAME@$HOSTNAME
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid argument. Usage:"
|
||||||
|
echo " ./rebuild.sh system # Rebuild NixOS configuration"
|
||||||
|
echo " ./rebuild.sh home # Rebuild home-manager configuration"
|
||||||
|
echo " ./rebuild.sh both # Rebuild both configurations"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Add table
Add a link
Reference in a new issue