Pass hostName in args, fix Hyprpanel theming, removed unused flake and overlay

This commit is contained in:
Martin Berg Alstad 2025-04-12 18:51:28 +02:00
parent e3a1dd36d7
commit 00cf2c38f9
Signed by: martials
GPG Key ID: 706F53DD087A91DE
7 changed files with 55 additions and 127 deletions

View File

@ -89,46 +89,51 @@
# #
# ========= Host Configurations ========= # ========= Host Configurations =========
# #
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { nixosConfigurations.desktop =
system = "x86_64-linux"; let
specialArgs = { hostName = "desktop";
inherit in
outputs nixpkgs.lib.nixosSystem {
inputs system = "x86_64-linux";
common specialArgs = {
theme inherit
lib outputs
; inputs
isDarwin = false; common
}; theme
modules = [ lib
./hosts/desktop hostName
home-manager.nixosModules.home-manager ;
{ isDarwin = false;
home-manager = { };
# Backups conflicting files in case of error modules = [
backupFileExtension = "bkp"; ./hosts/desktop
useGlobalPkgs = true; home-manager.nixosModules.home-manager
useUserPackages = true; {
# Passes inputs as an argument to home-manager home-manager = {
extraSpecialArgs = { # Backups conflicting files in case of error
inherit backupFileExtension = "bkp";
inputs useGlobalPkgs = true;
common useUserPackages = true;
theme extraSpecialArgs = {
libHm inherit
; inputs
common
theme
libHm
hostName
;
};
users.${common.username} = import ./hosts/${hostName}/home-manager;
}; };
users.${common.username} = import ./hosts/desktop/home-manager; }
}; {
} nixpkgs.overlays = with inputs; [
{ hyprpanel.overlay
nixpkgs.overlays = with inputs; [ ];
hyprpanel.overlay }
]; ];
} };
];
};
# #
# ========= Formatting ========= # ========= Formatting =========

View File

@ -51,7 +51,7 @@
vlc vlc
vdhcoapp # TODO run "vdhcoapp install" on startup vdhcoapp # TODO run "vdhcoapp install" on startup
onlyoffice-desktopeditors onlyoffice-desktopeditors
inputs.grayjay.packages.${pkgs.system}.grayjay inputs.grayjay.packages.${system}.grayjay
]; ];
nix.settings.experimental-features = [ nix.settings.experimental-features = [

View File

@ -1,74 +0,0 @@
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
...
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
inherit (self) outputs;
common = import ./common.nix;
theme = import ../shared/theme.nix;
in
{
defaultPackage.${system} = home-manager.defaultPackage.${system};
# Adds the nix fmt command to format nix files
formatter.${system} = pkgs.nixfmt-rfc-style;
nixosConfigurations.${common.hostname} = nixpkgs.lib.nixosSystem {
system = system;
specialArgs = {
inherit
outputs
inputs
common
theme
;
}; # Pass args to modules
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
# Backups conflicting files in case of error
backupFileExtension = "bkp";
useGlobalPkgs = true;
useUserPackages = true;
# Passes inputs as an argument to home-manager
extraSpecialArgs = { inherit inputs common theme; };
users.${common.username} = import ./home-manager;
};
}
./overlays.nix
];
};
overlays = {
# Gives access to unstable packages everywhere
unstable-packages = final: _prev: {
unstable = import nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
};
};
}

View File

@ -19,9 +19,15 @@
# Override the final config with an arbitrary set. # Override the final config with an arbitrary set.
# Useful for overriding colors in your selected theme. # Useful for overriding colors in your selected theme.
# Default: {} # TODO fixes theming bugs in recent versions, should be removed when fixed
override = { override = {
theme.bar.menus.text = "#123ABC"; theme = {
bar.transparent = true;
font = {
name = "${theme.nerdFont} NF";
size = "15px";
};
};
}; };
# Configure and theme almost all options from the GUI. # Configure and theme almost all options from the GUI.

View File

@ -1,9 +1,9 @@
{ common, ... }: { hostName, ... }:
{ {
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
hostName = common.hostname; inherit hostName;
# wireless.enable = true; # Enables wireless support via wpa_supplicant. # wireless.enable = true; # Enables wireless support via wpa_supplicant.
}; };

View File

@ -1,7 +0,0 @@
{ inputs, ... }:
{
nixpkgs.overlays = with inputs; [
hyprpanel.overlay
];
}

View File

@ -13,8 +13,6 @@ rec {
pictures = "${dir.home}/Pictures"; pictures = "${dir.home}/Pictures";
}; };
hostname = "desktop";
keymaps = { keymaps = {
layout = "gb,no"; layout = "gb,no";
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT