flake: refactor home manager modules into flake output

This commit is contained in:
Aly Raffauf 2024-06-11 14:25:31 -04:00
parent 3cc6fde728
commit 0831fdaeb9
13 changed files with 29 additions and 42 deletions

View file

@ -80,6 +80,9 @@
''; '';
}); });
homeManagerModules.default =
import ./homeManagerModules inputs self;
nixosModules.default = nixosModules.default =
import ./nixosModules inputs; import ./nixosModules inputs;
@ -96,8 +99,9 @@
specialArgs = {inherit inputs self;}; specialArgs = {inherit inputs self;};
modules = [ modules = [
./hosts/${host} ./hosts/${host}
self.nixosModules.default
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
self.nixosModules.default
]; ];
} }
); );

View file

@ -1,4 +1,4 @@
{ inputs: self: {
config, config,
pkgs, pkgs,
lib, lib,

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
lib, lib,
config, config,
inputs,
... ...
}: { }: {
options = { options = {
@ -54,8 +53,8 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
configPackages = [inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".xdg-desktop-portal-hyprland]; configPackages = [pkgs.xdg-desktop-portal-hyprland];
extraPortals = [inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".xdg-desktop-portal-hyprland]; extraPortals = [pkgs.xdg-desktop-portal-hyprland];
}; };
programs.waybar = { programs.waybar = {
@ -141,7 +140,7 @@
]; ];
screenshot = rec { screenshot = rec {
bin = lib.getExe inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprshot; bin = lib.getExe pkgs.hyprshot;
folder = "${config.xdg.userDirs.pictures}/screenshots"; folder = "${config.xdg.userDirs.pictures}/screenshots";
screen = "${bin} -m output -o ${folder}"; screen = "${bin} -m output -o ${folder}";
region = "${bin} -m region -o ${folder}"; region = "${bin} -m region -o ${folder}";

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
lib, lib,
config, config,
inputs,
... ...
}: { }: {
imports = [./randomWallpaper.nix ./redShift.nix]; imports = [./randomWallpaper.nix ./redShift.nix];

View file

@ -1,12 +1,11 @@
{ {
inputs,
config, config,
pkgs, inputs,
lib, lib,
pkgs,
self,
... ...
}: { }: {
imports = [./homeManagerModules];
home = { home = {
username = "aly"; username = "aly";
homeDirectory = "/home/aly"; homeDirectory = "/home/aly";

View file

@ -1,11 +1,11 @@
{ {
config, config,
pkgs, inputs,
lib, lib,
pkgs,
self,
... ...
}: { }: {
imports = [./homeManagerModules];
home = { home = {
username = "dustin"; username = "dustin";
homeDirectory = "/home/dustin"; homeDirectory = "/home/dustin";
@ -16,8 +16,8 @@
libreoffice-fresh libreoffice-fresh
plexamp plexamp
vlc vlc
xfce.xfce4-taskmanager
webcord webcord
xfce.xfce4-taskmanager
zoom-us zoom-us
]; ];
}; };

View file

@ -5,11 +5,8 @@
lib, lib,
... ...
}: { }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
users.aly = import ../../aly.nix; users.aly = import ../../homes/aly.nix;
users.dustin = import ../../dustin.nix; users.dustin = import ../../homes/dustin.nix;
}; };
} }

View file

@ -5,9 +5,6 @@
lib, lib,
... ...
}: { }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
@ -19,6 +16,6 @@
}; };
} }
]; ];
users.aly = import ../../aly.nix; users.aly = import ../../homes/aly.nix;
}; };
} }

View file

@ -5,9 +5,6 @@
lib, lib,
... ...
}: { }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
@ -70,7 +67,7 @@
} }
]; ];
users.aly = { users.aly = {
imports = [../../aly.nix]; imports = [../../homes/aly.nix];
systemd.user = { systemd.user = {
services.backblaze-sync = { services.backblaze-sync = {
Unit = { Unit = {
@ -111,6 +108,6 @@
}; };
}; };
}; };
users.dustin = import ../../dustin.nix; users.dustin = import ../../homes/dustin.nix;
}; };
} }

View file

@ -5,9 +5,6 @@
lib, lib,
... ...
}: { }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
@ -19,6 +16,6 @@
''; '';
} }
]; ];
users.aly = import ../../aly.nix; users.aly = import ../../homes/aly.nix;
}; };
} }

View file

@ -5,9 +5,6 @@
lib, lib,
... ...
}: { }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
@ -37,6 +34,6 @@
}; };
} }
]; ];
users.aly = import ../../aly.nix; users.aly = import ../../homes/aly.nix;
}; };
} }

View file

@ -42,6 +42,8 @@ in {
google-chrome = prev.google-chrome.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; google-chrome = prev.google-chrome.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";};
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland; hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
hyprnome = unstable.hyprnome; hyprnome = unstable.hyprnome;
hyprshot = unstable.hyprshot;
xdg-desktop-portal-hyprland = unstable.xdg-desktop-portal-hyprland;
obsidian = unstable.obsidian.overrideAttrs (old: { obsidian = unstable.obsidian.overrideAttrs (old: {
installPhase = installPhase =
builtins.replaceStrings ["--ozone-platform=wayland"] builtins.replaceStrings ["--ozone-platform=wayland"]

View file

@ -1,9 +1,9 @@
{ {
pkgs,
lib,
config, config,
inputs, inputs,
unstable, lib,
pkgs,
self,
... ...
}: { }: {
imports = [ imports = [
@ -14,8 +14,7 @@
home-manager = { home-manager = {
backupFileExtension = "backup"; backupFileExtension = "backup";
extraSpecialArgs = {inherit inputs unstable;}; sharedModules = [self.homeManagerModules.default];
sharedModules = [{imports = [../../homeManagerModules];}];
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
}; };