refactor: modulization
This commit is contained in:
parent
a29782681a
commit
f6acb92ad0
63 changed files with 680 additions and 1959 deletions
|
|
@ -1,58 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
unstable,
|
||||
system,
|
||||
inputs,
|
||||
nix-version,
|
||||
git-config,
|
||||
username,
|
||||
config,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
hyprcursor-size = "32";
|
||||
xcursor-size = "24";
|
||||
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||
device-name = "dn-lap";
|
||||
monitors = [ ];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
../../modules
|
||||
../../modules/wireguard.nix
|
||||
../../modules/dn-ca.nix
|
||||
../../modules/presets/basic.nix
|
||||
../../modules/gaming.nix
|
||||
../../modules/virtualization.nix
|
||||
../../modules/wine.nix
|
||||
../../modules/wireguard.nix
|
||||
];
|
||||
|
||||
# Overrides
|
||||
networking.hostName = lib.mkForce device-name;
|
||||
|
||||
system.stateVersion = nix-version;
|
||||
home-manager = {
|
||||
backupFileExtension = "hm-backup";
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
monitors
|
||||
unstable
|
||||
inputs
|
||||
system
|
||||
nix-version
|
||||
xcursor-size
|
||||
hyprcursor-size
|
||||
git-config
|
||||
username
|
||||
nvidia-offload-enabled
|
||||
device-name
|
||||
;
|
||||
};
|
||||
users."${username}" = {
|
||||
users."${settings.personal.username}" = {
|
||||
imports = [
|
||||
../../../home
|
||||
../../../home/user/music-production.nix
|
||||
../../../home/presets/basic.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,87 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
unstable,
|
||||
inputs,
|
||||
system,
|
||||
nix-version,
|
||||
git-config,
|
||||
username,
|
||||
config,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hyprcursor-size = "32";
|
||||
xcursor-size = "24";
|
||||
nvidia-mode = "offload";
|
||||
# Get bus id with `lshw`
|
||||
intel-bus-id = "PCI:0:2:0";
|
||||
nvidia-bus-id = "PCI:1:0:0";
|
||||
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||
device-name = "dn-pre7780";
|
||||
monitors = [
|
||||
"DP-3"
|
||||
"HDMI-A-2"
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
(import ../../modules/nvidia.nix {
|
||||
nvidia-mode = settings.nvidia.mode;
|
||||
intel-bus-id = settings.nvidia.intel-bus-id;
|
||||
nvidia-bus-id = settings.nvidia.nvidia-bus-id;
|
||||
})
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
../../modules
|
||||
../../modules/presets/basic.nix
|
||||
../../modules/cuda.nix
|
||||
(import ../../modules/nvidia.nix {
|
||||
nvidia-mode = nvidia-mode;
|
||||
intel-bus-id = intel-bus-id;
|
||||
nvidia-bus-id = nvidia-bus-id;
|
||||
})
|
||||
../../modules/gaming.nix
|
||||
../../modules/wireguard.nix
|
||||
(import ../../modules/wallpaper-engine.nix {
|
||||
offload = nvidia-offload-enabled;
|
||||
})
|
||||
../../modules/wine.nix
|
||||
../../modules/secure-boot.nix
|
||||
];
|
||||
|
||||
# Overrides
|
||||
networking.hostName = lib.mkForce device-name;
|
||||
|
||||
system.stateVersion = nix-version;
|
||||
services.wallpaperEngine.enable = lib.mkForce false;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.prismlauncher
|
||||
../../modules/virtualization.nix
|
||||
../../modules/wine.nix
|
||||
../../modules/wireguard.nix
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
unstable
|
||||
inputs
|
||||
system
|
||||
nix-version
|
||||
xcursor-size
|
||||
hyprcursor-size
|
||||
git-config
|
||||
username
|
||||
nvidia-offload-enabled
|
||||
device-name
|
||||
monitors
|
||||
;
|
||||
};
|
||||
users."${username}" = {
|
||||
users."${settings.personal.username}" = {
|
||||
imports = [
|
||||
../../../home
|
||||
../../../home/presets/basic.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
users.users = {
|
||||
"${username}".openssh.authorizedKeys.keys = [
|
||||
"${settings.personal.username}".openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJFQA42R3fZmjb9QnUgzzOTIXQBC+D2ravE/ZLvdjoOQ danny@lap.dn"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSHkPa6vmr5WBPXAazY16+Ph1Mqv9E24uLIf32oC2oH danny@phone.dn"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,94 +1,52 @@
|
|||
{
|
||||
lib,
|
||||
unstable,
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
nix-version,
|
||||
git-config,
|
||||
username,
|
||||
config,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hyprcursor-size = "32";
|
||||
xcursor-size = "24";
|
||||
nvidia-mode = "offload";
|
||||
# Get bus id with `lshw -C display`
|
||||
intel-bus-id = "PCI:0:2:0";
|
||||
nvidia-bus-id = "PCI:1:0:0";
|
||||
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||
device-name = "dn-server";
|
||||
monitors = [
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
(import ../../modules/nvidia.nix {
|
||||
nvidia-mode = settings.nvidia.mode;
|
||||
intel-bus-id = settings.nvidia.intel-bus-id;
|
||||
nvidia-bus-id = settings.nvidia.nvidia-bus-id;
|
||||
})
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./networking.nix
|
||||
../../modules/server-default.nix
|
||||
../../modules/presets/minimal.nix
|
||||
../../modules/bluetooth.nix
|
||||
../../modules/cuda.nix
|
||||
(import ../../modules/nvidia.nix {
|
||||
nvidia-mode = nvidia-mode;
|
||||
intel-bus-id = intel-bus-id;
|
||||
nvidia-bus-id = nvidia-bus-id;
|
||||
})
|
||||
# ../../modules/wine.nix
|
||||
../../modules/gc.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.ferium.overrideAttrs (
|
||||
final: prev: rec {
|
||||
cargoHash = "sha256-yedl4KQCpT7Ai1EPvwD5kzhkHesIjGVAcxKjp5k2jmI=";
|
||||
version = "4.7.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gorilla-devs";
|
||||
repo = prev.pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-jj3BdaxH7ofhHNF2eu+burn6+/0bPQQZ8JfjXAFyN4A=";
|
||||
};
|
||||
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
||||
inherit (final) pname src version;
|
||||
useFetchCargoVendor = true;
|
||||
hash = final.cargoHash;
|
||||
};
|
||||
}
|
||||
))
|
||||
environment.systemPackages = with pkgs; [
|
||||
ferium
|
||||
];
|
||||
|
||||
# Overrides
|
||||
networking.hostName = lib.mkForce device-name;
|
||||
|
||||
system.stateVersion = nix-version;
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
unstable
|
||||
inputs
|
||||
system
|
||||
nix-version
|
||||
xcursor-size
|
||||
hyprcursor-size
|
||||
git-config
|
||||
username
|
||||
nvidia-offload-enabled
|
||||
device-name
|
||||
monitors
|
||||
;
|
||||
};
|
||||
users."${username}" = {
|
||||
users."${settings.personal.username}" = {
|
||||
imports = [
|
||||
../../../home/server-default.nix
|
||||
../../../home/user/config.nix
|
||||
../../../home/user/direnv.nix
|
||||
../../../home/user/environment.nix
|
||||
../../../home/user/git.nix
|
||||
../../../home/user/nvim.nix
|
||||
../../../home/user/shell.nix
|
||||
../../../home/user/tmux.nix
|
||||
../../../home/user/yazi.nix
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
inputs.ghostty.packages.${system}.default
|
||||
(python3.withPacakges (
|
||||
p: with p; [
|
||||
pip
|
||||
]
|
||||
))
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,83 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
file
|
||||
|
||||
cachix
|
||||
|
||||
upower
|
||||
jq
|
||||
bat
|
||||
btop
|
||||
eza
|
||||
fzf
|
||||
neofetch
|
||||
ripgrep
|
||||
tree
|
||||
tldr # Alternative for man
|
||||
wget
|
||||
unzip
|
||||
p7zip
|
||||
killall
|
||||
zip
|
||||
glxinfo # OpenGL info
|
||||
pciutils # PCI info
|
||||
xdotool # Keyboard input simulation
|
||||
ffmpeg # Video encoding
|
||||
mpv # Media player
|
||||
|
||||
git
|
||||
gh
|
||||
gnumake
|
||||
lm_sensors
|
||||
openssl
|
||||
openssl.dev
|
||||
pkg-config # Include Lib
|
||||
nodejs
|
||||
yarn-berry
|
||||
rustup
|
||||
gcc
|
||||
zig
|
||||
|
||||
vim
|
||||
stylua
|
||||
lazygit
|
||||
luajitPackages.lua
|
||||
lua51Packages.lua
|
||||
luajitPackages.luarocks
|
||||
luajitPackages.magick
|
||||
imagemagick
|
||||
|
||||
fishPlugins.done
|
||||
fishPlugins.fzf-fish
|
||||
fishPlugins.forgit
|
||||
fishPlugins.hydro
|
||||
fishPlugins.grc
|
||||
grc # Colorize
|
||||
zoxide # Dir jumper
|
||||
starship # Shell theme
|
||||
carapace # Autocomplete
|
||||
|
||||
usbutils
|
||||
udiskie
|
||||
udisks
|
||||
|
||||
ffmpegthumbnailer
|
||||
|
||||
libsForQt5.qt5.qtmultimedia
|
||||
libsForQt5.qt5.qtquickcontrols2
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
libsForQt5.qt5.qtsvg
|
||||
libsForQt5.qt5.qtwayland
|
||||
pkgs.gst_all_1.gst-libav
|
||||
pkgs.gst_all_1.gstreamer
|
||||
pkgs.gst_all_1.gst-plugins-good
|
||||
|
||||
inputs.ghostty.packages.${system}.default
|
||||
];
|
||||
}
|
||||
|
|
@ -274,11 +274,6 @@ in
|
|||
enable = false;
|
||||
xkb.layout = "us";
|
||||
};
|
||||
|
||||
# USB auto mount
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
devmon.enable = true;
|
||||
};
|
||||
|
||||
users.users = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue