From bbee9d79931e8bbf14a0077c634b24c05a1e9d9a Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Thu, 14 Apr 2022 00:15:30 +0200 Subject: [PATCH] Unstable config --- flake.lock | 27 ++++++++++++++++++++++----- flake.nix | 36 +++++++++++++++++++++++++++++++++--- odin/base.nix | 2 +- odin/odin-nvidia.nix | 7 ------- thor/configuration.nix | 2 +- 5 files changed, 57 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 8401e5d..a6b2ecb 100644 --- a/flake.lock +++ b/flake.lock @@ -38,16 +38,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1649760692, - "narHash": "sha256-b+5Uo3yA2eFjvaGGeeLN7I3IJCxHL+jIQpB0HmBlqK4=", + "lastModified": 1649856708, + "narHash": "sha256-xVUExhQ3i/usCei3C4ZHUrW+8FfGV1Eo9CQmewjFd2k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "838eefb4f93f2306d4614aafb9b2375f315d917f", + "rev": "3ec9e6968fec5f13cfa7f63a32f343ac2f990637", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-21.11", + "ref": "release-21.11", "repo": "nixpkgs", "type": "github" } @@ -56,7 +56,24 @@ "inputs": { "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "unstable": "unstable" + } + }, + "unstable": { + "locked": { + "lastModified": 1649673231, + "narHash": "sha256-1T3AFscfS7s9pkFA+UIDrHH3/RLVjRdYs5ImuLYpOlE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "33772708c6d0e33f697426ba386aa0149cbcbecb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 9e8a551..c5e0e38 100644 --- a/flake.nix +++ b/flake.nix @@ -2,20 +2,25 @@ description = "Thor system configuration"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; + nixpkgs.url = "github:NixOS/nixpkgs/release-21.11"; + unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager/release-21.11"; nixos-hardware.url = "github:NixOS/nixos-hardware"; # nixos-hardware.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, home-manager, nixos-hardware }: + outputs = { self, nixpkgs, unstable, home-manager, nixos-hardware }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; }; }; + unstablePkgs = import nixpkgs { + inherit system; + config = { allowUnFree = true; }; + }; lib = nixpkgs.lib; in { @@ -44,7 +49,32 @@ ./odin/pro_audio.nix ]; }; + odin-intel-unstable = unstable.lib.nixosSystem { + inherit system; + + modules = [ + ./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 + ./odin/odin-intel.nix + ./odin/pro_audio.nix + ]; + }; + odin-nvidia-unstable = unstable.lib.nixosSystem { + inherit system; + + modules = [ + ./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 + ./odin/odin-nvidia.nix + ./odin/pro_audio.nix + ]; + }; }; }; - } diff --git a/odin/base.nix b/odin/base.nix index 26ba091..21bac8a 100644 --- a/odin/base.nix +++ b/odin/base.nix @@ -156,7 +156,7 @@ }; }; - services.dbus.packages = with pkgs; [ gnome.dconf ]; + services.dbus.packages = with pkgs; [ dconf ]; services.gnome.gnome-keyring.enable = true; hardware.bluetooth.enable = true; # services.blueman.enable = true; diff --git a/odin/odin-nvidia.nix b/odin/odin-nvidia.nix index c21ef24..c2fd154 100644 --- a/odin/odin-nvidia.nix +++ b/odin/odin-nvidia.nix @@ -5,13 +5,6 @@ { config, pkgs, ... }: { - imports = - [ - - - ./base.nix - ]; - boot.initrd.kernelModules = [ "i915" ]; hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware; diff --git a/thor/configuration.nix b/thor/configuration.nix index aee7e41..c35010f 100644 --- a/thor/configuration.nix +++ b/thor/configuration.nix @@ -98,7 +98,7 @@ }; }; clamav = { daemon.enable = true; updater.enable = true; }; - dbus.packages = with pkgs; [ gnome.dconf ]; + dbus.packages = with pkgs; [ dconf ]; gnome.gnome-keyring.enable = true; gvfs = { enable = true; package = pkgs.gnome3.gvfs; }; fwupd.enable = true;