Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
935a1f7
fix: :bug: explicitly set battery charge thresholds
ClementBobin Jun 13, 2025
087edab
fix: :bug: mark yubikey touch detection task as complete
ClementBobin Jun 14, 2025
bc3a674
feat: add hyprland keybindings configuration
ClementBobin Jun 15, 2025
d195181
refactor: reorganize module for improved package management
ClementBobin Jun 15, 2025
9b5b159
feat: add configuration for container engines support
ClementBobin Jun 15, 2025
97dc106
refactor: update module paths to use hm namespace for consistency
ClementBobin Jun 15, 2025
dfe53e1
refactor: update module paths to use system namespace for consistency
ClementBobin Jun 15, 2025
313f33f
refactor: consolidate tailscale vpn configuration
ClementBobin Jun 15, 2025
844085e
feat: add joystick support for games configuration
ClementBobin Jun 15, 2025
bff51e9
feat: add game configuration module
ClementBobin Jun 15, 2025
18d60b7
refactor: remove unused game configuration files
ClementBobin Jun 15, 2025
45abaab
refactor: rename options for browser and cli tools for clarity
ClementBobin Jun 15, 2025
e081821
refactor: streamline keybindings configuration in hydenix
ClementBobin Jun 15, 2025
7878c75
refactor: update browser to use clients instead of emulators
ClementBobin Jun 15, 2025
df25076
refactor: remove lutris from games clients configuration
ClementBobin Jun 22, 2025
16d2220
refactor: remove unused environment variable
ClementBobin Jun 22, 2025
eeb3426
refactor: simplify python and remove shell.nix generation
ClementBobin Jun 22, 2025
e5d9749
refactor: add prisma engine binaries to session variables
ClementBobin Jun 22, 2025
94ef4c5
refactor: replace keepassxc with bitwarden in desktop configuration
ClementBobin Jun 22, 2025
68c56af
refactor: add discord communication module and update configuration
ClementBobin Jun 22, 2025
04b0937
refactor: add pine host configuration and deployment support
ClementBobin Jun 24, 2025
4116ee3
refactor: enhance dotnet configuration with extrapackages support
ClementBobin Jun 24, 2025
e8e59da
refactor: update obsidian path to use home directory configuration
ClementBobin Jun 24, 2025
6e5f453
refactor: update ignore-file-retriever to normalize paths
ClementBobin Jun 24, 2025
98b7a07
refactor: add macos configuration support in flake.nix
ClementBobin Jun 24, 2025
300a128
refactor: add nix-darwin configuration to flake.lock
ClementBobin Jun 24, 2025
4d83b5e
refactor: update option types to use dynamic enums for various modules
ClementBobin Jun 24, 2025
fa83270
refactor: enhance rust package handling to abort on unknown packages
ClementBobin Jun 24, 2025
0ce6e62
refactor: change default emulator list to empty
ClementBobin Jun 24, 2025
e34abb7
refactor: add nexus package support to games module
ClementBobin Jun 24, 2025
e6aba3b
refactor: remove 'none' option from antivirus engine selection
ClementBobin Jun 24, 2025
5e3e69f
refactor: :art: moved modules from fern to sys
ClementBobin Jun 24, 2025
cd83420
refactor: update usage message to include 'pine' option in rb command
ClementBobin Jun 24, 2025
e71f550
refactor: consolidate android sdk configuration in nix files
ClementBobin Jun 24, 2025
d0effeb
refactor: reorder game module imports in default.nix
ClementBobin Jun 24, 2025
6e036d0
refactor: update discord rpc option to default to false
ClementBobin Jun 24, 2025
40c027a
refactor: ensure unique packages in mail communication module
ClementBobin Jun 24, 2025
0d51c32
refactor: ensure unique ide packages in jetbrains configuration
ClementBobin Jun 24, 2025
11230d3
refactor: ensure unique editor packages in documentation configuration
ClementBobin Jun 24, 2025
24e572e
refactor: ensure unique game packages in games module
ClementBobin Jun 24, 2025
01746f9
refactor: update tunnel for cloudflare and ngrok with recursive targets
ClementBobin Jun 24, 2025
ddd049c
refactor: add 'nexus' to supported gaming clients in configuration
ClementBobin Jun 24, 2025
25cae4b
refactor: enhance battery charge threshold configuration
ClementBobin Jun 24, 2025
1db1838
refactor: streamline antivirus engine package configuration
ClementBobin Jun 24, 2025
d02c122
refactor: ensure unique password manager packages
ClementBobin Jun 24, 2025
4c4e745
refactor: simplify ngrok configuration in tunnel setup
ClementBobin Jun 25, 2025
14de2df
refactor: remove gamescope configuration from system modules
ClementBobin Jun 25, 2025
e56b489
refactor: restructure games configuration to include gamemode support
ClementBobin Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- 🪵 Server: cedar
- VMs: [hostname]-vm (fern-vm, oak-vm, cedar-vm)

- [ ] hydenix: some yubikey touch detection for hyprlock and waybar <https://github.com/maximbaz/yubikey-touch-detector>
- [x] hydenix: some yubikey touch detection for hyprlock and waybar <https://github.com/maximbaz/yubikey-touch-detector>
- [?] bluemail
- [x] scalar
- [x] rust
Expand All @@ -20,4 +20,3 @@
- [ ] Update flake
- [ ] Test workflows
- [x] Prisma module
- [ ] fix printing
22 changes: 22 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 36 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

# Hydenix and its nixpkgs - kept separate to avoid conflicts
hydenix = {
# Available inputs:
# Main: github:richen604/hydenix
# Dev: github:richen604/hydenix/dev
# Commit: github:richen604/hydenix/<commit-hash>
# Version: github:richen604/hydenix/v1.0.0
url = "github:richen604/hydenix";
};

Expand All @@ -29,12 +24,14 @@
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};

nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
{
...
}@inputs:
outputs = { self, nix-darwin, ... }@inputs:
let
vars = {
user = "mirage";
Expand All @@ -54,6 +51,20 @@
];
};

# Create macOS configuration
mkDarwinHost =
hostname:
nix-darwin.lib.darwinSystem {
system = "aarch64-darwin"; # or "x86_64-darwin" for Intel Macs
specialArgs = {
inherit inputs vars;
hostname = hostname;
};
modules = [
./hosts/darwin/${hostname}
];
};

# Create VM variant function
mkVm =
hostname:
Expand All @@ -77,7 +88,6 @@
mkDeployNode = hostname: {
hostname = hostname;
profiles.system = {
# Change from root to your user
user = "${vars.user}";
path = inputs.deploy-rs.lib.${system}.activate.nixos inputs.self.nixosConfigurations.${hostname};
sshUser = "${vars.user}";
Expand All @@ -95,13 +105,21 @@
nixosConfigurations = {
fern = mkHost "fern";
oak = mkHost "oak";
pine = mkHost "pine";
"fern.local" = mkHost "fern";
"oak.local" = mkHost "oak";
"pine.local" = mkHost "pine";
};

darwinConfigurations = {
# Replace "macbook" with your actual hostname (run 'scutil --get LocalHostName' to find it)
macbook = mkDarwinHost "macbook";
};

deploy.nodes = {
fern = mkDeployNode "fern.local";
oak = mkDeployNode "oak.local";
pine = mkDeployNode "pine.local";
};

packages.${inputs.hydenix.lib.system} = {
Expand All @@ -119,23 +137,28 @@
${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ;;
"fern")
${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;;
"pine")
${pkgs.deploy-rs}/bin/deploy --skip-checks .#pine ;;
"all")
${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak
${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern
${pkgs.deploy-rs}/bin/deploy --skip-checks .#pine
;;
*) echo "Usage: rb [oak|fern|all]" >&2; exit 1 ;;
*) echo "Usage: rb [oak|fern|pine|all]" >&2; exit 1 ;;
esac
'';
};

# Only check the specific deployment node
checks.${system} = {
oak-check = inputs.deploy-rs.lib.${system}.deployChecks {
nodes.oak = inputs.self.deploy.nodes.oak;
};
fern-check = inputs.deploy-rs.lib.${system}.deployChecks {
nodes.fern = inputs.self.deploy.nodes.fern;
};
pine-check = inputs.deploy-rs.lib.${system}.deployChecks {
nodes.pine = inputs.self.deploy.nodes.pine;
};
};
};
}
}
6 changes: 4 additions & 2 deletions hosts/oak/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ let
(final: prev: {
userPkgs = import inputs.nixpkgs {
inherit (inputs.hydenix.lib) system;
config.allowUnfree = true;
android_sdk.accept_license = true;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
})
];
Expand Down
88 changes: 88 additions & 0 deletions hosts/pine/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
inputs,
vars,
...
}:
let
pkgs = import inputs.hydenix.inputs.hydenix-nixpkgs {
inherit (inputs.hydenix.lib) system;
config = {
allowUnfree = true;
};
overlays = [
inputs.hydenix.lib.overlays
(final: prev: {
userPkgs = import inputs.nixpkgs {
inherit (inputs.hydenix.lib) system;
config.allowUnfree = true;
};
})
];
};
in
{
nixpkgs.pkgs = pkgs;

imports = [
inputs.hydenix.inputs.home-manager.nixosModules.home-manager
inputs.hydenix.lib.nixOsModules
./hardware-configuration.nix
../../modules/system/hosts/pine


# === GPU-specific configurations ===

/*
For drivers, we are leveraging nixos-hardware
Most common drivers are below, but you can see more options here: https://github.com/NixOS/nixos-hardware
*/

#! EDIT THIS SECTION
# === Other common modules ===
inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc
inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc-ssd
];

boot.kernelParams = [ "video=HDMI-A-1:e" ];

home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
};
users."${vars.user}" =
{ ... }:
{
# hm import
imports = [
../../modules/hm/hosts/pine
];

desktops.hydenix = {
enable = true;
hostname = "pine";
};
};
};

hydenix = {
enable = true;
hostname = "pine";
timezone = "Europe/Paris";
locale = "fr_FR.UTF-8";
};

users.users.${vars.user} = {
isNormalUser = true;
#initialPassword = "${vars.user}";
extraGroups = [
"wheel"
"networkmanager"
"video"
"lp"
"scanner"
];
shell = pkgs.zsh;
};
}
56 changes: 36 additions & 20 deletions modules/hm/common/browser/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
{ pkgs, lib, config, ... }:

let
cfg = config.modules.common.browser;
cfg = config.modules.hm.browser;

# Map browsers to their packages (using pkgs.)
browserToPackage = with pkgs; {
chromium = [ chromium ];
chrome = [ google-chrome ];
firefox = [ firefox ];
brave = [ brave ];
vivaldi = [ vivaldi ];
edge = [ microsoft-edge ];
};

# Map browsers to their drivers (using pkgs.)
browserToDriver = with pkgs; {
chromium = chromedriver;
chrome = chromedriver;
vivaldi = chromedriver;
brave = chromedriver;
firefox = geckodriver;
edge = msedgedriver;
};

# Get packages for enabled browsers
browserPackages = lib.concatMap (browser: browserToPackage.${browser} or []) cfg.clients;

# Get drivers for enabled browsers (if driver.enable is true)
drivers = lib.optionals cfg.driver.enable (
lib.unique (lib.filter (drv: drv != null) (
map (browser: browserToDriver.${browser} or null) cfg.clients
))
);

in
{
options.modules.common.browser = {
emulators = lib.mkOption {
type = lib.types.listOf (lib.types.enum ["chromium" "chrome" "firefox" "brave" "vivaldi" "edge"]);
options.modules.hm.browser = {
clients = lib.mkOption {
type = lib.types.listOf (lib.types.enum (lib.attrNames browserToDriver));
default = [];
};

Expand All @@ -18,21 +49,6 @@ in
};

config = {
home.packages = with pkgs;
lib.unique (
(lib.optionals (lib.elem "chromium" cfg.emulators) [chromium]) ++
(lib.optionals (lib.elem "chrome" cfg.emulators) [google-chrome]) ++
(lib.optionals (lib.elem "firefox" cfg.emulators) [firefox]) ++
(lib.optionals (lib.elem "brave" cfg.emulators) [brave]) ++
(lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++
(lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++
(lib.optionals
(cfg.driver.enable &&
(lib.any (browser: lib.elem browser cfg.emulators)
[ "chromium" "chrome" "vivaldi" "brave" ]))
[chromedriver]) ++
(lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++
(lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver])
);
home.packages = lib.unique (browserPackages ++ drivers);
};
}
57 changes: 57 additions & 0 deletions modules/hm/common/communication/discord.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{ pkgs, lib, config, ... }:

let
cfg = config.modules.hm.communication.discord;

# Map Discord clients to their packages
clientsToPackage = with pkgs; {
discord = discord;
discordo = discordo;
discord-sh = discord-sh;
discord-ptb = discord-ptb;
discord-canary = discord-canary;
discord-development = discord-development;
cordless = cordless;
};

# Map overlay names to their packages
overlaysToPackage = with pkgs; {
"discover-overlay" = discover-overlay;
overlayed = overlayed;
};

# Get packages for enabled clients
clientPackages = map (client: clientsToPackage.${client}) cfg.clients;

# Get overlay packages
overlayPackages = map (overlay: overlaysToPackage.${overlay}) cfg.overlays;

# RPC package
rpcPackage = lib.optional cfg.rpc.enable pkgs.discord-rpc;

in
{
options.modules.hm.communication.discord = {
clients = lib.mkOption {
type = lib.types.listOf (lib.types.enum (lib.attrNames clientsToPackage));
default = [];
description = "List of Discord clients to install";
};

overlays = lib.mkOption {
type = lib.types.listOf (lib.types.enum (lib.attrNames overlaysToPackage));
default = [];
description = "List of Discord overlays to install";
};

rpc.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether to enable Discord Rich Presence support";
};
};

config = lib.mkIf (cfg.clients != [] || cfg.overlays != [] || cfg.rpc.enable) {
home.packages = clientPackages ++ overlayPackages ++ rpcPackage;
};
}
Loading
Loading