home: merge ./profiles into ../nixos/profiles
|
@ -23,8 +23,5 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
### home-manager
|
### home-manager
|
||||||
home-manager.users.guanranwang.imports = map (n: ../../../home-manager/${n}) [
|
home-manager.users.guanranwang = import ./home;
|
||||||
"default.nix"
|
|
||||||
"profiles/command-line/darwin"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [../common];
|
imports = [
|
||||||
|
../../../../home-manager
|
||||||
|
];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
### Outdated macOS components
|
### Outdated macOS components
|
||||||
coreutils
|
coreutils
|
|
@ -1,6 +1,4 @@
|
||||||
_: {
|
_: {
|
||||||
### home-manager
|
### home-manager
|
||||||
home-manager.users.guanranwang.imports = map (n: ../../../../home-manager/${n}) [
|
home-manager.users.guanranwang = import ./home;
|
||||||
"profiles/graphical-stuff/darwin"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = map (n: ../../../../applications/${n}) [
|
imports = map (n: ../../../../../home-manager/applications/${n}) [
|
||||||
# Terminal
|
# Terminal
|
||||||
"alacritty"
|
"alacritty"
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
_: {
|
|
||||||
home-manager.users.guanranwang.imports = [
|
|
||||||
../../../../../home-manager/profiles/gaming/darwin
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
_: {
|
||||||
|
### home-manager
|
||||||
|
home-manager.users.guanranwang = import ./home;
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
../../../../../home-manager/applications/prismlauncher
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,8 +1,4 @@
|
||||||
{...}: {
|
_: {
|
||||||
imports = [
|
|
||||||
./rofi
|
|
||||||
];
|
|
||||||
|
|
||||||
services.sxhkd = {
|
services.sxhkd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
|
59
users/guanranwang/home-manager/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{
|
||||||
|
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
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Default applications
|
||||||
|
imports = [
|
||||||
|
./modules
|
||||||
|
|
||||||
|
./applications/git
|
||||||
|
./applications/starship
|
||||||
|
./applications/eza
|
||||||
|
./applications/skim
|
||||||
|
./applications/bat
|
||||||
|
./applications/bottom
|
||||||
|
./applications/zoxide
|
||||||
|
./applications/ripgrep
|
||||||
|
./applications/wget
|
||||||
|
./applications/fd
|
||||||
|
./applications/hyperfine
|
||||||
|
|
||||||
|
./applications/ydict
|
||||||
|
./applications/fastfetch
|
||||||
|
./applications/android-tools
|
||||||
|
./applications/tealdeer
|
||||||
|
];
|
||||||
|
|
||||||
|
home.shellAliases = {
|
||||||
|
".." = "cd ..";
|
||||||
|
"farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
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
|
|
||||||
# incompatible changes.
|
|
||||||
#
|
|
||||||
# You can update Home Manager without changing this value. See
|
|
||||||
# the Home Manager release notes for a list of state version
|
|
||||||
# changes in each release.
|
|
||||||
stateVersion = "23.05";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
../../modules
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../../../../applications/git
|
|
||||||
../../../../applications/starship
|
|
||||||
../../../../applications/eza
|
|
||||||
../../../../applications/skim
|
|
||||||
../../../../applications/bat
|
|
||||||
../../../../applications/bottom
|
|
||||||
../../../../applications/zoxide
|
|
||||||
../../../../applications/ripgrep
|
|
||||||
../../../../applications/wget
|
|
||||||
../../../../applications/fd
|
|
||||||
../../../../applications/hyperfine
|
|
||||||
|
|
||||||
../../../../applications/ydict
|
|
||||||
../../../../applications/fastfetch
|
|
||||||
../../../../applications/android-tools
|
|
||||||
../../../../applications/tealdeer
|
|
||||||
];
|
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
".." = "cd ..";
|
|
||||||
"farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb
|
|
||||||
|
|
||||||
# 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";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../common
|
|
||||||
../../../../applications/trashy
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../../../../applications/prismlauncher
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../../../../applications/steam
|
|
||||||
../../../../applications/prismlauncher
|
|
||||||
../../../../applications/osu-lazer
|
|
||||||
../../../../applications/mangohud
|
|
||||||
../../../../applications/protonup-qt
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../../../../applications/qbittorrent
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -20,11 +20,10 @@
|
||||||
packages = [];
|
packages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
### for default shell
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
### Options
|
|
||||||
myFlake.nixos.networking.dns.provider = lib.mkDefault "alidns";
|
myFlake.nixos.networking.dns.provider = lib.mkDefault "alidns";
|
||||||
|
users.groups."nix-access-tokens" = {};
|
||||||
|
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
||||||
|
|
||||||
### Flakes
|
### Flakes
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -33,14 +32,14 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
### sops-nix
|
### sops-nix
|
||||||
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
|
||||||
users.groups."nix-access-tokens" = {};
|
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../secrets/secrets.yaml;
|
defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||||
gnupg.sshKeyPaths = [];
|
gnupg.sshKeyPaths = [];
|
||||||
secrets = {
|
secrets = {
|
||||||
"hashed-passwd".neededForUsers = true; # Hashed user password
|
"hashed-passwd" = {
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
"nix-access-tokens" = {
|
"nix-access-tokens" = {
|
||||||
group = config.users.groups."nix-access-tokens".name;
|
group = config.users.groups."nix-access-tokens".name;
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
|
@ -49,8 +48,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
### home-manager
|
### home-manager
|
||||||
home-manager.users.guanranwang.imports = map (n: ../../../home-manager/${n}) [
|
home-manager.users.guanranwang = import ./home;
|
||||||
"profiles/core"
|
|
||||||
"profiles/device-type/non-graphical/nixos"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
6
users/guanranwang/nixos/profiles/core/home/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
../../../../home-manager
|
||||||
|
../../../../home-manager/applications/trashy
|
||||||
|
];
|
||||||
|
}
|
|
@ -17,10 +17,7 @@
|
||||||
sops.secrets."wireless/home".path = "/var/lib/iwd/wangxiaobo.psk"; # Home wifi password
|
sops.secrets."wireless/home".path = "/var/lib/iwd/wangxiaobo.psk"; # Home wifi password
|
||||||
|
|
||||||
### home-manager
|
### home-manager
|
||||||
home-manager.users.guanranwang.imports = map (n: ../../../../home-manager/${n}) [
|
home-manager.users.guanranwang = import ./home;
|
||||||
"profiles/device-type/non-graphical/nixos"
|
|
||||||
"profiles/device-type/graphical/nixos"
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.enableDefaultPackages = false;
|
fonts.enableDefaultPackages = false;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
|
@ -47,7 +44,7 @@
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
kdeconnect = {
|
kdeconnect = {
|
||||||
#enable = true;
|
enable = true;
|
||||||
#package = pkgs.gnomeExtensions.gsconnect;
|
#package = pkgs.gnomeExtensions.gsconnect;
|
||||||
package = pkgs.valent;
|
package = pkgs.valent;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
./theme.nix
|
./theme.nix
|
||||||
./xdg-mime.nix
|
./xdg-mime.nix
|
||||||
]
|
]
|
||||||
++ map (n: ../../../../applications/${n}) [
|
++ map (n: ../../../../../home-manager/applications/${n}) [
|
||||||
# Terminal
|
# Terminal
|
||||||
"alacritty"
|
"alacritty"
|
||||||
|
|
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 |
|
@ -3,5 +3,5 @@
|
||||||
../desktop
|
../desktop
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.guanranwang.services.batsignal.enable = true;
|
home-manager.users.guanranwang = import ./home;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
services.batsignal.enable = true;
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
_: {
|
|
||||||
home-manager.users.guanranwang.imports = [
|
|
||||||
../../../home-manager/profiles/opt-in/gaming/nixos
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
_: {
|
||||||
|
### home-manager
|
||||||
|
home-manager.users.guanranwang.imports = [./home];
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{...}: {
|
||||||
|
imports = map (n: ../../../../../home-manager/applications/${n}) [
|
||||||
|
"steam"
|
||||||
|
"prismlauncher"
|
||||||
|
"osu-lazer"
|
||||||
|
"mangohud"
|
||||||
|
"protonup-qt"
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
_: {
|
|
||||||
home-manager.users.guanranwang.imports = [
|
|
||||||
../../../home-manager/profiles/opt-in/torrenting/nixos
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
_: {
|
||||||
|
### home-manager
|
||||||
|
home-manager.users.guanranwang = import ./home;
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
../../../../../home-manager/applications/qbittorrent
|
||||||
|
];
|
||||||
|
}
|