Hybrid cloud cluster monorepo with Ansible, K8s, NixOS, and Terraform. cute.haus
ansible terraform nix k8s
1

Configure Feed

Select the types of activity you want to include in your feed.

nix/{nixuers}: flatten modules

Aly Raffauf (Jun 10, 2026, 8:06 PM EDT) 300abd49 dae80468

+26 -25
+8 -5
nix/nixos/programs/nix.nix
··· 2 2 flake.modules.nixos.nix-config = { 3 3 config, 4 4 lib, 5 - options, 6 5 ... 7 6 }: let 8 7 buildMachines = [ ··· 93 92 users.groups.nixbuild = lib.mkIf isBuildMachine {}; 94 93 } 95 94 96 - (lib.optionalAttrs (options ? mySshKeys) { 97 - mySshKeys.authorizedUsers.nixbuild = lib.mkIf isBuildMachine ["aly" "root"]; 98 - }) 99 - 100 95 { 101 96 myRecipes.nix = '' 102 97 # Garbage collect Nix store ··· 122 117 ''; 123 118 } 124 119 ]; 120 + flake.modules.nixos.ssh-keys = {config, lib, ...}: let 121 + buildMachineHosts = ["jubilife"]; 122 + isBuildMachine = lib.elem config.networking.hostName buildMachineHosts; 123 + in { 124 + config = lib.mkIf isBuildMachine { 125 + mySshKeys.authorizedUsers.nixbuild = ["aly" "root"]; 126 + }; 127 + }; 125 128 }
+18 -20
nix/nixos/users.nix
··· 2 2 flake.modules.nixos.users = { 3 3 config, 4 4 lib, 5 - options, 6 5 pkgs, 7 6 ... 8 7 }: { ··· 31 30 }; 32 31 }; 33 32 34 - config = lib.mkMerge [ 35 - { 36 - programs.fish.enable = true; 33 + config = { 34 + programs.fish.enable = true; 35 + 36 + users = { 37 + defaultUserShell = pkgs.fish; 38 + mutableUsers = false; 37 39 38 40 users = { 39 - defaultUserShell = pkgs.fish; 40 - mutableUsers = false; 41 - 42 - users = { 43 - aly = { 44 - description = "Aly Raffauf"; 45 - extraGroups = config.myUsers.defaultGroups; 46 - hashedPassword = config.myUsers.aly.password; 47 - isNormalUser = true; 48 - uid = 1000; 49 - }; 41 + aly = { 42 + description = "Aly Raffauf"; 43 + extraGroups = config.myUsers.defaultGroups; 44 + hashedPassword = config.myUsers.aly.password; 45 + isNormalUser = true; 46 + uid = 1000; 50 47 }; 51 48 }; 52 - } 53 - (lib.optionalAttrs (options ? mySshKeys) { 54 - mySshKeys.authorizedUsers.aly = ["aly"]; 55 - }) 56 - ]; 49 + }; 50 + }; 51 + }; 52 + 53 + flake.modules.nixos.ssh-keys = { 54 + mySshKeys.authorizedUsers.aly = ["aly"]; 57 55 }; 58 56 }