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
|
let
|
||||||
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
|
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
|
||||||
wallpapers = { default = "${inputs.wallpapers}/waves/cat-waves.png"; };
|
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 = {
|
commonModule = {
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -177,12 +185,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
inherit extraSpecialArgs;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit hostName user shell inputs wallpapers catppuccin-themes;
|
|
||||||
hyprland = inputs.hyprland;
|
|
||||||
};
|
|
||||||
users.${user} = let
|
users.${user} = let
|
||||||
username = user;
|
username = user;
|
||||||
homeDirectory = "/home/${user}";
|
homeDirectory = "/home/${user}";
|
||||||
|
@ -203,36 +208,14 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in nixpkgs.lib.nixosSystem {
|
in nixpkgs.lib.nixosSystem {
|
||||||
inherit pkgs;
|
inherit pkgs specialArgs;
|
||||||
specialArgs = { inherit hostName user group shell inputs; };
|
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${hostName}/configuration.nix
|
./hosts/${hostName}/configuration.nix
|
||||||
./hosts/${hostName}/hardware-configuration.nix
|
./hosts/${hostName}/hardware-configuration.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
commonModule
|
commonModule
|
||||||
] ++ systemModules ++ serviceModules;
|
] ++ 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 {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
|
@ -266,10 +249,7 @@
|
||||||
hostName = "Northstar";
|
hostName = "Northstar";
|
||||||
user = "xenia";
|
user = "xenia";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in systemConfig {
|
in systemConfig { inherit hostName user system; };
|
||||||
inherit hostName user system;
|
|
||||||
systemModules = default.systemModules ++ [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Ronin = let
|
Ronin = let
|
||||||
hostName = "Ronin";
|
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
|
let
|
||||||
sessionVariables = rec {
|
sessionVariables = rec {
|
||||||
DOOMLOCALDIR = "${config.home.homeDirectory}/.local/share/doomemacs";
|
DOOMLOCALDIR = "${config.home.homeDirectory}/.local/share/doomemacs";
|
||||||
DOOMPROFILELOADFILE = "${DOOMLOCALDIR}/load.el";
|
DOOMPROFILELOADFILE = "${DOOMLOCALDIR}/load.el";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
xdg.configFile.emacs.source = inputs.doom-emacs;
|
xdg.configFile.emacs.source = doom-emacs;
|
||||||
programs.emacs.enable = true;
|
programs.emacs.enable = true;
|
||||||
home = {
|
home = {
|
||||||
inherit sessionVariables;
|
inherit sessionVariables;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, user ? "xenia", inputs, ... }: {
|
{ pkgs, user ? "xenia", hyprland, ... }: {
|
||||||
imports = [ ./desktop.nix inputs.hyprland.nixosModules.default ];
|
imports = [ ./desktop.nix hyprland.nixosModules.default ];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libsForQt5.polkit-kde-agent
|
libsForQt5.polkit-kde-agent
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
programs = {
|
programs = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
package = hyprland.packages.${pkgs.system}.hyprland;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
thunar = {
|
thunar = {
|
||||||
|
|
Loading…
Reference in a new issue