This commit is contained in:
DACHXY 2024-12-28 20:16:33 +08:00
parent 04a4c8d998
commit fd48df0d43
5 changed files with 124 additions and 12 deletions

93
flake.lock generated
View file

@ -83,6 +83,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"flake-compat": "flake-compat",
@ -534,6 +552,22 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -567,7 +601,29 @@
"hyprland-plugins": "hyprland-plugins",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable_2"
"nixpkgs-unstable": "nixpkgs-unstable_2",
"yazi": "yazi"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"yazi",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729391507,
"narHash": "sha256-as0I9xieJUHf7kiK2a9znDsVZQTFWhM1pLivII43Gi0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "784981a9feeba406de38c1c9a3decf966d853cca",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
@ -600,6 +656,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
@ -641,6 +712,26 @@
"type": "github"
}
},
"yazi": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1735318734,
"narHash": "sha256-p9VfYkunTS8OWo2R1Mvs4pqs/Ymn50KmmSCHyu/UPmA=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "2770e0259cc83d91b7877b412a27db2dcb1c9427",
"type": "github"
},
"original": {
"owner": "sxyazi",
"repo": "yazi",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": [

View file

@ -4,8 +4,10 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
@ -13,6 +15,11 @@
url = "github:ghostty-org/ghostty";
};
yazi = {
url = "github:sxyazi/yazi";
};
# Not used yet due to some skill issue
hyprland.url = "github:hyprwm/Hyprland/main";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
@ -28,7 +35,7 @@
{ self, nixpkgs-unstable, nixpkgs, nix-index-database, ... }@inputs:
let
system = "x86_64-linux";
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = nixpkgs.legacyPackages.${system};
pkgsUnstable = nixpkgs-unstable.legacyPackages.${system};
in
{
@ -44,6 +51,8 @@
inherit inputs;
inherit pkgsUnstable;
inherit system;
inherit pkgs;
inherit pkgsUnstable;
};
};
@ -55,6 +64,9 @@
specialArgs = {
inherit inputs;
inherit pkgsUnstable;
inherit system;
inherit pkgs;
inherit pkgsUnstable;
};
};

View file

@ -1,14 +1,6 @@
{ pkgs, ... }:
let
shellAlias = {
ls = "exa";
cat = "bat";
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
fullClean = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
setWindows = "sudo bootctl set-oneshot auto-windows";
goWin = "sudo bootctl set-oneshot auto-windows && reboot";
goBios = "sudo bootctl set-onshot auto-reboot-to-firmware-setup && reboot";
};
shellAlias = import ./shellAlias.nix;
in
{
programs = {

17
home/user/shellAlias.nix Normal file
View file

@ -0,0 +1,17 @@
{
ls = "exa";
cat = "bat";
y = "yazi";
g = "git";
cd = "z"; # Zoxide
t = "tmux";
# Nixos
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
fullClean = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
# Systemd Boot
setWin = "sudo bootctl set-oneshot auto-windows";
goWin = "sudo bootctl set-oneshot auto-windows && reboot";
goBios = "sudo bootctl set-onshot auto-reboot-to-firmware-setup && reboot";
}

View file

@ -14,7 +14,6 @@
btop
eza
fzf
ranger # Terminal file manager
neofetch
ripgrep
tree
@ -85,6 +84,7 @@
vlc
]) ++ ([
inputs.ghostty.packages.x86_64-linux.default
inputs.yazi.packages.x86_64-linux.default # Terminal file manager
]);
}