home: sorting
|
@ -44,8 +44,6 @@ It just works™
|
|||
│ ├── nixos
|
||||
│ │
|
||||
│ ├── home-manager ### (User-specific) Home Manager configuration
|
||||
│ │ ├── darwin
|
||||
│ │ └── nixos
|
||||
│ │
|
||||
│ └── secrets ### User's secrets managed through sops-nix
|
||||
│
|
||||
|
|
11
flake.nix
|
@ -198,6 +198,8 @@
|
|||
# User
|
||||
./users/guanranwang/nixos/presets/desktop.nix
|
||||
./users/guanranwang/nixos/presets/core/clash-meta-client.nix
|
||||
./users/guanranwang/nixos/presets/desktop/gaming.nix
|
||||
./users/guanranwang/nixos/presets/desktop/torrenting.nix
|
||||
|
||||
# Hardware
|
||||
./machines/nixos/81fw-lenovo-legion-y7000
|
||||
|
@ -207,13 +209,6 @@
|
|||
networking.hostName = "81FW-NixOS"; # Hostname
|
||||
time.timeZone = "Asia/Shanghai"; # Timezone
|
||||
|
||||
### Home-Manager
|
||||
home-manager.users.guanranwang.imports = [
|
||||
./users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix
|
||||
./users/guanranwang/home-manager/nixos/presets/desktop/torrenting.nix
|
||||
];
|
||||
home-manager.extraSpecialArgs = {inherit spicetify-nix;}; # im consfused
|
||||
|
||||
### Options
|
||||
myFlake.nixos.boot.noLoaderMenu = true;
|
||||
myFlake.nixos.networking.dns = "alidns";
|
||||
|
@ -234,8 +229,6 @@
|
|||
./machines/darwin/imac-2017
|
||||
|
||||
{
|
||||
#home-manager.users.guanranwang = import ./users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix;
|
||||
|
||||
networking.hostName = "iMac-macOS";
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
}
|
||||
|
|
|
@ -9,4 +9,13 @@
|
|||
uid = 501;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
../../../../flakes/darwin/home-manager.nix
|
||||
];
|
||||
|
||||
home-manager.users.guanranwang.imports = [
|
||||
../..
|
||||
../../profiles/command-line/darwin
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./core.nix
|
||||
|
||||
### Flakes
|
||||
../../../../flakes/darwin/home-manager.nix
|
||||
];
|
||||
|
||||
### home-manager
|
||||
home-manager.users.guanranwang = import ../../home-manager/darwin/presets/desktop.nix; # NOTE: using flakes
|
||||
home-manager.users.guanranwang.imports = [
|
||||
./core.nix
|
||||
|
||||
../../modules/terms/alacritty.nix
|
||||
../../modules/shell/fish.nix
|
||||
../../modules/shell/bash.nix
|
||||
../../modules/editor/helix.nix
|
||||
../../modules/editor/neovim.nix
|
||||
../../modules/editor/vscode.nix
|
||||
|
||||
../home.nix
|
||||
]; # NOTE: using flakes
|
||||
}
|
||||
|
|
5
users/guanranwang/darwin/presets/desktop/gaming.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
home-manager.users.guanranwang.imports = [
|
||||
../../../profiles/gaming/darwin
|
||||
];
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../..
|
||||
../../resources/terms/alacritty.nix
|
||||
../../resources/shell/fish.nix
|
||||
../../resources/shell/bash.nix
|
||||
../../resources/editor/helix.nix
|
||||
../../resources/editor/neovim.nix
|
||||
../../resources/editor/vscode.nix
|
||||
|
||||
../home.nix
|
||||
];
|
||||
}
|
|
@ -1,5 +1,15 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
username = "guanranwang";
|
||||
homeDirectory =
|
||||
if pkgs.stdenv.hostPlatform.isDarwin
|
||||
then "/Users/${config.home.username}"
|
||||
else "/home/${config.home.username}";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
|
@ -9,75 +19,8 @@
|
|||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "23.05";
|
||||
|
||||
shellAliases = {
|
||||
# navigation
|
||||
"l" = "${pkgs.eza}/bin/eza -Fhl --icons --git";
|
||||
"ll" = "${pkgs.eza}/bin/eza -Fahl --icons --git";
|
||||
"ls" = "${pkgs.eza}/bin/eza -F --icons --git";
|
||||
"la" = "${pkgs.eza}/bin/eza -Fa --icons --git";
|
||||
"tree" = "${pkgs.eza}/bin/eza --icons --git --tree";
|
||||
".." = "cd ..";
|
||||
|
||||
# replacements
|
||||
#"code" = "codium";
|
||||
#"neofetch" = "fastfetch";
|
||||
#"ranger" = "joshuto"; # rust
|
||||
#"grep" = "rg";
|
||||
#"top" = "btm -b";
|
||||
#"htop" = "btm -b";
|
||||
#"btop" = "btm";
|
||||
|
||||
"yd" = "ydict -c";
|
||||
"farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb
|
||||
"clock" = "tty-clock -5Ccs";
|
||||
|
||||
# proxy
|
||||
"setproxy" = let
|
||||
proxy = "http://127.0.0.1:7890/";
|
||||
in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}";
|
||||
"unsetproxy" = "set -e http_proxy https_proxy all_proxy"; # fish syntax (?)
|
||||
};
|
||||
sessionVariables = {
|
||||
# misc
|
||||
"MANPAGER" = "sh -c 'col -bx | bat -l man -p'"; # man: use bat as man's pager
|
||||
"MANROFFOPT" = "-c"; # man: fix formatting issue with bat
|
||||
"SKIM_DEFAULT_COMMAND" = "fd --type f || git ls-tree -r --name-only head || rg --files || find ."; # skim: use fd by default
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager.enable = true;
|
||||
|
||||
tealdeer.enable = true;
|
||||
zoxide.enable = true;
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
aws.disabled = true;
|
||||
gcloud.disabled = true;
|
||||
line_break.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
#eza = {
|
||||
# enable = true;
|
||||
# git = true;
|
||||
# icons = true;
|
||||
#};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Guanran Wang";
|
||||
userEmail = "guanran928@outlook.com";
|
||||
delta.enable = true;
|
||||
signing.signByDefault = true;
|
||||
signing.key = "~/.ssh/id_github_signing";
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 8.6 MiB After Width: | Height: | Size: 8.6 MiB |
Before Width: | Height: | Size: 6 MiB After Width: | Height: | Size: 6 MiB |
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.1 MiB |
Before Width: | Height: | Size: 598 KiB After Width: | Height: | Size: 598 KiB |
Before Width: | Height: | Size: 7.7 MiB After Width: | Height: | Size: 7.7 MiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 425 B After Width: | Height: | Size: 425 B |
|
@ -18,10 +18,10 @@
|
|||
name = "done";
|
||||
src = pkgs.fishPlugins.done.src;
|
||||
}
|
||||
{
|
||||
name = "tide";
|
||||
src = pkgs.fishPlugins.tide.src;
|
||||
}
|
||||
#{
|
||||
# name = "tide";
|
||||
# src = pkgs.fishPlugins.tide.src;
|
||||
#}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fishPlugins.sponge.src;
|
|
@ -32,10 +32,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".xinitrc" = {
|
||||
source = "../dotfiles/.xinitrc";
|
||||
recursive = true;
|
||||
};
|
||||
home.file.".xinitrc" = {
|
||||
source = ../../dotfiles/.xinitrc;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
|
@ -25,7 +25,7 @@
|
|||
};
|
||||
|
||||
xdg.dataFile."icons/dunst" = {
|
||||
source = ../../dotfiles/data/icons/dunst;
|
||||
source = ../../../dotfiles/data/icons/dunst;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
# Yes, because I have no idea how to use programs.rofi.theme
|
||||
xdg.configFile."rofi" = {
|
||||
source = ../../dotfiles/config/rofi;
|
||||
source = ../../../dotfiles/config/rofi;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
{...}: {
|
||||
# TODO: remove unnecessary scripts
|
||||
home.sessionPath = ["$HOME/.local/bin"];
|
||||
home.file = {
|
||||
".local/bin" = {
|
||||
source = ../../dotfiles/bin;
|
||||
source = ../../../dotfiles/bin;
|
||||
recursive = true;
|
||||
};
|
||||
};
|