Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol committed Jan 22, 2025
1 parent f58742b commit ecc7f5b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 28 deletions.
1 change: 1 addition & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ sops updatekeys secrets/default.yaml
- <https://github.com/Xe/nixos-configs>
- <https://github.com/jakehamilton/config>
- <https://github.com/drupol/nixos-x260>
- <https://github.com/gvolpe/nix-config>
58 changes: 30 additions & 28 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,34 @@
};
}
);
inventory = [
{
system = "aarch64-linux";
host = "pi0";
user = "lab";
}
{
system = "x86_64-linux";
host = "apu";
user = "router";
}
{
system = "x86_64-linux";
host = "tower";
user = "gael";
}
{
system = "x86_64-linux";
host = "thinkpad";
user = "gael";
}
{
system = "x86_64-linux";
host = "iso";
user = "nixos";
iso = true;
}
];

in
{
Expand Down Expand Up @@ -106,34 +134,8 @@
};
});

nixosConfigurations = myLib.os.mkNixosSystems [
{
system = "aarch64-linux";
host = "pi0";
user = "lab";
}
{
system = "x86_64-linux";
host = "apu";
user = "router";
}
{
system = "x86_64-linux";
host = "tower";
user = "gael";
}
{
system = "x86_64-linux";
host = "thinkpad";
user = "gael";
}
{
system = "x86_64-linux";
host = "iso";
user = "nixos";
iso = true;
}
];
nixosConfigurations = myLib.os.mkNixosSystems inventory;
homeConfigurations = myLib.user.mkHomeManagerEnvironements inventory;

packages = forSystems ({ pkgs, system }: pkgs.myPkgs);

Expand Down
1 change: 1 addition & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

{
os = import ./os { inherit inputs; };
user = import ./user { inherit inputs; };
}
19 changes: 19 additions & 0 deletions lib/user/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ inputs, ... }:

let
inherit (inputs) self nixpkgs sops-nix nur home-manager udev-nix _1password-shell-plugins;
in
rec {
mkHomeManagerEnvironement = { system, host, user, iso ? false, ... }: home-manager.lib.homeManagerConfiguration {
modules = [ ];
pkgs = import nixpkgs { inherit system; };
};
mkHomeManagerEnvironements = environments: builtins.listToAttrs (
builtins.map
(environment: {
name = environment.user;
value = mkHomeManagerEnvironement environment;
})
environments
);
}
2 changes: 2 additions & 0 deletions users/gael/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@
};
theme = {
mode = "system";
dark = "Solarized Dark";
ligh = "Solarized Light";
};
load_direnv = "direct";
ui_font_family = "JetBrains Mono";
Expand Down

0 comments on commit ecc7f5b

Please sign in to comment.