This commit is contained in:
Hadi
2024-06-08 01:56:21 +02:00
parent 1ccb720f3b
commit 88fb9d078b
31 changed files with 200 additions and 48 deletions

View File

@@ -3,10 +3,10 @@ let variable = import ../variables.nix;
in {
imports = [
./themes/laptop.nix
./system/laptop.nix
./scripts/laptop.nix
./apps/laptop.nix
./themes/nixy.nix
];
home = {
@@ -44,6 +44,7 @@ in {
curl
neovide
wf-recorder
glow
# Just cool
peaclock

View File

@@ -0,0 +1,39 @@
{ pkgs, config, ... }:
let
homedir = config.home.homeDirectory;
heaven-rebuild = pkgs.writeShellScriptBin "heaven-rebuild" ''
sudo nixos-rebuild switch --flake ${homedir}/.config/nixos#heaven
'';
heaven-upgrade = pkgs.writeShellScriptBin "heaven-upgrade" ''
sudo nixos-rebuild switch --upgrade --flake ${homedir}/.config/nixos#heaven
'';
heaven-update = pkgs.writeShellScriptBin "heaven-update" ''
cd ${homedir}/.config/nixos && sudo nix flake update
'';
heaven-gc = pkgs.writeShellScriptBin "heaven-gc" ''
cd ${homedir}/.config/nixos && sudo nix-collect-garbage -d
'';
heaven-cb = pkgs.writeShellScriptBin "heaven-cb" ''
sudo /run/current-system/bin/switch-to-configuration boot
'';
remote-rebuild = pkgs.writeShellScriptBin "remote-rebuild" ''
ssh -t heaven "cd ~/.config/nixos && git pull && heaven-rebuild"
'';
in {
home.packages = with pkgs; [
heaven-rebuild
heaven-upgrade
heaven-update
heaven-gc
heaven-cb
remote-rebuild
];
}

View File

@@ -11,7 +11,6 @@
./nerdfont_fzf
./system
./compress
./misc.nix
./misc
];
}

View File

@@ -26,31 +26,6 @@ let
nixy-push = pkgs.writeShellScriptBin "nixy-push" ''
cd ~/.config/nixos && git add . && git commit -m ''${1:-Update} && git push
'';
heaven-rebuild = pkgs.writeShellScriptBin "heaven-rebuild" ''
sudo nixos-rebuild switch --flake ${homedir}/.config/nixos#heaven
'';
heaven-upgrade = pkgs.writeShellScriptBin "heaven-upgrade" ''
sudo nixos-rebuild switch --upgrade --flake ${homedir}/.config/nixos#heaven
'';
heaven-update = pkgs.writeShellScriptBin "heaven-update" ''
cd ${homedir}/.config/nixos && sudo nix flake update
'';
heaven-gc = pkgs.writeShellScriptBin "heaven-gc" ''
cd ${homedir}/.config/nixos && sudo nix-collect-garbage -d
'';
heaven-cb = pkgs.writeShellScriptBin "heaven-cb" ''
sudo /run/current-system/bin/switch-to-configuration boot
'';
remote-rebuild = pkgs.writeShellScriptBin "remote-rebuild" ''
ssh -t heaven "cd ~/.config/nixos && git pull && heaven-rebuild"
'';
in {
home.packages = with pkgs; [
nixy-rebuild
@@ -59,11 +34,5 @@ in {
nixy-gc
nixy-cb
nixy-push
heaven-rebuild
heaven-upgrade
heaven-update
heaven-gc
heaven-cb
remote-rebuild
];
}

View File

@@ -3,10 +3,10 @@ let variable = import ../variables.nix;
in {
imports = [
./themes/server.nix
./system/server.nix
./scripts/server.nix
./apps/server.nix
./themes/wip.nix
];
home = {

View File

@@ -4,9 +4,48 @@ in {
enable = true;
userName = variable.git.username;
userEmail = variable.git.email;
ignores = [
".cache/"
".DS_Store"
".idea/"
"*.swp"
"*.elc"
"auto-save-list"
".direnv/"
"node_modules"
"result"
"result-*"
];
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
aliases = {
essa = "push --force";
co = "checkout";
fuck = "commit --amend -m";
c = "commit -m";
ca = "commit -am";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
d = "diff";
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
st = "status";
br = "branch";
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
hist = ''
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
llog = ''
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
edit-unmerged =
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
};
};
}

64
home/themes/heaven.nix Normal file
View File

@@ -0,0 +1,64 @@
{
imports = [ ./config/template.nix ./config/load_colors.nix ];
theme = {
wallpaper = "default.png";
font-mono = "FiraCode Nerd Font Mono";
font = "SFProDisplay Nerd Font";
rounding = 12;
gaps-in = 10;
gaps-out = 20;
border-size = 3;
neofetch = "nerdfetch";
waybar = {
transparent = true;
float = true;
};
colors = {
bg = "040409";
fg = "FCFCFC";
alt-bg = "101012";
alt-fg = "ECECEC";
primary-ansi-16 = "red";
primary-bg = "a158ff";
primary-fg = "000000";
secondary-bg = "4928B8";
secondary-fg = "000000";
# Black
color0 = "000000";
# Red
color1 = "f7768e";
# Green
color2 = "73daca";
# Yellow
color3 = "e0af68";
# Blue
color4 = "7aa2f7";
# Magenta
color5 = "a158ff";
# Cyan
color6 = "7dcfff";
# White
color7 = "E4E5E7";
# Bright
color8 = "515878";
color9 = "f7869e";
color10 = "83eada";
color11 = "f0bf78";
color12 = "8ab2f7";
color13 = "A988F8";
color14 = "8ddfff";
color15 = "f4f5f7";
};
};
}

View File

@@ -1 +0,0 @@
{ ... }: { imports = [ ./nixy.nix ./wallpapers ./config/load_colors.nix ]; }

View File

@@ -1,5 +1,5 @@
{
imports = [ ./config/template.nix ];
imports = [ ./config/template.nix ./config/load_colors.nix ];
theme = {
wallpaper = "default.png";

View File

@@ -1 +0,0 @@
{ ... }: { imports = [ ./wip.nix ./config/load_colors.nix ]; }

View File

Before

Width:  |  Height:  |  Size: 3.7 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

View File

Before

Width:  |  Height:  |  Size: 7.1 MiB

After

Width:  |  Height:  |  Size: 7.1 MiB

View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

Before

Width:  |  Height:  |  Size: 13 MiB

After

Width:  |  Height:  |  Size: 13 MiB

View File

Before

Width:  |  Height:  |  Size: 826 KiB

After

Width:  |  Height:  |  Size: 826 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

View File

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

Before

Width:  |  Height:  |  Size: 378 KiB

After

Width:  |  Height:  |  Size: 378 KiB

View File

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 641 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 8.6 MiB

After

Width:  |  Height:  |  Size: 8.6 MiB

View File

@@ -1,5 +1,5 @@
{
imports = [ ./config/template.nix ];
imports = [ ./config/template.nix ./config/load_colors.nix ];
theme = {
wallpaper = "Fuji-Light.png";