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,7 +89,11 @@
# #
# ========= Host Configurations ========= # ========= Host Configurations =========
# #
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { nixosConfigurations.desktop =
let
hostName = "desktop";
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inherit
@ -98,6 +102,7 @@
common common
theme theme
lib lib
hostName
; ;
isDarwin = false; isDarwin = false;
}; };
@ -110,16 +115,16 @@
backupFileExtension = "bkp"; backupFileExtension = "bkp";
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
# Passes inputs as an argument to home-manager
extraSpecialArgs = { extraSpecialArgs = {
inherit inherit
inputs inputs
common common
theme theme
libHm libHm
hostName
; ;
}; };
users.${common.username} = import ./hosts/desktop/home-manager; users.${common.username} = import ./hosts/${hostName}/home-manager;
}; };
} }
{ {

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