Quickshell initial config

This commit is contained in:
xbazzi 2025-08-09 12:02:06 -06:00
parent 303f1e0710
commit 4948d71006
40 changed files with 1156 additions and 667 deletions

View File

@ -1,28 +1,38 @@
# Run with `nix-shell cuda-fhs.nix`
{ pkgs ? import <nixpkgs> {} }:
{
pkgs ? import <nixpkgs> { },
}:
(pkgs.buildFHSUserEnv {
name = "cuda-env";
targetPkgs = pkgs: with pkgs; [
git
gitRepo
gnupg
autoconf
curl
procps
gnumake
util-linux
m4
gperf
unzip
cudaPackages_12.cudatoolkit
linuxPackages.nvidia_x11
libGLU libGL
xorg.libXi xorg.libXmu freeglut
xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib
ncurses5
stdenv.cc
binutils
];
targetPkgs =
pkgs: with pkgs; [
git
gitRepo
gnupg
autoconf
curl
procps
gnumake
util-linux
m4
gperf
unzip
cudaPackages_12.cudatoolkit
linuxPackages.nvidia_x11
libGLU
libGL
xorg.libXi
xorg.libXmu
freeglut
xorg.libXext
xorg.libX11
xorg.libXv
xorg.libXrandr
zlib
ncurses5
stdenv.cc
binutils
];
multiPkgs = pkgs: with pkgs; [ zlib ];
runScript = "bash";
profile = ''
@ -31,4 +41,4 @@
export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
export EXTRA_CCFLAGS="-I/usr/include"
'';
}).env
}).env

View File

@ -43,12 +43,18 @@
# nixvim = {
# url = "github:xbazzi/nixvim-config";
# };
};
};
outputs = { nixpkgs, lanzaboote, ... }@inputs:
outputs =
{ nixpkgs, lanzaboote, ... }@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; };
pkgs = import nixpkgs {
system = "x86_64-linux";
config = {
allowUnfree = true;
};
};
# configModule = {
# # Add any custom options (and do feel free to upstream them!)
# # options = { ... };
@ -62,12 +68,13 @@
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
pkgs.neovim pkgs.vim
buildInputs = [
pkgs.neovim
pkgs.vim
];
shellHook = ''
echo "hello"
'';
echo "hello"
'';
};
nixosConfigurations = {
@ -96,24 +103,27 @@
# ];
# }
({ pkgs, lib, ... }: {
(
{ pkgs, lib, ... }:
{
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
})
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}
)
];
};
};
@ -131,7 +141,7 @@
home-manager.users.xbazzi = {
nixpkgs.config.allowUnfree = true;
#home.packages = [
#home.packages = [
#];
};
#home-manager.extraSpecialArgs

View File

@ -1,17 +1,18 @@
{
programs.bash = {
enable = true;
shellAliases =
let
flakePath = "~/nixos-config";
in {
la = "ls -lath";
lr = "ls -ltr";
rebuild = "sudo nixos-rebuild switch --flake ${flakePath}";
hms = "home-manager switch --flake ${flakePath}";
vi = "vim";
#config = "nvim ~/nix/configuration.nix";
#homecfg = "nvim ~/nix/home.nix";
};
};
programs.bash = {
enable = true;
shellAliases =
let
flakePath = "~/nixos-config";
in
{
la = "ls -lath";
lr = "ls -ltr";
rebuild = "sudo nixos-rebuild switch --flake ${flakePath}";
hms = "home-manager switch --flake ${flakePath}";
vi = "vim";
#config = "nvim ~/nix/configuration.nix";
#homecfg = "nvim ~/nix/home.nix";
};
};
}

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
dconf = {

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
imports = [
@ -10,8 +16,10 @@
#./vscode.nix
./packages.nix
./hyprlock.nix
./waybar.nix
# ./waybar.nix
# ./dconf.nix
./quickshell.nix
./hyprpaper.nix
./git.nix
./hyprland.nix
./zsh.nix
@ -19,4 +27,4 @@
./kitty.nix
./neovim.nix
];
}
}

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.git = {

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
gtk = {
@ -48,4 +54,4 @@
# QT_STYLE_OVERRIDE = "Tokyonight-Dark-B";
# };
}
}

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
home.username = "xbazzi";

View File

@ -1,30 +1,36 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.hypridle = {
enable = true;
programs.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
before_sleep_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
after_sleep_cmd = "notify-send '💡 Welcome back, badman!'";
};
settings = {
general = {
lock_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
before_sleep_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
after_sleep_cmd = "notify-send '💡 Welcome back, badman!'";
};
listener = [
{
timeout = 270; # 4.5 min — warn before lock
on-timeout = "notify-send '🔒 Locking in 30s...'";
}
{
timeout = 300; # 5 min — lock screen
on-timeout = "hyprctl dispatch exec 'hypelock --immediate'";
}
{
timeout = 900; # 15 min — suspend
on-timeout = "systemctl suspend";
}
];
};
listener = [
{
timeout = 270; # 4.5 min — warn before lock
on-timeout = "notify-send '🔒 Locking in 30s...'";
}
{
timeout = 300; # 5 min — lock screen
on-timeout = "hyprctl dispatch exec 'hypelock --immediate'";
}
{
timeout = 900; # 15 min — suspend
on-timeout = "systemctl suspend";
}
];
};
};
}

View File

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
wayland.windowManager.hyprland = {
@ -12,146 +17,176 @@
# "DP-3,addreserved,30,0,0,0"
];
bind =
[
# "$mod, k, exec, kitty"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, q, killactive"
# Mouse stuff (Ew... I know)
bindm = [
# Left click move
"$mod, mouse:272, movewindow"
"$mod, 0, layoutmsg, rollnext"
# Left click resize
"ALT, mouse:272, resizewindow"
# "ALT CTRL, mouse:272, resizewindow 1"
];
binde = [
"$mod CTRL, h, resizeactive, -30 0"
"$mod CTRL, l, resizeactive, 30 0"
"$mod CTRL, j, resizeactive, 0 30"
"$mod CTRL, k, resizeactive, 0 -30"
];
"$mod, f, fullscreen, 0"
bind = [
"$mod, d, exec, wofi --show drun"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, q, killactive"
"$mod, t, exec, kitty --single-instance"
"$mod, c, exec, code"
"$mod SHIFT, l, movewindow, mon:-1"
"$mod SHIFT, h, movewindow, mon:+1"
"$mod, 0, layoutmsg, rollnext"
"$mod SHIFT, n, layoutmsg, cycleprev"
"$mod SHIFT, p, layoutmsg, cyclenext"
", Print, exec, grimblast copy area"
"$mod, f, fullscreen, 0"
"$mod, e, exec, thunderbird"
"$mod, r, exec, kitty -- zsh -c 'exec yazi; exec zsh'"
"$mod, b, exec, kitty -- zsh -c 'btop; exec zsh'"
"$mod SHIFT, n, exec, kitty --start-as=normal -- zsh -ic 'code ~/nixos-config && exit'"
"$mod, d, exec, wofi --show drun"
"$mod, i, exec, brave"
"$mod, u, exec, kitty --start-as=normal -- zsh -ic 'home'"
"$mod, y, exec, kitty --start-as=normal -- zsh -ic 'repos'"
"$mod, t, exec, kitty --single-instance"
"$mod, s, togglespecialworkspace, special1"
"$mod, v, togglespecialworkspace, special2"
"$mod, p, swapwindow, l"
# Mouse stuff (Ew... I know)
# "$mod, mouse:272, movewindow"
# "$mod, mouse:273, resizewindow"
# "ALT, mouse:272, resizewindow"
"$mod, c, exec, code"
"$mod SHIFT, l, movewindow, mon:-1"
"$mod SHIFT, h, movewindow, mon:+1"
# Log out
# "$mod, -, exec, hyprctl dispatch exit"
"$mod SHIFT ALT, x, exec, hyprctl dispatch exit"
", Print, exec, grimblast copy area"
"$mod ALT, L, exec, hyprlock --immediate"
"$mod, e, exec, thunderbird"
"$mod, r, exec, kitty -- zsh -c 'exec yazi; exec zsh'"
"$mod, b, exec, kitty -- zsh -c 'btop; exec zsh'"
"$mod CTRL, n, exec, kitty --start-as=normal -- zsh -ic 'code ~/nixos-config && exit'"
# Shift+Print → select area and copy
"SHIFT, Print, exec, grimblast copy area"
"$mod, i, exec, brave"
"$mod, u, exec, kitty --start-as=normal -- zsh -ic 'home'"
"$mod, y, exec, kitty --start-as=normal -- zsh -ic 'repos'"
# Ctrl+Print → select window and copy
"CTRL, Print, exec, grimblast copy active"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (builtins.genList (i:
let ws = i + 1;
in [
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
)
9)
);
"$mod, s, togglespecialworkspace, special1"
# "$mod, v, togglespecialworkspace, special2"
general = {
layout = "master";
"$mod, p, layoutmsg, swapwithmaster"
"$mod, v, togglefloating, active"
# Log out
# "$mod, -, exec, hyprctl dispatch exit"
"$mod SHIFT ALT, x, exec, hyprctl dispatch exit"
"$mod ALT, L, exec, hyprlock --immediate"
# Shift+Print → select area and copy
"SHIFT, Print, exec, grimblast copy area"
# Ctrl+Print → select window and copy
"CTRL, Print, exec, grimblast copy active"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 9
)
);
general = {
layout = "master";
};
windowrulev2 = [
"opacity 0.85, class:^(Code)$"
"opacity 0.85, class:^(kitty)$"
];
# layerrule = [
# "ignorealpha 0.1, title:^(Blur)$"
# ];
decoration = {
# active_opacity = 1.0;
# inactive_opacity = 1.0;
# rounding = 5;
blur = {
enabled = true;
size = 5;
passes = 2;
brightness = 1;
contrast = 1.0;
ignore_opacity = false;
noise = 0;
new_optimizations = true;
# xray = true;
};
blurls = "^(popup|menu)$";
decoration = {
active_opacity = 1.0;
inactive_opacity = 1.0;
rounding = 5;
blur = {
enabled = true;
size = 3;
passes = 2;
brightness = 1;
contrast = 1.4;
ignore_opacity = true;
noise = 0;
new_optimizations = true;
xray = true;
};
shadow = {
enabled = true;
ignore_window = true;
offset = "0 2";
range = 20;
render_power = 3;
color = "rgba(00000055)";
};
};
animations = {
shadow = {
enabled = true;
bezier = [
"fluent_decel, 0, 0.2, 0.4, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutCubic, 0.33, 1, 0.68, 1"
"fade_curve, 0, 0.55, 0.45, 1"
];
animation = [
# name, enable, speed, curve, style
# Windows
"windowsIn, 0, 4, easeOutCubic, popin 20%" # window open
"windowsOut, 0, 4, fluent_decel, popin 80%" # window close.
"windowsMove, 1, 2, fluent_decel, slide" # everything in between, moving, dragging, resizing.
# Fade
"fadeIn, 1, 3, fade_curve" # fade in (open) -> layers and windows
"fadeOut, 1, 3, fade_curve" # fade out (close) -> layers and windows
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
# "border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
# "borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
];
ignore_window = true;
offset = "0 2";
range = 20;
render_power = 3;
color = "rgba(00000055)";
};
};
animations = {
enabled = true;
bezier = [
"fluent_decel, 0, 0.2, 0.4, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutCubic, 0.33, 1, 0.68, 1"
"fade_curve, 0, 0.55, 0.45, 1"
];
animation = [
# name, enable, speed, curve, style
# Windows
"windowsIn, 0, 4, easeOutCubic, popin 20%" # window open
"windowsOut, 0, 4, fluent_decel, popin 80%" # window close.
"windowsMove, 1, 2, fluent_decel, slide" # everything in between, moving, dragging, resizing.
# Fade
"fadeIn, 1, 3, fade_curve" # fade in (open) -> layers and windows
"fadeOut, 1, 3, fade_curve" # fade out (close) -> layers and windows
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
# "border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
# "borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
];
};
exec-once = [
"sleep 2 && waybar &"
# "sleep 2 && waybar &"
"hypridle &"
# "waybar &"
"eval $(gnome-keyring-daemon --start --components=secrets,ssh,gpg)"
# "hash dbus-update-activation-environment 2>/dev/null"
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
# "hash dbus-update-activation-environment 2>/dev/null"
# "dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"nm-applet &"
"poweralertd &"
# "nm-applet &"
# "poweralertd &"
# "wl-clip-persist --clipboard both &"
# "wl-paste --watch cliphist store &"
# "waybar &"
@ -167,4 +202,4 @@
];
};
};
}
}

View File

@ -1,4 +1,4 @@
{ inputs, pkgs, ... }:
{ inputs, pkgs, ... }:
{
programs.hyprlock = {
@ -73,7 +73,7 @@
color = "rgba(235, 219, 178, 1)";
font_size = 15;
font_family = "Maple Mono Bold";
# position = "0, ${if host == "laptop" then "131" else "281"}";
# position = "0, ${if host == "laptop" then "131" else "281"}";
position = "0, 281";
halign = "center";
valign = "bottom";
@ -105,4 +105,4 @@
];
};
};
}
}

25
home/hyprpaper.nix Normal file
View File

@ -0,0 +1,25 @@
{
pkgs,
# inputs,
...
}:
{
home.packages = [
pkgs.hyprpaper
];
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = [
"/home/xbazzi/Pictures/wallpapers/Fantasy-Landscape2.png"
];
wallpaper = [
",/home/xbazzi/Pictures/wallpapers/Fantasy-Landscape2.png"
];
};
};
}

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.kitty = lib.mkForce {
@ -10,8 +16,8 @@
enable_audio_bell = false;
mouse_hide_wait = "-1.0";
window_padding_width = 5;
background_opacity = "0.95";
background_blur = 5;
# background_opacity = "0.95";
# background_blur = 5;
background = "#17041c";
hide_window_decorations = true;
# themeFile = "Alucard";
@ -37,8 +43,8 @@
"U+F300-U+F313"
"U+E5FA-U+E62B"
];
in
(builtins.concatStringsSep "," mappings) + " Symbols Nerd Font";
in
(builtins.concatStringsSep "," mappings) + " Symbols Nerd Font";
};
};
}

View File

@ -1,28 +1,34 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.neovim ={
enable = true;
defaultEditor = true;
#extraConfig = /home/nixxer/.config/nvim-javi/init.lua;
# extraConfig = ''
# set background=dark
# set shiftwidth=4
# set showmatch
# set ignorecase
# set smartcase
# set incsearch
# set hlsearch
# set expandtab
# set rnu nu
# set tabstop=4
# set mouse=a
# set laststatus=2
# set nobackup
# set noswapfile
# set undofile
# let undodir=stdpath('data') .. '/undodir'
# set clipboard=unnamedplus
# '';
programs.neovim = {
enable = true;
defaultEditor = true;
#extraConfig = /home/nixxer/.config/nvim-javi/init.lua;
# extraConfig = ''
# set background=dark
# set shiftwidth=4
# set showmatch
# set ignorecase
# set smartcase
# set incsearch
# set hlsearch
# set expandtab
# set rnu nu
# set tabstop=4
# set mouse=a
# set laststatus=2
# set nobackup
# set noswapfile
# set undofile
# let undodir=stdpath('data') .. '/undodir'
# set clipboard=unnamedplus
# '';
};
}

View File

@ -1,4 +1,4 @@
{ inputs, pkgs, ... }:
{ inputs, pkgs, ... }:
{
home.packages = with pkgs; [
@ -6,14 +6,14 @@
tmux
# gnomeExtensions.appindicator
wofi
waybar
# waybar
# eww
# gnome-keyring
libsecret
grim # for screenshots
slurp # for selecting area
grimblast # easier syntax for grim+slurp
wl-clipboard # copy screenshot to clipboard
grim # for screenshots
slurp # for selecting area
grimblast # easier syntax for grim+slurp
wl-clipboard # copy screenshot to clipboard
hypridle
hyprlock
# (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })

64
home/quickshell.nix Normal file
View File

@ -0,0 +1,64 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.quickshell ];
# start it when Hyprland starts
wayland.windowManager.hyprland.settings.exec-once = [
"quickshell -c default"
];
# write the Quickshell config
xdg.configFile."quickshell/default/shell.qml".text = ''
import Quickshell
import Quickshell.Io
import QtQuick
// one window per screen
Variants {
model: Quickshell.screens
delegate: Component {
PanelWindow {
required property var modelData
screen: modelData
// top bar, full width
anchors.top: true
anchors.left: true
anchors.right: true
implicitHeight: 30 // tweak height if yuh want
Rectangle {
anchors.fill: parent
color: "#1a1a1a"
opacity: 0.92
}
// center clock
Text {
id: clock
anchors.centerIn: parent
font.pixelSize: 13
color: "#e6e6e6"
}
// update clock every second using `date`
Process {
id: dateProc
command: [ "date", "+%a %b %d %H:%M:%S" ]
running: true
stdout: StdioCollector {
onStreamFinished: clock.text = this.text.trim()
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
}
}
}
}
'';
}

169
home/quickshell.nix.nope Normal file
View File

@ -0,0 +1,169 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
quickshell jq playerctl pamixer networkmanager # nmcli
coreutils gnugrep gawk
];
wayland.windowManager.hyprland.settings.exec-once = [
"quickshell -c default"
];
xdg.configFile."quickshell/default/shell.qml".text = ''
import Quickshell
import QtQuick
import QtQuick.Layouts
// ===== Helpers =====
function run(cmd) {
const p = Qt.createQmlObject('import Quickshell; Process { }', root);
p.command = cmd; p.running = true; return p;
}
function pipe(cmdArr, cb) {
const p = Qt.createQmlObject('import Quickshell; Process { stdout: StdioCollector{} }', root);
p.command = cmdArr; p.running = true;
p.stdout.onStreamFinished.connect(function() { cb(p.stdout.text.trim()); });
}
// ===== Window per monitor =====
Variants {
id: root
model: Quickshell.screens
delegate: Component {
PanelWindow {
required property var modelData
screen: modelData
anchors.top: true; anchors.left: true; anchors.right: true
implicitHeight: 30
layer: "top"
exclusiveZone: implicitHeight
Rectangle { anchors.fill: parent; color: "#121212"; opacity: 0.95; radius: 0 }
// ===== Layout =====
RowLayout {
anchors.fill: parent
anchors.margins: 8
spacing: 12
// ---- LEFT: Workspaces ----
Row {
id: wsRow
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
property int activeWs: 1
Repeater {
model: 10
delegate: Rectangle {
property int idx: index + 1
height: 18; width: 22; radius: 5
color: (wsRow.activeWs === idx) ? "#2e7d32" : "#1f1f1f"
border.width: 1
border.color: (wsRow.activeWs === idx) ? "#4caf50" : "#333333"
Text {
anchors.centerIn: parent
text: idx; color: "#eaeaea"; font.pixelSize: 11
}
MouseArea {
anchors.fill: parent
onClicked: run(["hyprctl","dispatch","workspace", String(idx)])
}
}
}
// active workspace poll
Timer {
interval: 500; running: true; repeat: true
onTriggered: pipe(["bash","-lc","hyprctl activeworkspace -j | jq -r .id"], function(t){
if (t !== "" && !isNaN(parseInt(t))) wsRow.activeWs = parseInt(t)
})
}
}
// ---- CENTER: Active window title ----
Item { Layout.fillWidth: true }
Text {
id: titleText
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
elide: Text.ElideRight; horizontalAlignment: Text.AlignHCenter
font.pixelSize: 12; color: "#dcdcdc"; text: "—"
width: parent.width * 0.40
}
Timer {
interval: 500; running: true; repeat: true
onTriggered: pipe(["bash","-lc","hyprctl activewindow -j | jq -r .title"], function(t){
titleText.text = (t && t !== "null") ? t : "—"
})
}
Item { Layout.fillWidth: true }
// ---- RIGHT: Media / Volume / Net / Battery / Clock ----
Row {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
spacing: 10
// Media (playerctl)
Text {
id: media
font.pixelSize: 12; color: "#c0c0c0"; text: ""
width: 220; elide: Text.ElideRight
}
Timer {
interval: 1000; running: true; repeat: true
onTriggered: pipe(["bash","-lc",
"playerctl metadata --format '{{status}} {{artist}} - {{title}}' 2>/dev/null || true"
], function(t){ media.text = t })
}
// Volume (pamixer)
Text {
id: vol; font.pixelSize: 12; color: "#e0e0e0"; text: ""
MouseArea { anchors.fill: parent; onWheel: (wheel.angleDelta.y>0)
? run(["pamixer","-i","3"]) : run(["pamixer","-d","3"]) }
onPressed: run(["pamixer","-t"])
}
Timer {
interval: 800; running: true; repeat: true
onTriggered: pipe(["bash","-lc",
"if pamixer --get-mute; then echo ' Mute'; else echo \" $(pamixer --get-volume)%\"; fi"
], function(t){ vol.text = t })
}
// Network (nmcli)
Text {
id: net; font.pixelSize: 12; color: "#b0b0b0"; text: ""
MouseArea { anchors.fill: parent; onClicked: run(["nm-connection-editor"]) }
}
Timer {
interval: 2500; running: true; repeat: true
onTriggered: pipe(["bash","-lc",
"nmcli -t -f NAME,TYPE,DEVICE,STATE connection show --active | awk -F: 'NR==1{print $1\" (\"$2\")\"}' || true"
], function(t){ net.text = t || "offline" })
}
// Battery (upower/sysfs)
Text { id: bat; font.pixelSize: 12; color: "#b0e08a"; text: "" }
Timer {
interval: 3000; running: true; repeat: true
onTriggered: pipe(["bash","-lc",
"cap=$(cat /sys/class/power_supply/BAT*/capacity 2>/dev/null | head -n1); " +
"stat=$(cat /sys/class/power_supply/BAT*/status 2>/dev/null | head -n1); " +
"if [ -n \"$cap\" ]; then echo \"$stat $cap%\"; fi"
], function(t){ bat.text = t || "" })
}
// Clock
Text {
id: clock; font.pixelSize: 12; color: "#eeeeee"
}
Timer {
interval: 1000; running: true; repeat: true
onTriggered: pipe(["date","+%a %b %d %H:%M:%S"], function(t){ clock.text = t })
}
}
}
}
}
}
'';
}

View File

@ -1,24 +1,30 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = pkgs.lib.importTOML ./xbazzi_starship.toml;
# username = {
# style_user = "blue bold";
# style_root = "red bold";
# format = "[$user]($style) ";
# disabled = false;
# show_always = true;
# };
# hostname = {
# ssh_only = false;
# ssh_symbol = "🌐 ";
# format = "on [$hostname](bold red) ";
# trim_at = ".local";
# disabled = false;
# };
# username = {
# style_user = "blue bold";
# style_root = "red bold";
# format = "[$user]($style) ";
# disabled = false;
# show_always = true;
# };
# hostname = {
# ssh_only = false;
# ssh_symbol = "🌐 ";
# format = "on [$hostname](bold red) ";
# trim_at = ".local";
# disabled = false;
# };
};
# home.sessionVariables = {
# STARSHIP_CONFIG = "/home/xbazzi/.config/starship.toml";

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
# Home Manager can also manage your environment variables through

View File

@ -1,4 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.vim = {

View File

@ -1,32 +1,32 @@
{ pkgs, ... }:
{
programs.waybar = {
enable = true;
# settings = [
# {
# main.modules-right = ["clock"];
# layer = "top";
# position = "top";
# modules-left = [ "hyprland/workspaces" "clock" ];
# modules-center = [ "window" ];
# modules-right = [ "battery" "pulseaudio" "network" ];
# }
# ];
# style = ''
# * {
# font-family: "JetBrainsMono Nerd Font", monospace;
# font-size: 12px;
# }
# #workspaces button.active {
# background-color: #ff5555;
# }
# '';
# settings = [ ./waybar/config.jsonc ];
settings = [
(builtins.fromJSON (builtins.readFile ./waybar/config.json))
];
# {
# programs.waybar = {
# enable = true;
# # settings = [
# # {
# # main.modules-right = ["clock"];
# # layer = "top";
# # position = "top";
# # modules-left = [ "hyprland/workspaces" "clock" ];
# # modules-center = [ "window" ];
# # modules-right = [ "battery" "pulseaudio" "network" ];
# # }
# # ];
# # style = ''
# # * {
# # font-family: "JetBrainsMono Nerd Font", monospace;
# # font-size: 12px;
# # }
# # #workspaces button.active {
# # background-color: #ff5555;
# # }
# # '';
# # settings = [ ./waybar/config.jsonc ];
# settings = [
# (builtins.fromJSON (builtins.readFile ./waybar/config.json))
# ];
style = ./waybar/style.css;
};
}
# style = ./waybar/style.css;
# };
# }

View File

@ -27,10 +27,10 @@ window#waybar {
background: rgba(94, 129, 172, 0.5);
}
#clock, #cpu, #memory, #temperature, #pulseaudio, #network, #custom-windowtitle {
/* #clock, #cpu, #memory, #temperature, #pulseaudio, #network, #custom-windowtitle {
padding: 0 8px;
color: #eceff4;
}
} */
#tray {
padding-left: 6px;

View File

@ -1,6 +1,10 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
programs.zsh = {
@ -58,23 +62,27 @@
ansible-vault edit "$FINAL_PATH" \
--vault-password-file "$HOME/.ansible-vault-key"
}
'';
'';
history.size = 10000;
history.ignoreAllDups = true;
history.path = "$HOME/.zsh_history";
history.ignorePatterns = ["rm *" "pkill *" "cp *"];
history.ignorePatterns = [
"rm *"
"pkill *"
"cp *"
];
shellAliases =
shellAliases =
let
flakePath = "~/nixos-config";
in
{
# la="eza -s modified -r -lh";
cb="cmake -B build -S . && cmake --build build -j$(nproc)";
la="eza -s modified -lhr --icons --git";
ls="eza -lh --group-directories-first --icons --git";
clipboard="xclip -selection clipboard";
cb = "cmake -B build -S . && cmake --build build -j$(nproc)";
la = "eza -s modified -lhr --icons --git";
ls = "eza -lh --group-directories-first --icons --git";
clipboard = "xclip -selection clipboard";
ll = "\\ls -lath";
update = "sudo nixos-rebuild switch";
# la = "ls -lAth";

View File

@ -6,134 +6,177 @@ let
# The fetchers. fetch_<type> fetches specs of type <type>.
#
fetch_file = pkgs: name: spec:
fetch_file =
pkgs: name: spec:
let
name' = sanitizeName name + "-src";
in
if spec.builtin or true then
builtins_fetchurl { inherit (spec) url sha256; name = name'; }
builtins_fetchurl {
inherit (spec) url sha256;
name = name';
}
else
pkgs.fetchurl { inherit (spec) url sha256; name = name'; };
pkgs.fetchurl {
inherit (spec) url sha256;
name = name';
};
fetch_tarball = pkgs: name: spec:
fetch_tarball =
pkgs: name: spec:
let
name' = sanitizeName name + "-src";
in
if spec.builtin or true then
builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
builtins_fetchTarball {
name = name';
inherit (spec) url sha256;
}
else
pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
pkgs.fetchzip {
name = name';
inherit (spec) url sha256;
};
fetch_git = name: spec:
fetch_git =
name: spec:
let
ref =
spec.ref or (
if spec ? branch then "refs/heads/${spec.branch}" else
if spec ? tag then "refs/tags/${spec.tag}" else
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"
if spec ? branch then
"refs/heads/${spec.branch}"
else if spec ? tag then
"refs/tags/${spec.tag}"
else
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"
);
submodules = spec.submodules or false;
submoduleArg =
let
nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
emptyArgWithWarning =
if submodules
then
builtins.trace
(
"The niv input \"${name}\" uses submodules "
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
+ "does not support them"
)
{ }
else { };
if submodules then
builtins.trace (
"The niv input \"${name}\" uses submodules "
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
+ "does not support them"
) { }
else
{ };
in
if nixSupportsSubmodules
then { inherit submodules; }
else emptyArgWithWarning;
if nixSupportsSubmodules then { inherit submodules; } else emptyArgWithWarning;
in
builtins.fetchGit
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
builtins.fetchGit (
{
url = spec.repo;
inherit (spec) rev;
inherit ref;
}
// submoduleArg
);
fetch_local = spec: spec.path;
fetch_builtin-tarball = name: throw
''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`.
$ niv modify ${name} -a type=tarball -a builtin=true'';
fetch_builtin-tarball =
name:
throw ''
[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`.
$ niv modify ${name} -a type=tarball -a builtin=true'';
fetch_builtin-url = name: throw
''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`.
$ niv modify ${name} -a type=file -a builtin=true'';
fetch_builtin-url =
name:
throw ''
[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`.
$ niv modify ${name} -a type=file -a builtin=true'';
#
# Various helpers
#
# https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695
sanitizeName = name:
(
concatMapStrings (s: if builtins.isList s then "-" else s)
(
builtins.split "[^[:alnum:]+._?=-]+"
((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name)
)
);
sanitizeName =
name:
(concatMapStrings (s: if builtins.isList s then "-" else s) (
builtins.split "[^[:alnum:]+._?=-]+" ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name)
));
# The set of packages used when specs are fetched using non-builtins.
mkPkgs = sources: system:
mkPkgs =
sources: system:
let
sourcesNixpkgs =
import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; };
sourcesNixpkgs = import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {
inherit system;
};
hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
hasThisAsNixpkgsPath = <nixpkgs> == ./.;
in
if builtins.hasAttr "nixpkgs" sources
then sourcesNixpkgs
else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
if builtins.hasAttr "nixpkgs" sources then
sourcesNixpkgs
else if hasNixpkgsPath && !hasThisAsNixpkgsPath then
import <nixpkgs> { }
else
abort
''
Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
add a package called "nixpkgs" to your sources.json.
'';
abort ''
Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
add a package called "nixpkgs" to your sources.json.
'';
# The actual fetching function.
fetch = pkgs: name: spec:
fetch =
pkgs: name: spec:
if ! builtins.hasAttr "type" spec then
if !builtins.hasAttr "type" spec then
abort "ERROR: niv spec ${name} does not have a 'type' attribute"
else if spec.type == "file" then fetch_file pkgs name spec
else if spec.type == "tarball" then fetch_tarball pkgs name spec
else if spec.type == "git" then fetch_git name spec
else if spec.type == "local" then fetch_local spec
else if spec.type == "builtin-tarball" then fetch_builtin-tarball name
else if spec.type == "builtin-url" then fetch_builtin-url name
else if spec.type == "file" then
fetch_file pkgs name spec
else if spec.type == "tarball" then
fetch_tarball pkgs name spec
else if spec.type == "git" then
fetch_git name spec
else if spec.type == "local" then
fetch_local spec
else if spec.type == "builtin-tarball" then
fetch_builtin-tarball name
else if spec.type == "builtin-url" then
fetch_builtin-url name
else
abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
# If the environment variable NIV_OVERRIDE_${name} is set, then use
# the path directly as opposed to the fetched source.
replace = name: drv:
replace =
name: drv:
let
saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name;
ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
in
if ersatz == "" then drv else
# this turns the string into an actual Nix path (for both absolute and
# relative paths)
if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";
if ersatz == "" then
drv
else
# this turns the string into an actual Nix path (for both absolute and
# relative paths)
if builtins.substring 0 1 ersatz == "/" then
/. + ersatz
else
/. + builtins.getEnv "PWD" + "/${ersatz}";
# Ports of functions for older nix versions
# a Nix version of mapAttrs if the built-in doesn't exist
mapAttrs = builtins.mapAttrs or (
f: set: with builtins;
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
);
mapAttrs =
builtins.mapAttrs or (
f: set:
with builtins;
listToAttrs (
map (attr: {
name = attr;
value = f attr set.${attr};
}) (attrNames set)
)
);
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
range = first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1);
range =
first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1);
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
@ -147,7 +190,12 @@ let
optionalAttrs = cond: as: if cond then as else { };
# fetchTarball version that is compatible between all the versions of Nix
builtins_fetchTarball = { url, name ? null, sha256 }@attrs:
builtins_fetchTarball =
{
url,
name ? null,
sha256,
}@attrs:
let
inherit (builtins) lessThan nixVersion fetchTarball;
in
@ -157,7 +205,12 @@ let
fetchTarball attrs;
# fetchurl version that is compatible between all the versions of Nix
builtins_fetchurl = { url, name ? null, sha256 }@attrs:
builtins_fetchurl =
{
url,
name ? null,
sha256,
}@attrs:
let
inherit (builtins) lessThan nixVersion fetchurl;
in
@ -167,26 +220,25 @@ let
fetchurl attrs;
# Create the final "sources" from the config
mkSources = config:
mapAttrs
(
name: spec:
if builtins.hasAttr "outPath" spec
then
abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = replace name (fetch config.pkgs name spec); }
)
config.sources;
mkSources =
config:
mapAttrs (
name: spec:
if builtins.hasAttr "outPath" spec then
abort "The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = replace name (fetch config.pkgs name spec); }
) config.sources;
# The "config" used by the fetchers
mkConfig =
{ sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null
, sources ? if sourcesFile == null then { } else builtins.fromJSON (builtins.readFile sourcesFile)
, system ? builtins.currentSystem
, pkgs ? mkPkgs sources system
}: rec {
{
sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null,
sources ? if sourcesFile == null then { } else builtins.fromJSON (builtins.readFile sourcesFile),
system ? builtins.currentSystem,
pkgs ? mkPkgs sources system,
}:
rec {
# The sources, i.e. the attribute set of spec name to spec
inherit sources;

View File

@ -1,4 +1,3 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
@ -7,7 +6,8 @@ let
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
in
{
inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"];
nix.settings.substituters = [ "https://cache.nixos.org/" ];
}

View File

@ -1,4 +1,3 @@
{
nix = {
settings = {

View File

@ -5,12 +5,14 @@
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
imports = [
./hardware-configuration.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# OpenRGB
services.hardware.openrgb.enable = true;
@ -18,8 +20,8 @@
# Hyprland
programs.hyprland.enable = true;
programs.hyprlock.enable = true;
programs.waybar.enable = true;
security.pam.services.hyprlock = {};
# programs.waybar.enable = true;
security.pam.services.hyprlock = { };
services.gnome.gnome-keyring.enable = true;
security.pam.services.hyprlock.enableGnomeKeyring = true;
services.greetd.enable = true;
@ -27,23 +29,26 @@
default_session = {
# GUI greeter
#command = "${pkgs.greetd.gtkgreet}/bin/gtkgreet -c hyprland";
command = "${pkgs.greetd.gtkgreet}/bin/gtkgreet -c 'Hyprland'";
# command = "${pkgs.greetd.gtkgreet}/bin/gtkgreet -c 'Hyprland'";
# TUI greeter
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember \
# --cmd 'dbus-run-session ${pkgs.hyprland}/bin/Hyprland'";
# user = "greeter";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember \
--cmd 'dbus-run-session ${pkgs.hyprland}/bin/Hyprland'";
user = "greeter";
};
};
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
};
# Bootloader.
@ -53,7 +58,7 @@
boot.loader.efi.efiSysMountPoint = "/boot";
# systemd
systemd.network.wait-online.timeout = 10;
systemd.network.wait-online.timeout = 5;
# Set your time zone.
time.timeZone = "America/Denver";
@ -128,9 +133,9 @@
users.users.xbazzi = {
isNormalUser = true;
description = "Xander Bazzi";
extraGroups = [
extraGroups = [
"docker"
"networkmanager"
"networkmanager"
"wheel"
"wireshark"
];

View File

@ -1,22 +1,21 @@
{ config, pkgs, ... }:
{
imports =
[
./configuration.nix
./fonts.nix
./ssh.nix
# ./openrgb.nix
# ./stylix.nix
# ./gnome.nix
# ./lanzaboote.nix
./yazi.nix
./nvidia.nix
./network.nix
./nfs.nix
./packages.nix
./services.nix
./vscode.nix
./cachix.nix
];
imports = [
./configuration.nix
./fonts.nix
./ssh.nix
# ./openrgb.nix
# ./stylix.nix
# ./gnome.nix
# ./lanzaboote.nix
./yazi.nix
./nvidia.nix
./network.nix
./nfs.nix
./packages.nix
./services.nix
./vscode.nix
./cachix.nix
];
}

View File

@ -1,19 +1,22 @@
{ config, pkgs, ... }:
{
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.sauce-code-pro
# nerd-fonts._Oxproto
nerd-fonts.space-mono
nerd-fonts.droid-sans-mono
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
monaspace
] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
}
fonts.packages =
with pkgs;
[
nerd-fonts.fira-code
nerd-fonts.sauce-code-pro
# nerd-fonts._Oxproto
nerd-fonts.space-mono
nerd-fonts.droid-sans-mono
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
monaspace
]
++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
}

View File

@ -8,22 +8,23 @@
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
environment.systemPackages = (with pkgs.gnomeExtensions; [
blur-my-shell
pop-shell
tactile
pop-shell
space-bar
undecorate
pastafarian-holy-days
just-perfection
appindicator
]) ++ (with pkgs; [
#vimix-cursors
# breeze-icons
tokyonight-gtk-theme
# gnome-tweaks
# adwaita-icon-theme
]);
environment.systemPackages =
(with pkgs.gnomeExtensions; [
blur-my-shell
pop-shell
tactile
pop-shell
space-bar
undecorate
pastafarian-holy-days
just-perfection
appindicator
])
++ (with pkgs; [
#vimix-cursors
# breeze-icons
tokyonight-gtk-theme
# gnome-tweaks
# adwaita-icon-theme
]);
}

View File

@ -1,32 +1,50 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d1210185-1181-47af-bebc-1b07ce66ad82";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/d1210185-1181-47af-bebc-1b07ce66ad82";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F253-5DFF";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/F253-5DFF";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [{
swapDevices = [
{
device = "/dev/disk/by-uuid/e2e8a734-702b-43a7-b645-cf239309b070";
}];
}
];
# 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

View File

@ -1,7 +1,7 @@
{ pkgs, lib, ... }:
let
sources = import ./nix/sources.nix;
lanzaboote = import sources.lanzaboote;
sources = import ./nix/sources.nix;
lanzaboote = import sources.lanzaboote;
in
{
imports = [ lanzaboote.nixosModules.lanzaboote ];
@ -16,4 +16,4 @@ in
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}
}

View File

@ -1,21 +1,28 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}:
{
# Enable networking
# networking.networkmanager.enable = true;
# systemd.services."NetworkManager-wait-online" = {
# serviceConfig.TimeoutStartSec = "20s";
# };
networking = {
useDHCP = false;
hostName = "nixos";
wireless.enable = false;
interfaces.enp6s0f0 = {
ipv4.addresses = [{
address = "10.29.90.100";
prefixLength = 22;
}];
ipv4.addresses = [
{
address = "10.29.90.100";
prefixLength = 22;
}
];
mtu = 9000;
};
defaultGateway = {

View File

@ -40,6 +40,6 @@
"noauto"
"rw"
"vers=4"
];
];
};
}

View File

@ -1,4 +1,9 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}:
{
# NVIDIA stuff

View File

@ -1,33 +1,34 @@
{ pkgs, lib, ... }:
{ }
{
# {
# OpenRGB
services.hardware.openrgb.enable = true;
# services.hardware.openrgb.enable = true;
# NO RGB
let
no-rgb = pkgs.writeScriptBin "no-rgb" ''
#!/bin/sh
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l)
# # NO RGB
# let
# no-rgb = pkgs.writeScriptBin "no-rgb" ''
# #!/bin/sh
# NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l)
for i in $(seq 0 $(($NUM_DEVICES - 1))); do
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000
done
'';
in {
config = {
services.udev.packages = [ pkgs.openrgb ];
boot.kernelModules = [ "i2c-dev" ];
hardware.i2c.enable = true;
# for i in $(seq 0 $(($NUM_DEVICES - 1))); do
# ${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000
# done
# '';
# in {
# config = {
# services.udev.packages = [ pkgs.openrgb ];
# boot.kernelModules = [ "i2c-dev" ];
# hardware.i2c.enable = true;
systemd.services.no-rgb = {
description = "no-rgb";
serviceConfig = {
ExecStart = "${no-rgb}/bin/no-rgb";
Type = "oneshot";
};
wantedBy = [ "multi-user.target" ];
};
};
}
}
# systemd.services.no-rgb = {
# description = "no-rgb";
# serviceConfig = {
# ExecStart = "${no-rgb}/bin/no-rgb";
# Type = "oneshot";
# };
# wantedBy = [ "multi-user.target" ];
# };
# };
# }
# }

View File

@ -5,7 +5,7 @@
ansible
niv
sbctl
vim
vim
wget
xournalpp
obsidian
@ -53,6 +53,7 @@
# firefox
direnv
jq
nixfmt
# Hyprland Ecosystem
hyprpaper
@ -73,7 +74,7 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Install Steam
programs.steam = {
enable = true;

View File

@ -1,6 +1,5 @@
{ config, pkgs, ... }:
{
# Enable the OpenSSH daemon.
services.openssh = {

View File

@ -1,96 +1,96 @@
{ config, pkgs, ... }:
{
programs.ssh.extraConfig = ''
Host fw-mgmt
HostName fw-mgmt
ForwardAgent yes
User xbazzi
Port 22
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
programs.ssh.extraConfig = ''
Host fw-mgmt
HostName fw-mgmt
ForwardAgent yes
User xbazzi
Port 22
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host db1-mgmt
HostName db1-mgmt
ForwardAgent yes
User xbazzi
Port 22
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host db1-mgmt
HostName db1-mgmt
ForwardAgent yes
User xbazzi
Port 22
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host gitgud.foo
HostName prod1.lan.xbazzi.com
User git
Port 2222
PubkeyAuthentication yes
ForwardAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/gt_id_ed25519
Host gitgud.foo
HostName prod1.lan.xbazzi.com
User git
Port 2222
PubkeyAuthentication yes
ForwardAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/gt_id_ed25519
Host prod1
HostName prod1
ForwardAgent yes
Port 22222
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod1
HostName prod1
ForwardAgent yes
Port 22222
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod3-mgmt
HostName prod3-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod3-mgmt
HostName prod3-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2-mgmt
HostName prod2-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2-mgmt
HostName prod2-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2
HostName prod2
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2
HostName prod2
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host nas-mgmt
HostName nas-mgmt
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host nas-mgmt
HostName nas-mgmt
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host nas
HostName nas
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host nas
HostName nas
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host school
HostName school
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host school
HostName school
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host ext1-mgmt
HostName ext1-mgmt
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
'';
}
Host ext1-mgmt
HostName ext1-mgmt
ForwardAgent yes
User xbazzi
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
'';
}

View File

@ -1,65 +1,74 @@
{ inputs, pkgs, lib, config, ... }:
{
inputs,
pkgs,
lib,
config,
...
}:
{
environment.systemPackages = with pkgs; [
(vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; [
redhat.vscode-yaml
redhat.ansible
bbenoist.nix
ms-python.python
ms-azuretools.vscode-docker
ms-vscode-remote.remote-ssh
golang.go
ms-vscode.cpptools
ms-vsliveshare.vsliveshare
bbenoist.nix
ms-python.python
vscodevim.vim
enkia.tokyo-night
yzhang.markdown-all-in-one
vscode-icons-team.vscode-icons
ms-vscode-remote.remote-containers
bmewburn.vscode-intelephense-client
zxh404.vscode-proto3
twxs.cmake
# arrterian.nix-env-selector
mkhl.direnv
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "remote-ssh-edit";
publisher = "ms-vscode-remote";
version = "0.47.2";
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
}
# {
# name = "sukumo28.wav-preview";
# publisher = "sukumo28";
# version = "2.6.0";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
# {
# name = "vsliveshare";
# publisher = "ms-vsliveshare";
# version = "1.0.5948"; # replace with the latest version
# sha256 = "KOu9zF5l6MTLU8z/l4xBwRl2X3uIE15YgHEZJrKSHGY="; # replace with the calculated hash
# }
{
name = "glassit";
publisher = "s-nlf-fh";
version = "0.2.6";
#sha256 = "lcaomgk91hnjwqaw4i0fagtowr8kwv7zhvgcgkokkuy=";
sha256 = "LcAomgK91hnJWqAW4I0FAgTOwr8Kwv7ZhvGCgkokKuY=";
}
{
name = "vscode-postgres";
publisher = "ckolkman";
version = "1.4.3";
sha256 = "OCy2Nc35vmynoKxoUoTL2qyUoiByTMMPebEjySIZihQ=";
environment.systemPackages = with pkgs; [
(vscode-with-extensions.override {
vscodeExtensions =
with vscode-extensions;
[
redhat.vscode-yaml
redhat.ansible
ms-python.python
ms-azuretools.vscode-docker
ms-vscode-remote.remote-ssh
golang.go
ms-vscode.cpptools
ms-vsliveshare.vsliveshare
ms-python.python
vscodevim.vim
enkia.tokyo-night
yzhang.markdown-all-in-one
vscode-icons-team.vscode-icons
ms-vscode-remote.remote-containers
bmewburn.vscode-intelephense-client
jnoortheen.nix-ide
zxh404.vscode-proto3
twxs.cmake
# arrterian.nix-env-selector
# bbenoist.nix
mkhl.direnv
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "remote-ssh-edit";
publisher = "ms-vscode-remote";
version = "0.47.2";
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
}
# {
# name = "sukumo28.wav-preview";
# publisher = "sukumo28";
# version = "2.6.0";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
}
];
})
];
# {
# name = "vsliveshare";
# publisher = "ms-vsliveshare";
# version = "1.0.5948"; # replace with the latest version
# sha256 = "KOu9zF5l6MTLU8z/l4xBwRl2X3uIE15YgHEZJrKSHGY="; # replace with the calculated hash
# }
{
name = "glassit";
publisher = "s-nlf-fh";
version = "0.2.6";
#sha256 = "lcaomgk91hnjwqaw4i0fagtowr8kwv7zhvgcgkokkuy=";
sha256 = "LcAomgK91hnJWqAW4I0FAgTOwr8Kwv7ZhvGCgkokKuY=";
}
{
name = "vscode-postgres";
publisher = "ckolkman";
version = "1.4.3";
sha256 = "OCy2Nc35vmynoKxoUoTL2qyUoiByTMMPebEjySIZihQ=";
}
];
})
];
}