Remove Monarch
Slightly rewrite specialArgs and extraSpecialArgs to ensure consistency and also stop passing input around
This commit is contained in:
parent
cfee5dd4ec
commit
7d31bf8b54
66
flake.nix
66
flake.nix
|
@ -51,7 +51,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
|
||||
wallpapers = { default = "${inputs.wallpapers}/waves/cat-waves.png"; };
|
||||
|
@ -108,6 +108,14 @@
|
|||
})
|
||||
];
|
||||
};
|
||||
specialArgs = {
|
||||
inherit hostName user group shell;
|
||||
inherit (inputs) hyprland;
|
||||
};
|
||||
extraSpecialArgs = specialArgs // {
|
||||
inherit wallpapers catppuccin-themes;
|
||||
inherit (inputs) doom-emacs;
|
||||
};
|
||||
commonModule = {
|
||||
nix = {
|
||||
settings = {
|
||||
|
@ -177,12 +185,9 @@
|
|||
];
|
||||
};
|
||||
home-manager = {
|
||||
inherit extraSpecialArgs;
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit hostName user shell inputs wallpapers catppuccin-themes;
|
||||
hyprland = inputs.hyprland;
|
||||
};
|
||||
users.${user} = let
|
||||
username = user;
|
||||
homeDirectory = "/home/${user}";
|
||||
|
@ -203,36 +208,14 @@
|
|||
};
|
||||
};
|
||||
in nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs;
|
||||
specialArgs = { inherit hostName user group shell inputs; };
|
||||
inherit pkgs specialArgs;
|
||||
modules = [
|
||||
./hosts/${hostName}/configuration.nix
|
||||
./hosts/${hostName}/hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
home-manager.nixosModules.home-manager
|
||||
commonModule
|
||||
] ++ systemModules ++ serviceModules;
|
||||
};
|
||||
homeConfig = { hostName ? default.hostName, user ? default.user
|
||||
, system ? default.system, shell ? default.shell
|
||||
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
||||
}:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit hostName user shell inputs wallpapers catppuccin-themes;
|
||||
};
|
||||
modules = [
|
||||
./home/shell/${shell}.nix
|
||||
./hosts/${hostName}/home.nix
|
||||
{
|
||||
home = {
|
||||
inherit stateVersion;
|
||||
username = user;
|
||||
homeDirectory = nixpkgs.lib.mkDefault "/home/${user}";
|
||||
};
|
||||
}
|
||||
] ++ homeModules;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
|
||||
|
@ -266,10 +249,7 @@
|
|||
hostName = "Northstar";
|
||||
user = "xenia";
|
||||
system = "x86_64-linux";
|
||||
in systemConfig {
|
||||
inherit hostName user system;
|
||||
systemModules = default.systemModules ++ [ ];
|
||||
};
|
||||
in systemConfig { inherit hostName user system; };
|
||||
|
||||
Ronin = let
|
||||
hostName = "Ronin";
|
||||
|
@ -293,25 +273,5 @@
|
|||
};
|
||||
|
||||
};
|
||||
homeConfigurations = {
|
||||
"tux@Monarch" = let
|
||||
hostName = "Monarch";
|
||||
user = "tux";
|
||||
system = "aarch64-darwin";
|
||||
shell = "zsh";
|
||||
in homeConfig {
|
||||
inherit hostName user system shell;
|
||||
homeModules = [
|
||||
./home/accounts/default.nix
|
||||
./home/pass/default.nix
|
||||
./home/git/default.nix
|
||||
./home/ssh/default.nix
|
||||
./home/tui/default.nix
|
||||
./home/tmux/default.nix
|
||||
./home/alacritty/default.nix
|
||||
./home/emacs/default.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, doom-emacs, ... }:
|
||||
let
|
||||
sessionVariables = rec {
|
||||
DOOMLOCALDIR = "${config.home.homeDirectory}/.local/share/doomemacs";
|
||||
DOOMPROFILELOADFILE = "${DOOMLOCALDIR}/load.el";
|
||||
};
|
||||
in {
|
||||
xdg.configFile.emacs.source = inputs.doom-emacs;
|
||||
xdg.configFile.emacs.source = doom-emacs;
|
||||
programs.emacs.enable = true;
|
||||
home = {
|
||||
inherit sessionVariables;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, user ? "xenia", inputs, ... }: {
|
||||
imports = [ ./desktop.nix inputs.hyprland.nixosModules.default ];
|
||||
{ pkgs, user ? "xenia", hyprland, ... }: {
|
||||
imports = [ ./desktop.nix hyprland.nixosModules.default ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
libsForQt5.polkit-kde-agent
|
||||
xdg-utils
|
||||
|
@ -72,7 +72,7 @@
|
|||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
package = hyprland.packages.${pkgs.system}.hyprland;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
thunar = {
|
||||
|
|
Loading…
Reference in a new issue