Skip to content

Commit

Permalink
fix: re-factor homemanager for garnix?
Browse files Browse the repository at this point in the history
  • Loading branch information
yunmanzr committed Mar 30, 2024
1 parent b9c5777 commit c403c10
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 43 deletions.
68 changes: 30 additions & 38 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@
./nixos/profiles/global.nix # all machines get a global profile
./nixos/modules/nixos # all machines get nixos modules
./nixos/hosts/${hostname} # load this host's config folder for machine-specific config
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs hostname system;
};
users.truxnell = ./nixos/home/truxnell;
};
}
]
, profileModules ? [ ]
}:
Expand All @@ -103,7 +113,7 @@

};
in
{
rec {

"rickenbacker" = mkNixosConfig {
# NixOS laptop (dualboot windows, dunno why i kept it)
Expand Down Expand Up @@ -164,46 +174,28 @@
};


homeConfigurations = {

# For servers (no gui)
server = { pkgs, lib, username, ... }: {
imports = [
./nixos/home/profiles/global.nix
./nixos/home/profiles/server.nix
./nixos/home/modules
];
};

# For workstations (X11 + awesome)
desktop = { pkgs, lib, username, ... }: {
imports = [
./nixos/home/profiles/global.nix
./nixos/home/profiles/workstation.nix
./nixos/home/modules
];
};
# # nix build .#images.rpi4
# rpi4 = nixpkgs.lib.nixosSystem {
# inherit specialArgs;

# modules = defaultModules ++ [
# "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
# ./nixos/hosts/images/sd-image
# ];
# };
# # nix build .#images.iso
# iso = nixpkgs.lib.nixosSystem {
# inherit specialArgs;

# modules = defaultModules ++ [
# "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
# "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix"
# ./nixos/hosts/images/cd-dvd
# ];
# };

# # nix build .#images.rpi4
# rpi4 = nixpkgs.lib.nixosSystem {
# inherit specialArgs;

# modules = defaultModules ++ [
# "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
# ./nixos/hosts/images/sd-image
# ];
# };
# # nix build .#images.iso
# iso = nixpkgs.lib.nixosSystem {
# inherit specialArgs;

# modules = defaultModules ++ [
# "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
# "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix"
# ./nixos/hosts/images/cd-dvd
# ];
# };
};
# simple shortcut to allow for easier referencing of correct
# key for building images
# > nix build .#images.rpi4
Expand Down
2 changes: 1 addition & 1 deletion nixos/home/modules/shell/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ ... }: {
imports = [
./fish
# ./fish
];
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{ lib, pkgs, self, config, ... }:
with config;
{

imports = [
../modules
];

# services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
systemd.user.sessionVariables = {
EDITOR = "nvim";
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions nixos/profiles/role-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ with lib;

config = {

# Link in desktop home mamanger profile
home-manager.users.truxnell = self.homeConfigurations.server;

# Enable monitoring for remote scraiping
mySystem.services.promMonitoring.enable = true;
Expand Down
2 changes: 0 additions & 2 deletions nixos/profiles/role-worstation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
with config;
{

# Link in desktop home mamanger profile
home-manager.users.truxnell = self.homeConfigurations.desktop;

mySystem = {

Expand Down

0 comments on commit c403c10

Please sign in to comment.