mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-10 22:52:41 +02:00
refactor: via statix
This commit is contained in:
@@ -24,9 +24,11 @@
|
|||||||
indent-guides.render = true;
|
indent-guides.render = true;
|
||||||
};
|
};
|
||||||
keys.normal = {
|
keys.normal = {
|
||||||
space.space = "file_picker";
|
space = {
|
||||||
space.w = ":w";
|
space = "file_picker";
|
||||||
space.q = ":q";
|
w = ":w";
|
||||||
|
q = ":q";
|
||||||
|
};
|
||||||
esc = ["collapse_selection" "keep_primary_selection"];
|
esc = ["collapse_selection" "keep_primary_selection"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme
|
# https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme
|
||||||
home.file.".config/btop/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-btop}/themes";
|
xdg.configFile."btop/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-btop}/themes";
|
||||||
|
|
||||||
# replacement of htop/nmon
|
# replacement of htop/nmon
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ _: {
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/zellij/config.kdl".source = ./config.kdl;
|
xdg.configFile."zellij/config.kdl".source = ./config.kdl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# https://github.com/catppuccin/cava
|
# https://github.com/catppuccin/cava
|
||||||
home.file.".config/cava/config".text =
|
xdg.configFile."cava/config".text =
|
||||||
''
|
''
|
||||||
# custom cava config
|
# custom cava config
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{wallpapers, ...}: {
|
{wallpapers, ...}: {
|
||||||
# https://github.com/ryan4yin/wallpapers
|
# https://github.com/ryan4yin/wallpapers
|
||||||
home.file.".config/wallpapers".source = wallpapers;
|
xdg.configFile."wallpapers".source = wallpapers;
|
||||||
home.file.".local/bin/wallpaper_random" = {
|
home.file.".local/bin/wallpaper_random" = {
|
||||||
source = "${wallpapers}/wallpaper_random.py";
|
source = "${wallpapers}/wallpaper_random.py";
|
||||||
executable = true;
|
executable = true;
|
||||||
|
|||||||
@@ -3,16 +3,17 @@
|
|||||||
nur-ryan4yin,
|
nur-ryan4yin,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.file.".config/fcitx5/profile" = {
|
|
||||||
source = ./profile;
|
|
||||||
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile,
|
|
||||||
# so we need to force replace it in every rebuild to avoid file conflict.
|
|
||||||
force = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# color schema
|
|
||||||
home.file.".local/share/fcitx5/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-fcitx5}/src";
|
home.file.".local/share/fcitx5/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-fcitx5}/src";
|
||||||
home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"fcitx5/profile" = {
|
||||||
|
source = ./profile;
|
||||||
|
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile,
|
||||||
|
# so we need to force replace it in every rebuild to avoid file conflict.
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
"fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
||||||
|
};
|
||||||
|
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
|
|||||||
@@ -23,31 +23,33 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# hyprland configs, based on https://github.com/notwidow/hyprland
|
# hyprland configs, based on https://github.com/notwidow/hyprland
|
||||||
xdg.configFile."hypr/mako" = {
|
xdg.configFile = {
|
||||||
source = ./hypr-conf/mako;
|
"hypr/mako" = {
|
||||||
recursive = true;
|
source = ./hypr-conf/mako;
|
||||||
};
|
recursive = true;
|
||||||
xdg.configFile."hypr/scripts" = {
|
};
|
||||||
source = ./hypr-conf/scripts;
|
"hypr/scripts" = {
|
||||||
recursive = true;
|
source = ./hypr-conf/scripts;
|
||||||
};
|
recursive = true;
|
||||||
xdg.configFile."hypr/waybar" = {
|
};
|
||||||
source = ./hypr-conf/waybar;
|
"hypr/waybar" = {
|
||||||
recursive = true;
|
source = ./hypr-conf/waybar;
|
||||||
};
|
recursive = true;
|
||||||
xdg.configFile."hypr/wlogout" = {
|
};
|
||||||
source = ./hypr-conf/wlogout;
|
"hypr/wlogout" = {
|
||||||
recursive = true;
|
source = ./hypr-conf/wlogout;
|
||||||
};
|
recursive = true;
|
||||||
xdg.configFile."hypr/themes" = {
|
};
|
||||||
source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-hyprland}/themes";
|
"hypr/themes" = {
|
||||||
recursive = true;
|
source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-hyprland}/themes";
|
||||||
};
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
# music player - mpd
|
# music player - mpd
|
||||||
xdg.configFile."mpd" = {
|
"mpd" = {
|
||||||
source = ./mpd;
|
source = ./mpd;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# allow fontconfig to discover fonts and configurations installed through home.packages
|
# allow fontconfig to discover fonts and configurations installed through home.packages
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{...}: {
|
_: {
|
||||||
networking.hostName = "ai";
|
networking = {
|
||||||
|
hostName = "ai";
|
||||||
# Enable networking
|
defaultGateway = "192.168.5.201";
|
||||||
networking.networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
networking.defaultGateway = "192.168.5.201";
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,17 +36,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Don't allow mutation of users outside the config.
|
# Don't allow mutation of users outside the config.
|
||||||
users.mutableUsers = false;
|
users = {
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
mutableUsers = false;
|
||||||
users.users.ryan = {
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
# generated by `mkpasswd -m scrypt`
|
users = {
|
||||||
# we have to use initialHashedPassword here, if your'are using tmpfs for /
|
ryan = {
|
||||||
initialHashedPassword = "$7$CU..../....Sdl/JRH..9eIvZ6mE/52r.$xeR6lyvTcVVKt28Owcoc/vPOOECcYSiq1xjw/QCz2t0";
|
# generated by `mkpasswd -m scrypt`
|
||||||
isNormalUser = true;
|
# we have to use initialHashedPassword here, if your'are using tmpfs for /
|
||||||
description = "ryan";
|
initialHashedPassword = "$7$CU..../....Sdl/JRH..9eIvZ6mE/52r.$xeR6lyvTcVVKt28Owcoc/vPOOECcYSiq1xjw/QCz2t0";
|
||||||
extraGroups = ["ryan" "networkmanager" "wheel"];
|
isNormalUser = true;
|
||||||
|
description = "ryan";
|
||||||
|
extraGroups = ["ryan" "networkmanager" "wheel"];
|
||||||
|
};
|
||||||
|
root.initialHashedPassword = "$7$CU..../....X6uvZYnFD.i1CqqFFNl4./$4vgqzIPyw5XBr0aCDFbY/UIRRJr7h5SMGoQ/ZvX3FP2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.users.root.initialHashedPassword = "$7$CU..../....X6uvZYnFD.i1CqqFFNl4./$4vgqzIPyw5XBr0aCDFbY/UIRRJr7h5SMGoQ/ZvX3FP2";
|
|
||||||
|
|
||||||
# make ryan a trusted user so he can set custom nix substituters url(cache mirror) to speed up nixos-rebuild.
|
# make ryan a trusted user so he can set custom nix substituters url(cache mirror) to speed up nixos-rebuild.
|
||||||
nix.settings.trusted-users = ["ryan"];
|
nix.settings.trusted-users = ["ryan"];
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
args:
|
args:
|
||||||
with args;
|
with args;
|
||||||
with allSystemAttrs; let
|
with allSystemAttrs; let
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
colmenaSystem = import ../lib/colmenaSystem.nix;
|
colmenaSystem = import ../lib/colmenaSystem.nix;
|
||||||
# x86_64 related
|
# x86_64 related
|
||||||
x64_base_args = {
|
x64_base_args = {
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
args:
|
args:
|
||||||
with args;
|
with args;
|
||||||
with allSystemAttrs; let
|
with allSystemAttrs; let
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
macosSystem = import ../lib/macosSystem.nix;
|
macosSystem = import ../lib/macosSystem.nix;
|
||||||
base_args = {
|
base_args = {
|
||||||
inherit nix-darwin home-manager;
|
inherit nix-darwin home-manager;
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
inputs,
|
inputs,
|
||||||
constants,
|
constants,
|
||||||
}: let
|
}: let
|
||||||
lib = inputs.nixpkgs.lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
vars = import ./vars.nix;
|
vars = import ./vars.nix;
|
||||||
|
|
||||||
specialArgsForSystem = system:
|
specialArgsForSystem = system:
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
allSystemSpecialArgs =
|
allSystemSpecialArgs =
|
||||||
lib.attrsets.mapAttrs
|
lib.attrsets.mapAttrs
|
||||||
(name: value: specialArgsForSystem value)
|
(name: specialArgsForSystem)
|
||||||
constants.allSystemAttrs;
|
constants.allSystemAttrs;
|
||||||
|
|
||||||
args = lib.attrsets.mergeAttrsList [
|
args = lib.attrsets.mergeAttrsList [
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
args:
|
args:
|
||||||
with args;
|
with args;
|
||||||
with allSystemAttrs; let
|
with allSystemAttrs; let
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
nixosSystem = import ../lib/nixosSystem.nix;
|
nixosSystem = import ../lib/nixosSystem.nix;
|
||||||
|
|
||||||
base_args = {
|
base_args = {
|
||||||
|
|||||||
Reference in New Issue
Block a user