Compare commits
No commits in common. "5bda371af0209c2fd842014760a4bf0b5b43808b" and "bf8818fbb3940f1c4ef125cece0b0798a12f85a2" have entirely different histories.
5bda371af0
...
bf8818fbb3
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
laptop.qcow2
|
|
||||||
@ -7,8 +7,4 @@ git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1
|
|||||||
sudo nixos-rebuild switch --flake ~/dotfiles#laptop
|
sudo nixos-rebuild switch --flake ~/dotfiles#laptop
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
|
||||||
nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480
|
|
||||||
```
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|||||||
@ -54,11 +54,8 @@
|
|||||||
|
|
||||||
shell = "bash"; # bash, zsh
|
shell = "bash"; # bash, zsh
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
browser = "librewolf";
|
|
||||||
editor = "neovim";
|
|
||||||
|
|
||||||
# List all themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
|
theme = "catppuccin-mocha";
|
||||||
theme = "catppuccin-mocha"; #tokyo-night-dark, one-dark
|
|
||||||
background = "aurora_borealis.png";
|
background = "aurora_borealis.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,7 +79,6 @@
|
|||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable userSettings;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
@ -95,7 +91,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
leanix = nixpkgs.lib.nixosSystem {
|
leanix = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable userSettings;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -36,6 +36,8 @@
|
|||||||
# Environment variables
|
# Environment variables
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
||||||
|
|
||||||
|
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||||
};
|
};
|
||||||
|
|
||||||
# System level configuration
|
# System level configuration
|
||||||
|
|||||||
@ -13,7 +13,6 @@
|
|||||||
home.packages =
|
home.packages =
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
librewolf
|
librewolf
|
||||||
qutebrowser
|
|
||||||
ferdium
|
ferdium
|
||||||
|
|
||||||
stellarium
|
stellarium
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
cliphist
|
cliphist
|
||||||
|
|
||||||
(writeShellScriptBin "dontkillsteam" ''
|
(writeShellScriptBin "dontkillsteam" ''
|
||||||
if [[ $(hyprctl activewindow -j | ${pkgs.jq}/bin/jq -r ".class") == "Steam" ]]; then
|
if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then
|
||||||
xdotool windowunmap $(xdotool getactivewindow)
|
xdotool windowunmap $(xdotool getactivewindow)
|
||||||
else
|
else
|
||||||
hyprctl dispatch killactive ""
|
hyprctl dispatch killactive ""
|
||||||
@ -37,14 +37,14 @@
|
|||||||
(writeShellScriptBin "screenshot" ''
|
(writeShellScriptBin "screenshot" ''
|
||||||
restore_shader() {
|
restore_shader() {
|
||||||
if [ -n "$shader" ]; then
|
if [ -n "$shader" ]; then
|
||||||
${pkgs.hyprshade}/bin/hyprshade on "$shader"
|
hyprshade on "$shader"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Saves the current shader and turns it off
|
# Saves the current shader and turns it off
|
||||||
save_shader() {
|
save_shader() {
|
||||||
shader=$(hyprshade current)
|
shader=$(hyprshade current)
|
||||||
${pkgs.hyprshade}/bin/hyprshade off
|
hyprshade off
|
||||||
trap restore_shader EXIT
|
trap restore_shader EXIT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
(writeShellScriptBin "keyboardswitch" ''
|
(writeShellScriptBin "keyboardswitch" ''
|
||||||
hyprctl switchxkblayout all next
|
hyprctl switchxkblayout all next
|
||||||
layMain=$(hyprctl -j devices | ${pkgs.jq}/bin/jq '.keyboards' | ${pkgs.jq}/bin/jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}')
|
layMain=$(hyprctl -j devices | jq '.keyboards' | jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}')
|
||||||
${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/icons/keyboard.svg
|
${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/icons/keyboard.svg
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
|||||||
@ -120,16 +120,16 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
#"discord --start-minimized"
|
"discord --start-minimized"
|
||||||
"${pkgs.vesktop}/bin/vesktop --start-minimized"
|
"vesktop --start-minimized"
|
||||||
"${pkgs.ferdium}/bin/ferdium --minimized"
|
"${pkgs.ferdium}/bin/ferdium --minimized"
|
||||||
"${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnect-indicator"
|
"${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnect-indicator"
|
||||||
|
|
||||||
"systemctl --user start hyprpolkitagent"
|
"systemctl --user start hyprpolkitagent"
|
||||||
#"swww-daemon --format xrgb"
|
#"swww-daemon --format xrgb"
|
||||||
#"swww ../../aurora_borealis.png"
|
#"swww ../../aurora_borealis.png"
|
||||||
"${pkgs.hypridle}/bin/hypridle"
|
"hypridle"
|
||||||
"${pkgs.waybar}/bin/waybar"
|
"waybar"
|
||||||
"swayosd-server"
|
"swayosd-server"
|
||||||
|
|
||||||
"blueman-applet"
|
"blueman-applet"
|
||||||
@ -149,7 +149,7 @@
|
|||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$term" = "${pkgs.kitty}/bin/kitty";
|
"$term" = "${pkgs.kitty}/bin/kitty";
|
||||||
"$editor" = "${pkgs.vscode}/bin/code";
|
"$editor" = "${pkgs.vscode}/bin/code";
|
||||||
"$file" = "${pkgs.nautilus}/bin/nautilus";
|
"$file" = "nautilus";
|
||||||
"$browser" = "${pkgs.librewolf}/bin/librewolf";
|
"$browser" = "${pkgs.librewolf}/bin/librewolf";
|
||||||
|
|
||||||
animations = {
|
animations = {
|
||||||
@ -226,21 +226,21 @@
|
|||||||
"$mod, W, togglefloating"
|
"$mod, W, togglefloating"
|
||||||
"$mod, G, togglegroup"
|
"$mod, G, togglegroup"
|
||||||
"Alt, Return, fullscreen"
|
"Alt, Return, fullscreen"
|
||||||
"$mod, Escape, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
"$mod, Escape, exec, hyprlock"
|
||||||
#"$mod+Shift,F, exec, windowpin.sh"
|
#"$mod+Shift,F, exec, windowpin.sh"
|
||||||
"$mod, Backspace, exec, ${pkgs.wlogout}/bin/wlogout -b 2"
|
"$mod, Backspace, exec, wlogout -b 2"
|
||||||
"$Ctrl+Alt, W, exec, killall waybar || ${pkgs.waybar}/bin/waybar" # toggle waybar
|
"$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar
|
||||||
|
|
||||||
"$mod, T, exec, $term"
|
"$mod, T, exec, $term"
|
||||||
"$mod, F, exec, $browser"
|
"$mod, F, exec, $browser"
|
||||||
"$mod, E, exec, $file"
|
"$mod, E, exec, $file"
|
||||||
"$mod, C, exec, $editor"
|
"$mod, C, exec, $editor"
|
||||||
"Ctrl+Shift, Escape, exec, ${pkgs.btop}/bin/btop"
|
"Ctrl+Shift, Escape, exec, btop"
|
||||||
|
|
||||||
# Rofi
|
# Rofi
|
||||||
"$mod, A, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show drun"
|
"$mod, A, exec, pkill -x rofi || rofi -show drun"
|
||||||
"$mod, Tab, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show window"
|
"$mod, Tab, exec, pkill -x rofi || rofi -show window"
|
||||||
"$mod+Shift, E, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show emoji"
|
"$mod+Shift, E, exec, pkill -x rofi || rofi -show emoji"
|
||||||
|
|
||||||
# Grouped Windows
|
# Grouped Windows
|
||||||
"$mod CTRL, H, changegroupactive, b"
|
"$mod CTRL, H, changegroupactive, b"
|
||||||
|
|||||||
@ -72,7 +72,7 @@
|
|||||||
programs.vscode.userSettings = {
|
programs.vscode.userSettings = {
|
||||||
"[python]" = {
|
"[python]" = {
|
||||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||||
"python.defaultInterpreterPath" = "${pkgs.python3}/bin/python";
|
"python.defaultInterpreterPath" = "${pkgs.python3}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -172,12 +172,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
(lib.mkIf config.program.vscode.markdown.enable {
|
(lib.mkIf config.program.vscode.markdown.enable {
|
||||||
programs.vscode.userSettings = {
|
|
||||||
"[markdown]" = {
|
|
||||||
"editor.defaultFormatter" = "DavidAnson.vscode-markdownlint";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.vscode.extensions = with pkgs-stable.vscode-extensions; [
|
programs.vscode.extensions = with pkgs-stable.vscode-extensions; [
|
||||||
yzhang.markdown-all-in-one
|
yzhang.markdown-all-in-one
|
||||||
davidanson.vscode-markdownlint
|
davidanson.vscode-markdownlint
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
config,
|
config,
|
||||||
userSettings,
|
userSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
program.git.enable = lib.mkEnableOption "enable git";
|
program.git.enable = lib.mkEnableOption "enable git";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,9 +5,6 @@
|
|||||||
./packages/steam.nix
|
./packages/steam.nix
|
||||||
./packages/tor.nix
|
./packages/tor.nix
|
||||||
./packages/virtual-machines.nix
|
./packages/virtual-machines.nix
|
||||||
./packages/yubikey.nix
|
|
||||||
|
|
||||||
./settings/default-applications.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
@ -18,7 +15,6 @@
|
|||||||
tor.enable = lib.mkDefault true;
|
tor.enable = lib.mkDefault true;
|
||||||
virt-manager.enable = lib.mkDefault true;
|
virt-manager.enable = lib.mkDefault true;
|
||||||
virtualbox.enable = lib.mkDefault true;
|
virtualbox.enable = lib.mkDefault true;
|
||||||
yubikey.enable = lib.mkDefault false;
|
|
||||||
};
|
};
|
||||||
sys.desktop.steamdeck.enable = lib.mkDefault false;
|
sys.desktop.steamdeck.enable = lib.mkDefault false;
|
||||||
programs.kdeconnect.enable = lib.mkDefault true;
|
programs.kdeconnect.enable = lib.mkDefault true;
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = {
|
|
||||||
program.yubikey = {
|
|
||||||
enable = lib.mkEnableOption "Enable YubiKey support";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.program.yubikey.enable {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
yubioath-flutter
|
|
||||||
yubikey-manager
|
|
||||||
pam_u2f
|
|
||||||
];
|
|
||||||
|
|
||||||
services.pcscd = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
#services.udev.packages = [pkgs.yubikey-personalization];
|
|
||||||
#
|
|
||||||
#services.yubikey-agent.enable = true;
|
|
||||||
#
|
|
||||||
#security.pam = {
|
|
||||||
# sshAgentAuth.enable = true;
|
|
||||||
# u2f = {
|
|
||||||
# enable = true;
|
|
||||||
# settings = {
|
|
||||||
# cue = false;
|
|
||||||
# authfile = "${config.home.homeDirectory}/.config/yubikeys/u2f_keys";
|
|
||||||
# # debug = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# services = {
|
|
||||||
# login.u2fAuth = true;
|
|
||||||
# sudo = {
|
|
||||||
# u2fAuth = true;
|
|
||||||
# sshAgentAuth = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
userSettings,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = {
|
|
||||||
default-applications.enable = lib.mkEnableOption "Enable default applications";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.default-applications.enable {
|
|
||||||
environment.sessionVariables = {
|
|
||||||
DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}";
|
|
||||||
TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}";
|
|
||||||
EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Default applications configuration
|
|
||||||
xdg.mime.enable = true;
|
|
||||||
xdg.mime.defaultApplications = {
|
|
||||||
"text/html" = "librewolf.desktop";
|
|
||||||
"x-scheme-handler/http" = "librewolf.desktop";
|
|
||||||
"x-scheme-handler/https" = "librewolf.desktop";
|
|
||||||
"x-scheme-handler/about" = "librewolf.desktop";
|
|
||||||
"x-scheme-handler/unknown" = "librewolf.desktop";
|
|
||||||
"text/plain" = "nvim.desktop";
|
|
||||||
"application/pdf" = "evince";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -14,6 +14,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
image = ../../../config/backgrounds/${userSettings.background};
|
image = ../../../config/backgrounds/${userSettings.background};
|
||||||
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/${userSettings.theme}.yaml"; # List all possible themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
|
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/${userSettings.theme}.yaml"; # List all possible themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
|
||||||
|
#base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
|
||||||
|
#base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
autoEnable = true;
|
autoEnable = true;
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,8 @@
|
|||||||
# Environment variables
|
# Environment variables
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
FLAKE = "/home/${userSettings.username}/dotfiles";
|
FLAKE = "/home/${userSettings.username}/dotfiles";
|
||||||
|
|
||||||
|
DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
|
||||||
};
|
};
|
||||||
|
|
||||||
# System level configuration
|
# System level configuration
|
||||||
@ -74,13 +76,24 @@
|
|||||||
tor.enable = true;
|
tor.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
virtualbox.enable = false;
|
virtualbox.enable = false;
|
||||||
yubikey.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Basic programs to enable
|
# Basic programs to enable
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
programs.wireshark.enable = true;
|
programs.wireshark.enable = true;
|
||||||
|
|
||||||
|
# Default applications configuration
|
||||||
|
xdg.mime.enable = true;
|
||||||
|
xdg.mime.defaultApplications = {
|
||||||
|
"text/html" = "librewolf.desktop";
|
||||||
|
"x-scheme-handler/http" = "librewolf.desktop";
|
||||||
|
"x-scheme-handler/https" = "librewolf.desktop";
|
||||||
|
"x-scheme-handler/about" = "librewolf.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "librewolf.desktop";
|
||||||
|
"text/plain" = "nvim.desktop";
|
||||||
|
"application/pdf" = "evince";
|
||||||
|
};
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user