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 =
import ./nixosModules inputs;
@ -96,8 +99,9 @@
specialArgs = {inherit inputs self;};
modules = [
./hosts/${host}
self.nixosModules.default
inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
self.nixosModules.default
];
}
);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,9 +5,6 @@
lib,
...
}: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
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";};
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
hyprnome = unstable.hyprnome;
hyprshot = unstable.hyprshot;
xdg-desktop-portal-hyprland = unstable.xdg-desktop-portal-hyprland;
obsidian = unstable.obsidian.overrideAttrs (old: {
installPhase =
builtins.replaceStrings ["--ozone-platform=wayland"]

View file

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