It’s hard to share my config because it’s scattered on many files and it’s a bit of a WIP and I don’t feel like sharing some sensitive stuff.
But it is something like this:
flake.nix
{
description = "erolm_a's new nix configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-25.05";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, home-manager, nixos-hardware, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
makeNixosConfig = host: extraModules:
lib.nixosSystem {
inherit system;
# Horrible way to do this, I know
# specialArgs = { inherit pkgs-unstable pkgs-unstable-unwrapped; };
modules = extraModules ++ [
./hosts/${host}/nixos.nix
./cachix.nix # fixme
./steam.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.erolm_a = import ./hosts/${host}/home-settings.nix;
};
}
];
};
lib = nixpkgs.lib;
in {
nixosConfigurations = {
dell-xps-nixos = makeNixosConfig "dell-xps"
[ nixos-hardware.nixosModules.dell-xps-15-7590-nvidia ];
};
# unrelated stuff ...
};
}
Then under home.nix:
{ config, pkgs, nix-alien, lib, ... }:
{
imports = [ ./firefox ./dev ];
options.custom = {
nixos = lib.mkOption { type = lib.types.bool; };
#steam = lib.mkOption { type = lib.types.bool; };
dev = lib.mkOption { type = lib.types.bool; };
personal = lib.mkOption { type = lib.types.bool; };
wayland = lib.mkOption { type = lib.types.bool; };
username = lib.mkOption { type = lib.types.str; };
configPath = lib.mkOption { type = lib.types.path; };
};
config = {
nix = {
#registry.nixpkgs.flake = inputs.nixpkgs;
gc = { automatic = true; };
};
home.username = config.custom.username;
home.stateVersion = "24.11";
home.homeDirectory = "/home/${config.custom.username}";
home.packages = with pkgs;
[
# lots of packages here
# But not firefox
] ++ (if config.custom.personal then [
# other packages only to install on this host
] else
[ ]);
# config of unrelated stuff
programs.home-manager.enable = true;
dconf.settings."org/gtk/settings/file-chooser" = {
sort-directories-first = true;
};
# GTK4 Setup
dconf.settings."org/gnome/desktop/interface" = {
gtk-theme = pkgs.lib.mkForce "Breeze";
color-scheme = "prefer-dark";
};
xdg = {
portal = {
config = { common = { default = [ "kde" ]; }; };
enable = config.custom.wayland;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
kdePackages.xdg-desktop-portal-kde
];
};
};
programs.sioyek = {
enable = true;
config = {
shared_database_path = "/home/erolm_a/phd/.sioyek_shared.db";
super_fast_search = "1";
};
};
programs.mpv = {
enable = config.custom.personal;
config = {
gpu-api = "vulkan";
hwdec = "nvdec";
hwdec-codecs = "all";
};
};
# Services
services.mpris-proxy.enable = true;
};
}
Lastly, firefox/default.nix is what I shared above.
There is absolutely no nixpkgs-unstable.
In hosts/dell-xps/nixos.nix, I have commented all the overlays for extra safety. It still tries to build firefox.
I have also tried removing the other host entry from flake.nix, but to no avail.
As for the lock file itself:
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763992789,
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1764440730,
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764628670,
"narHash": "sha256-fJqJkB/qHwFYF4ot/NL2O5ZiM+TNPZXF+N0/TURElO8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "62d844fe2a0efe1cd01a6294c77050875d2e5ba0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}