Complete unstable configuration with home manager

This commit is contained in:
Filippo Berto 2022-04-15 17:16:06 +02:00
parent bbee9d7993
commit df1d6df54e
17 changed files with 412 additions and 312 deletions

View file

@ -3,32 +3,81 @@
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.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-21.11";
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";
# nixos-hardware.inputs.nixpkgs.follows = "nixpkgs";
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, unstable, home-manager, nixos-hardware }:
outputs =
{ self
, nixpkgs
, home-manager
, unstable
, home-manager-unstable
, flake-utils
, nixos-hardware
, rust-overlay
, tex2nix
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
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
};
};
unstablePkgs = import nixpkgs {
inherit system;
config = { allowUnFree = true; };
};
lib = nixpkgs.lib;
pkgs = import nixpkgs nixpkgsSettings;
unstablePkgs = import nixpkgs nixpkgsSettings;
in
{
packages.x86_64-linux = pkgs;
nixosConfigurations = rec {
thor = lib.nixosSystem {
thor = pkgs.lib.nixosSystem {
inherit system;
modules = [
{ nixpkgs = nixpkgsSettings; }
./thor/hardware-configuration.nix
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-pc-ssd
@ -36,10 +85,12 @@
];
};
odin = odin-intel;
odin-intel = lib.nixosSystem {
odin-intel = pkgs.lib.nixosSystem {
inherit system;
modules = [
{ nixpkgs = nixpkgsSettings; }
./odin/hardware-configuration.nix
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop
@ -53,6 +104,7 @@
inherit system;
modules = [
{ nixpkgs = nixpkgsSettings; }
./odin/hardware-configuration.nix
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop
@ -66,6 +118,7 @@
inherit system;
modules = [
{ nixpkgs = nixpkgsSettings; }
./odin/hardware-configuration.nix
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop
@ -73,6 +126,14 @@
./odin/base.nix
./odin/odin-nvidia.nix
./odin/pro_audio.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;
# home-manager.users.bertof.home.packages = [ unstable.hello ];
}
];
};
};