home: merge ./profiles into ../nixos/profiles

This commit is contained in:
Guanran Wang 2023-12-10 13:55:07 +08:00
parent 0b41e97a18
commit 754befb5f5
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
50 changed files with 116 additions and 132 deletions

View file

@ -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"
];
} }

View file

@ -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

View file

@ -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"
];
} }

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: { }: {
imports = map (n: ../../../../applications/${n}) [ imports = map (n: ../../../../../home-manager/applications/${n}) [
# Terminal # Terminal
"alacritty" "alacritty"

View file

@ -1,5 +0,0 @@
_: {
home-manager.users.guanranwang.imports = [
../../../../../home-manager/profiles/gaming/darwin
];
}

View file

@ -0,0 +1,4 @@
_: {
### home-manager
home-manager.users.guanranwang = import ./home;
}

View file

@ -0,0 +1,5 @@
{...}: {
imports = [
../../../../../home-manager/applications/prismlauncher
];
}

View file

@ -1,8 +1,4 @@
{...}: { _: {
imports = [
./rofi
];
services.sxhkd = { services.sxhkd = {
enable = true; enable = true;
keybindings = { keybindings = {

View 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";
};
}

View file

@ -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
];
}

View file

@ -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";
};
}

View file

@ -1,6 +0,0 @@
{...}: {
imports = [
../common
../../../../applications/trashy
];
}

View file

@ -1,5 +0,0 @@
{...}: {
imports = [
../../../../applications/prismlauncher
];
}

View file

@ -1,9 +0,0 @@
{...}: {
imports = [
../../../../applications/steam
../../../../applications/prismlauncher
../../../../applications/osu-lazer
../../../../applications/mangohud
../../../../applications/protonup-qt
];
}

View file

@ -1,5 +0,0 @@
{...}: {
imports = [
../../../../applications/qbittorrent
];
}

View file

@ -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"
];
} }

View file

@ -0,0 +1,6 @@
{...}: {
imports = [
../../../../home-manager
../../../../home-manager/applications/trashy
];
}

View file

@ -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;
}; };

View file

@ -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"

View file

@ -3,5 +3,5 @@
../desktop ../desktop
]; ];
home-manager.users.guanranwang.services.batsignal.enable = true; home-manager.users.guanranwang = import ./home;
} }

View file

@ -0,0 +1,3 @@
_: {
services.batsignal.enable = true;
}

View file

@ -1,5 +0,0 @@
_: {
home-manager.users.guanranwang.imports = [
../../../home-manager/profiles/opt-in/gaming/nixos
];
}

View file

@ -0,0 +1,4 @@
_: {
### home-manager
home-manager.users.guanranwang.imports = [./home];
}

View file

@ -0,0 +1,9 @@
{...}: {
imports = map (n: ../../../../../home-manager/applications/${n}) [
"steam"
"prismlauncher"
"osu-lazer"
"mangohud"
"protonup-qt"
];
}

View file

@ -1,5 +0,0 @@
_: {
home-manager.users.guanranwang.imports = [
../../../home-manager/profiles/opt-in/torrenting/nixos
];
}

View file

@ -0,0 +1,4 @@
_: {
### home-manager
home-manager.users.guanranwang = import ./home;
}

View file

@ -0,0 +1,5 @@
{...}: {
imports = [
../../../../../home-manager/applications/qbittorrent
];
}