186 lines
5.4 KiB
Nix
186 lines
5.4 KiB
Nix
{
|
|
description = "Thor system configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/release-21.11";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-21.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
home-manager-unstable = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
tex2nix = {
|
|
url = github:Mic92/tex2nix;
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, home-manager
|
|
, unstable
|
|
, home-manager-unstable
|
|
, flake-utils
|
|
, nixos-hardware
|
|
, rust-overlay
|
|
, tex2nix
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
overlays = [
|
|
(import ./rice.nix)
|
|
(rust-overlay.overlay)
|
|
(final: prev: { inherit (tex2nix.packages.${system}) tex2nix; })
|
|
(final: prev: {
|
|
# cocktail-bar-cli = final.callPackage ./custom/cocktail-bar-cli { };
|
|
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
|
lockscreen = final.callPackage ./custom/lockscreen {
|
|
palette = final.rice.colorPalette;
|
|
font = final.rice.font.normal;
|
|
};
|
|
})
|
|
];
|
|
nixpkgsSettings = {
|
|
inherit overlays system;
|
|
config = {
|
|
allowUnfree = true;
|
|
permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency
|
|
};
|
|
};
|
|
pkgs = import nixpkgs nixpkgsSettings;
|
|
unstablePkgs = import nixpkgs nixpkgsSettings;
|
|
|
|
odinBaseModules = [
|
|
{ nixpkgs = nixpkgsSettings; }
|
|
./odin/hardware-configuration.nix
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
nixos-hardware.nixosModules.common-pc-laptop
|
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
./odin/base.nix
|
|
home-manager-unstable.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
# home-manager.nixpkgs.overlays = overlays;
|
|
home-manager.users.bertof = import ./odin.nix;
|
|
}
|
|
];
|
|
|
|
odinStableBaseModules = odinBaseModules ++ [
|
|
home-manager.nixosModules.home-manager
|
|
];
|
|
|
|
odinUnstableBaseModules = odinBaseModules ++ [
|
|
home-manager-unstable.nixosModules.home-manager
|
|
];
|
|
|
|
|
|
thorBaseModules = [
|
|
{ nixpkgs = nixpkgsSettings; }
|
|
./thor/hardware-configuration.nix
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
# home-manager.nixpkgs.overlays = overlays;
|
|
home-manager.users.bertof = import ./thor.nix;
|
|
}
|
|
./thor/configuration.nix
|
|
];
|
|
|
|
thorStableBaseModules = thorBaseModules ++ [
|
|
home-manager.nixosModules.home-manager
|
|
];
|
|
|
|
thorUnstableBaseModules = thorBaseModules ++ [
|
|
home-manager-unstable.nixosModules.home-manager
|
|
];
|
|
|
|
in
|
|
{
|
|
exports = {
|
|
inherit pkgs unstablePkgs;
|
|
};
|
|
|
|
nixosConfigurations = rec {
|
|
|
|
thor = thor-unstable;
|
|
|
|
thor-stable = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = thorStableBaseModules ++ [ ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
thor-unstable = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = thorUnstableBaseModules ++ [ ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
thor-big-data = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = thorUnstableBaseModules ++ [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
|
};
|
|
|
|
odin = odin-nvidia-big-data-unstable;
|
|
|
|
odin-intel = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinStableBaseModules ++ [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
odin-nvidia = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinStableBaseModules ++ [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
odin-intel-unstable = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinUnstableBaseModules ++ [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
odin-nvidia-unstable = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinUnstableBaseModules ++ [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
};
|
|
|
|
odin-intel-big-data-unstable = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinUnstableBaseModules ++ [
|
|
./odin/odin-intel.nix
|
|
./nixos_modules/pro_audio.nix
|
|
./nixos_modules/big_data.nix
|
|
];
|
|
};
|
|
|
|
odin-nvidia-big-data-unstable = unstable.lib.nixosSystem {
|
|
inherit system;
|
|
modules = odinUnstableBaseModules ++ [
|
|
./odin/odin-nvidia.nix
|
|
./nixos_modules/pro_audio.nix
|
|
./nixos_modules/big_data.nix
|
|
];
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|