nixos/flake.nix
ulic-youthlic d6380773b3
chore: System updates and config tweaks
Updated all flake inputs and applied srveral improvements to the
system configurations.

*** Updates
- Ran =flake update= to bring all dependencies to their latest
  versions.
- Pinned =lix-module= to the stable =release-2.93= branch to
  prevent breakages from its main branch.

*** System Configuration
- ssh: Reworked the client configuration to use a global =*= match
  block for secure defaults. Disabled the default home-manager
  config for removing nixpkgs' wrannings.
- intel-vaapi-driver: Enabled =enableHybridCodec= override to avoid
  to build whole package from scratch.
- kde: Forced the Qt platform theme to =kde= to fix a visual bug
  with Stylix.
- onnxruntime: Disabled CUDA/NCCL support to avoid to build the
  whole package from scratch.

*** Application Changes
- firefox: Switched the default browser package to =firefox-beta=
  across the entire configuration (NixOS, home-manager, and niri).
- editor: Removed =hurl= and =cmake-language-server= from the
  editor runtime environment for broken packages.
2025-08-29 11:18:17 +08:00

225 lines
4.6 KiB
Nix

{
description = "A simple NixOS flakes";
outputs =
{
flake-parts,
flake-utils,
home-manager,
treefmt-nix,
nixpkgs,
...
}@inputs:
let
nixpkgs-lib = nixpkgs.lib;
lib = nixpkgs-lib.extend (import ./lib);
in
flake-parts.lib.mkFlake
{
inherit inputs;
specialArgs = {
inherit lib;
rootPath = ./.;
};
}
(
{ lib, ... }:
{
systems = flake-utils.lib.defaultSystems;
imports = [
home-manager.flakeModules.home-manager
treefmt-nix.flakeModule
]
++ lib.youthlic.loadImports ./flake;
flake = {
inherit lib;
nix.settings = {
# substituters shared in home-manager and nixos configuration
substituters =
let
cachix = x: "https://${x}.cachix.org";
in
lib.flatten [
(cachix "nix-community")
"https://cache.nixos.org"
(cachix "cosmic")
];
};
};
}
);
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
# nixpkgs.url = "github:NixOS/nixpkgs/master";
# nixpkgs.follows = "nixos-cosmic/nixpkgs";
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.93";
# url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
helix = {
type = "github";
owner = "helix-editor";
repo = "helix";
ref = "master";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
home-manager = {
type = "github";
owner = "nix-community";
repo = "home-manager";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
betterfox-nix = {
type = "github";
owner = "HeitorAugustoLN";
repo = "betterfox-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
niri-flake = {
type = "github";
owner = "sodiboo";
repo = "niri-flake";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
nixos-cosmic = {
type = "github";
owner = "lilyinstarlight";
repo = "nixos-cosmic";
};
nixos-hardware = {
type = "github";
owner = "NixOS";
repo = "nixos-hardware";
ref = "master";
};
dae = {
type = "github";
owner = "daeuniverse";
repo = "flake.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
flake-parts = {
type = "github";
owner = "hercules-ci";
repo = "flake-parts";
};
flake-utils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
};
sops-nix = {
type = "github";
owner = "Mic92";
repo = "sops-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
stylix = {
type = "github";
owner = "nix-community";
repo = "stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
disko = {
type = "github";
owner = "nix-community";
repo = "disko";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
deploy-rs = {
type = "github";
owner = "serokell";
repo = "deploy-rs";
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "flake-utils";
};
};
treefmt-nix = {
type = "github";
owner = "numtide";
repo = "treefmt-nix";
};
chaotic = {
type = "github";
owner = "chaotic-cx";
repo = "nyx";
};
nur = {
type = "github";
owner = "nix-community";
repo = "NUR";
};
nur-ataraxiasjel = {
type = "github";
owner = "AtaraxiaSjel";
repo = "nur";
};
nixvim = {
type = "github";
owner = "nix-community";
repo = "nixvim";
};
neovim-nightly = {
type = "github";
owner = "nix-community";
repo = "neovim-nightly-overlay";
};
lanzaboote = {
type = "github";
owner = "nix-community";
repo = "lanzaboote";
ref = "v0.4.2";
};
nix-doom = {
type = "github";
owner = "marienz";
repo = "nix-doom-emacs-unstraightened";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}