now using flake-parts; refactored nixosConfigurations; using hm standalone
This commit is contained in:
parent
7f64d49052
commit
816496fbab
104 changed files with 1414 additions and 1910 deletions
12
users/modules/btop.nix
Normal file
12
users/modules/btop.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
proc_sorting = "cpu direct";
|
||||
update_ms = 500;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
users/modules/common/bash.nix
Normal file
8
users/modules/common/bash.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
historyFile = "~/.cache/bash_history";
|
||||
};
|
||||
}
|
||||
38
users/modules/common/fish.nix
Normal file
38
users/modules/common/fish.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source";
|
||||
loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source";
|
||||
plugins = [
|
||||
{
|
||||
name = "bang-bang";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "plugin-bang-bang";
|
||||
rev = "f969c618301163273d0a03d002614d9a81952c1e";
|
||||
sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "meaningful-ooo";
|
||||
repo = "sponge";
|
||||
rev = "384299545104d5256648cee9d8b117aaa9a6d7be";
|
||||
sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "sha256-+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./programs.nix
|
||||
];
|
||||
}
|
||||
55
users/modules/desktop.nix
Normal file
55
users/modules/desktop.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.dms.homeModules.dankMaterialShell.default ];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs = {
|
||||
dankMaterialShell = {
|
||||
enable = true;
|
||||
enableVPN = false;
|
||||
};
|
||||
|
||||
rio = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
fonts = {
|
||||
family = "FiraCode Nerd Font";
|
||||
size = 16.0;
|
||||
emoji.family = "Noto Color Emoji";
|
||||
};
|
||||
confirm-before-quit = false;
|
||||
window = {
|
||||
width = 1121;
|
||||
height = 633;
|
||||
};
|
||||
};
|
||||
|
||||
password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass-wayland;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
kdePackages.xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
gtk-decoration-layout = "appmenu:";
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-decoration-layout = "appmenu:";
|
||||
};
|
||||
};
|
||||
}
|
||||
8
users/modules/direnv.nix
Normal file
8
users/modules/direnv.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
5
users/modules/gaming.nix
Normal file
5
users/modules/gaming.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.mangohud.enable = true;
|
||||
}
|
||||
50
users/modules/helix.nix
Normal file
50
users/modules/helix.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "base16_transparent";
|
||||
editor = {
|
||||
file-picker.hidden = false;
|
||||
idle-timeout = 0;
|
||||
line-number = "relative";
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
soft-wrap.enable = true;
|
||||
auto-format = true;
|
||||
indent-guides.render = true;
|
||||
};
|
||||
keys.normal = {
|
||||
space = {
|
||||
o = "file_picker_in_current_buffer_directory";
|
||||
esc = [
|
||||
"collapse_selection"
|
||||
"keep_primary_selection"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "nixfmt";
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
auto-format = true;
|
||||
formatter.command = "typstyle -c 1000 -i";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
13
users/modules/obs-studio.nix
Normal file
13
users/modules/obs-studio.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
pkgs.obs-studio-plugins.obs-vkcapture
|
||||
pkgs.obs-studio-plugins.obs-backgroundremoval
|
||||
pkgs.obs-studio-plugins.obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
{
|
||||
config,
|
||||
hostType,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
historyFile = "~/.cache/bash_history";
|
||||
};
|
||||
|
||||
helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "base16_transparent";
|
||||
editor = {
|
||||
file-picker.hidden = false;
|
||||
idle-timeout = 0;
|
||||
line-number = "relative";
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
soft-wrap.enable = true;
|
||||
auto-format = true;
|
||||
indent-guides.render = true;
|
||||
};
|
||||
keys.normal = {
|
||||
space = {
|
||||
o = "file_picker_in_current_buffer_directory";
|
||||
esc = [
|
||||
"collapse_selection"
|
||||
"keep_primary_selection"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fish = {
|
||||
enable = true;
|
||||
functions.fish_greeting = "";
|
||||
plugins = [
|
||||
{
|
||||
name = "bang-bang";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "plugin-bang-bang";
|
||||
rev = "f969c618301163273d0a03d002614d9a81952c1e";
|
||||
sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "meaningful-ooo";
|
||||
repo = "sponge";
|
||||
rev = "384299545104d5256648cee9d8b117aaa9a6d7be";
|
||||
sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "sha256-+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
programs.rio = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
fonts = {
|
||||
family = "FiraCode Nerd Font";
|
||||
size = 16.0;
|
||||
emoji.family = "Noto Color Emoji";
|
||||
};
|
||||
confirm-before-quit = false;
|
||||
window = {
|
||||
width = 1121;
|
||||
height = 633;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
}
|
||||
40
users/modules/starship.nix
Normal file
40
users/modules/starship.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = ''
|
||||
$hostname$directory$git_branch$git_status$nix_shell
|
||||
[ ❯ ](bold green)
|
||||
'';
|
||||
right_format = "$cmd_duration$character";
|
||||
hostname = {
|
||||
ssh_symbol = " ";
|
||||
};
|
||||
character = {
|
||||
error_symbol = "[](red)";
|
||||
success_symbol = "[](green)";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "[ $duration ]($style)";
|
||||
style = "yellow";
|
||||
min_time = 500;
|
||||
};
|
||||
git_branch = {
|
||||
symbol = " ";
|
||||
style = "purple";
|
||||
};
|
||||
git_status.style = "red";
|
||||
nix_shell = {
|
||||
format = "via [$symbol$state]($style)";
|
||||
heuristic = true;
|
||||
style = "blue";
|
||||
symbol = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
users/modules/tmux.nix
Normal file
11
users/modules/tmux.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
terminal = "xterm-256color";
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./programs.nix
|
||||
./home.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
gtk-decoration-layout = "appmenu:";
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-decoration-layout = "appmenu:";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
{
|
||||
config,
|
||||
hostType,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [ nix-your-shell ];
|
||||
};
|
||||
|
||||
programs = {
|
||||
helix.languages = {
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "nixfmt";
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
auto-format = true;
|
||||
formatter.command = "typstyle -c 1000 -i";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
password-store.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
fish = {
|
||||
interactiveShellInit = "nix-your-shell fish | source";
|
||||
loginShellInit = "nix-your-shell fish | source";
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
terminal = "xterm-256color";
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = ''
|
||||
$hostname$directory$git_branch$git_status$nix_shell
|
||||
[ ❯ ](bold green)
|
||||
'';
|
||||
right_format = "$cmd_duration$character";
|
||||
hostname = {
|
||||
ssh_symbol = " ";
|
||||
};
|
||||
character = {
|
||||
error_symbol = "[](red)";
|
||||
success_symbol = "[](green)";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "[ $duration ]($style)";
|
||||
style = "yellow";
|
||||
min_time = 500;
|
||||
};
|
||||
git_branch = {
|
||||
symbol = " ";
|
||||
style = "purple";
|
||||
};
|
||||
git_status.style = "red";
|
||||
nix_shell = {
|
||||
format = "via [$symbol$state]($style)";
|
||||
heuristic = true;
|
||||
style = "blue";
|
||||
symbol = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
diff-so-fancy.enable = true;
|
||||
userName = "William";
|
||||
userEmail = "baduhai@proton.me";
|
||||
};
|
||||
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
proc_sorting = "cpu direct";
|
||||
update_ms = 500;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs = {
|
||||
dankMaterialShell = {
|
||||
enable = true;
|
||||
enableVPN = false;
|
||||
};
|
||||
password-store.package = pkgs.pass-wayland;
|
||||
|
||||
mangohud.enable = true;
|
||||
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
pkgs.obs-studio-plugins.obs-vkcapture
|
||||
pkgs.obs-studio-plugins.obs-backgroundremoval
|
||||
pkgs.obs-studio-plugins.obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
kdePackages.xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "root";
|
||||
homeDirectory = "/root";
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./modules
|
||||
./modules/root
|
||||
];
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "user";
|
||||
homeDirectory = "/home/user";
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./modules
|
||||
./modules/user
|
||||
inputs.dms.homeModules.dankMaterialShell.default
|
||||
];
|
||||
}
|
||||
10
users/user/git.nix
Normal file
10
users/user/git.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
diff-so-fancy.enable = true;
|
||||
userName = "William";
|
||||
userEmail = "baduhai@proton.me";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue