prep for multi system config

This commit is contained in:
BuyMyMojo 2025-04-01 18:21:50 +11:00
parent e05c685a39
commit ed467b867c
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10 changed files with 241 additions and 411 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
home-manager/flake.nix

1
home-manager/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
flake.nix

View file

@ -230,11 +230,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-F++9IlKzjo5nlNYC+fpx4GfbJiEUqLarfQPBBT5uz3A=",
"path": "/nix/store/cy0ca66xq8c7hcs68nry9y6qka1wx91b-source/programs/shadps4",
"path": "/nix/store/qvgag1b29z1r922j9il1bfrln83h4dyh-source/programs/shadps4",
"type": "path"
},
"original": {
"path": "/nix/store/cy0ca66xq8c7hcs68nry9y6qka1wx91b-source/programs/shadps4",
"path": "/nix/store/qvgag1b29z1r922j9il1bfrln83h4dyh-source/programs/shadps4",
"type": "path"
}
},

View file

@ -1,78 +0,0 @@
{
description = "Home Manager configuration of buymymojo";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
moonlight = {
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
shadps4-git.url = "./programs/shadps4";
nixpkgs-gsr-ui = {
url = "github:js6pak/nixpkgs/gpu-screen-recorder-ui/init"; # Add `/develop` to the flake URL to use nightly.
};
bellado.url = "github:isabelroses/bellado";
};
outputs =
{
nixpkgs,
home-manager,
nixpkgs-unstable,
nixpkgs-gsr-ui,
bellado,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
gsr-ui = import nixpkgs-gsr-ui {
inherit system;
config.allowUnfree = true;
};
in
{
homeConfigurations."buymymojo" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit unstable;
inherit inputs;
inherit gsr-ui;
inherit bellado;
};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
./packages.nix
./services.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}

1
home-manager/flake.nix Symbolic link
View file

@ -0,0 +1 @@
nixos.nix

View file

@ -1,67 +0,0 @@
{
config,
pkgs,
unstable,
inputs,
...
}:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "buymymojo";
home.homeDirectory = "/home/buymymojo";
# 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 should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/buymymojo/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "code";
NIXPKGS_ALLOW_UNFREE = "1";
};
home.sessionPath = [
"/home/buymymojo/bin/"
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

81
home-manager/nixos.nix Normal file
View file

@ -0,0 +1,81 @@
{
description = "Home Manager configuration of buymymojo";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
moonlight = {
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
shadps4-git.url = "./programs/shadps4";
nixpkgs-gsr-ui = {
url = "github:js6pak/nixpkgs/gpu-screen-recorder-ui/init"; # Add `/develop` to the flake URL to use nightly.
};
bellado.url = "github:isabelroses/bellado";
};
outputs =
{
nixpkgs,
home-manager,
nixpkgs-unstable,
nixpkgs-gsr-ui,
bellado,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
gsr-ui = import nixpkgs-gsr-ui {
inherit system;
config.allowUnfree = true;
};
in
{
homeConfigurations."buymymojo" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit unstable;
inherit inputs;
inherit gsr-ui;
inherit bellado;
};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./hosts/nixos/home.nix
./hosts/nixos/packages.nix
./hosts/nixos/services.nix
./packages/common-cli.nix
./packages/common-desktop.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}

View file

@ -1,250 +0,0 @@
{
config,
pkgs,
unstable,
gsr-ui,
inputs,
...
}:
{
imports = [
inputs.moonlight.homeModules.default
inputs.bellado.homeManagerModules.default
];
nixpkgs = {
# You can add overlays here
overlays = [
inputs.moonlight.overlays.default
];
};
home.file."jdks/zulujdk8".source = pkgs.zulu8;
home.file."jdks/zulujdk17".source = pkgs.zulu17;
home.file."jdks/zulujdk23".source = pkgs.zulu23;
home.file."Godot/current".source = unstable.godot;
home.file."Godot/current-mono".source = unstable.godot-mono;
home.file."Godot/export-templates/current".source = unstable.godot-export-templates;
home.file."Godot/4.3".source = unstable.godot_4_3;
home.file."Godot/4.3-mono".source = unstable.godot_4_3-mono;
home.file."Godot/export-templates/4.3".source = unstable.godot_4_3-export-templates;
home.file."bin/wine".source = unstable.wineWowPackages.waylandFull;
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages =
with unstable;
with inputs;
[
pkgs.nextcloud-client
pkgs.yubioath-flutter
pkgs.xpipe
pkgs.qbittorrent
pkgs.monero-gui
unstable.peazip
unstable.kiwix
# pkgs.protonplus
unstable.pcsx2
pkgs.rpcs3
unstable.ryubing
unstable.torzu
pkgs.heroic-unwrapped
unstable.ludusavi
inputs.shadps4-git.packages."x86_64-linux".default
unstable.wineWowPackages.waylandFull
unstable.winetricks
steamtinkerlaunch
# === Minecraft ===
pkgs.prismlauncher
# pkgs.zulu8
# pkgs.zulu17
# pkgs.zulu23
# === Minecraft ===
# === CLI ===
pkgs.bat
pkgs.btop
pkgs.rrsync
pkgs.ripgrep
pkgs.wl-clipboard
pkgs.poop # Compare the performance of multiple commands with a colorful terminal user interface
pkgs.age
pkgs.stow
unstable.yt-dlp
pkgs.aria2
pkgs.jujutsu
pkgs.lazyjj
pkgs.biome
# === CLI ===
# === Image CLI ===
unstable.oxipng
unstable.image_optim
unstable.jpegoptim
pkgs.libjxl
pkgs.libavif
pkgs.libwebp
pkgs.imagemagick
# === Image CLI ===
# === Communication ===
pkgs.vesktop
pkgs.discord-canary
pkgs.signal-desktop
pkgs.telegram-desktop
# pkgs.thunderbird-latest-unwrapped
# === Communication ===
# === Game perf ===
unstable.mangojuice
unstable.goverlay
# === Game perf ===
# === Dev tooling ===
# pkgs.rustup
unstable.libreoffice-fresh
# pkgs.kdePackages.kate
pkgs.jetbrains.webstorm
pkgs.jetbrains.rider
pkgs.jetbrains.idea-community
# unstable.neovim
# === Dev tooling ===
# === Media ===
unstable.gimp
unstable.krita
# pkgs.mpv
unstable.losslesscut-bin
unstable.jellyfin-media-player
# === Media ===
# pkgs.polychromatic
unstable.orca-slicer
pkgs.lazydocker
pkgs.distrobox
pkgs.boxbuddy
unstable.godot-mono
unstable.godot-export-templates
unstable.blender-hip
unstable.freecad-wayland
pkgs.unityhub
pkgs.material-maker
unstable.blockbench
unstable.gpu-screen-recorder-gtk
gsr-ui.gpu-screen-recorder-ui
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
programs.neovim = {
# package = unstable.neovim;
enable = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
lazy-nvim
];
};
programs.mangohud = {
enable = true;
enableSessionWide = true;
package = unstable.mangohud;
};
programs.moonlight-mod = {
enable = true;
# stable = {
# extensions = {
# allActivites.enabled = true;
# alwaysFocus.enabled = true;
# betterEmbedsYT = {
# enabled = true;
# config = {
# fullDescription = false;
# expandDescription = true;
# };
# };
# };
# };
};
programs.git = {
enable = true;
userName = "BuyMyMojo";
userEmail = "hello+git@buymymojo.net";
lfs.enable = true;
signing.key = "E7B7B8D20C8753C077F9B17119AB7AA462B8AB3B";
signing.signByDefault = true;
extraConfig = {
init = {
defaultBranch = "main";
};
};
};
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vkcapture
obs-pipewire-audio-capture
obs-teleport
obs-source-record
obs-source-clone
obs-composite-blur
];
};
programs.bellado = {
enable = true;
enableAliases = true;
};
# === ssh ===
programs.ssh.enable = true;
programs.ssh.addKeysToAgent = "yes";
programs.ssh.matchBlocks = {
"*" = {
identityFile = "/home/buymymojo/.ssh/id_ed25519-mainpc";
};
"game2.buymymojo.net" = {
hostname = "game2.buymymojo.net";
user = "jumpbox";
identityFile = "/home/buymymojo/.ssh/id_ed25519-mainpc";
};
"git.aria.coffee" = {
hostname = "git.aria.coffee";
user = "git";
identityFile = "/home/buymymojo/.ssh/id_ed25519-mainpc";
port = 23;
};
};
# === shells ===
programs.bash.enable = true;
programs.fish.enable = true;
}

View file

@ -0,0 +1,70 @@
{
config,
pkgs,
unstable,
inputs,
lib,
...
}:
let
withExtraPackages =
pkg: extraPackages:
pkgs.runCommand "${pkg.name}-wrapped" { nativeBuildInputs = [ pkgs.makeWrapper ]; } ''
for exe in ${lib.getBin pkg}/bin/*; do
makeWrapper $exe $out/bin/$(basename $exe) --prefix PATH : ${lib.makeBinPath extraPackages}
done
'';
in
{
imports = [
inputs.bellado.homeManagerModules.default
];
home.packages =
with unstable;
with inputs;
[
];
programs.neovim = {
# package = unstable.neovim;
enable = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
lazy-nvim
];
};
programs.git = {
enable = true;
userName = "BuyMyMojo";
userEmail = "hello+git@buymymojo.net";
lfs.enable = true;
signing.key = "E7B7B8D20C8753C077F9B17119AB7AA462B8AB3B";
signing.signByDefault = true;
extraConfig = {
init = {
defaultBranch = "main";
};
};
};
programs.bellado = {
enable = true;
enableAliases = true;
};
programs.ssh.enable = true;
programs.ssh.addKeysToAgent = "yes";
# === shells ===
programs.bash.enable = true;
programs.fish.enable = true;
}

View file

@ -0,0 +1,85 @@
{
config,
pkgs,
unstable,
inputs,
lib,
...
}:
let
withExtraPackages =
pkg: extraPackages:
pkgs.runCommand "${pkg.name}-wrapped" { nativeBuildInputs = [ pkgs.makeWrapper ]; } ''
for exe in ${lib.getBin pkg}/bin/*; do
makeWrapper $exe $out/bin/$(basename $exe) --prefix PATH : ${lib.makeBinPath extraPackages}
done
'';
in
{
imports = [
inputs.moonlight.homeModules.default
];
nixpkgs = {
overlays = [
inputs.moonlight.overlays.default
];
};
home.packages =
with unstable;
with inputs;
[
pkgs.yubioath-flutter
pkgs.qbittorrent
unstable.peazip
# === Communication ===
pkgs.vesktop
pkgs.discord-canary
pkgs.signal-desktop
pkgs.telegram-desktop
# pkgs.thunderbird-latest-unwrapped
# === Communication ===
# === Editors/Office ===
unstable.libreoffice-fresh
# pkgs.kdePackages.kate
pkgs.jetbrains.webstorm
pkgs.jetbrains.rider
pkgs.jetbrains.idea-community
# unstable.neovim
# === Editors/Office ===
# === Media ===
unstable.gimp
unstable.krita
# pkgs.mpv
unstable.losslesscut-bin
unstable.jellyfin-media-player
# === Media ===
unstable.orca-slicer
];
programs.moonlight-mod = {
enable = true;
# stable = {
# extensions = {
# allActivites.enabled = true;
# alwaysFocus.enabled = true;
# betterEmbedsYT = {
# enabled = true;
# config = {
# fullDescription = false;
# expandDescription = true;
# };
# };
# };
# };
};
}

View file

@ -1,14 +0,0 @@
{
config,
pkgs,
unstable,
inputs,
...
}:
{
services.ssh-agent.enable = true;
services.syncthing.enable = true;
}