diff --git a/flake.lock b/flake.lock index af3a1c95..e4ddd639 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ ] }, "locked": { - "lastModified": 1633210102, - "narHash": "sha256-TIGST5kvhV6xI6yyrdQHyzshcy534HqVEOMao4iJSxc=", + "lastModified": 1633256200, + "narHash": "sha256-dYV982LAA2IKuzpw/+EGuBWcymyKFWviJWzueqxwEiA=", "owner": "nix-community", "repo": "home-manager", - "rev": "0f3dfc94ef9f70cdb800e0cf8e22ec9d3a0a3c70", + "rev": "e0a87d75e9083569f73efc47b58c0e3fa4f99382", "type": "github" }, "original": { @@ -83,11 +83,11 @@ }, "nix-colors": { "locked": { - "lastModified": 1633227652, - "narHash": "sha256-4nZs9TwbMDSTwSeTnTnLgA9rfPNz5RF3iZ/lpGsFBHU=", + "lastModified": 1633229592, + "narHash": "sha256-Fa1At21gl82MpmbRyqjSVI89bpVPQzTTG0sGcQR8Ya8=", "owner": "misterio77", "repo": "nix-colors", - "rev": "e0262e7949933d62431a912cdd3f46f79691c25b", + "rev": "b34ac11267620e57d020ad8a818c09d7ede441a6", "type": "github" }, "original": { @@ -114,11 +114,11 @@ }, "nur": { "locked": { - "lastModified": 1633226981, - "narHash": "sha256-aygSCXzd1X9Exk++gz6jK1NvyLzoVpEVpEJs7wvzGWk=", + "lastModified": 1633268918, + "narHash": "sha256-hjeu/sZl4VSm3UkJvayOeK96ng+8anfaq0hQ0kLUxo4=", "owner": "nix-community", "repo": "NUR", - "rev": "ddfc44de7293faadd101442fb17fbc4929be5aed", + "rev": "d7a9c294134d308f8a1ab4df691d20489331299c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index acfe9802..687ce639 100644 --- a/flake.nix +++ b/flake.nix @@ -17,13 +17,13 @@ nur.url = "github:nix-community/NUR"; }; - outputs = {... }@inputs: + outputs = { nixpkgs, home-manager, nix-colors, hardware, impermanence, nur, flake-utils, ... }: let # Make system configuration, given hostname and system type mkSystem = { hostname, system }: - inputs.nixpkgs.lib.nixosSystem { + nixpkgs.lib.nixosSystem { inherit system; - specialArgs = { inherit inputs; }; + specialArgs = { inherit nixpkgs nix-colors hardware impermanence nur; }; modules = [ ./hosts/${hostname} ./modules/nixos @@ -32,9 +32,9 @@ }; # Make home configuration, given username, hostname, and system type mkHome = { username, hostname, system }: - inputs.home-manager.lib.homeManagerConfiguration { + home-manager.lib.homeManagerConfiguration { inherit username system; - extraSpecialArgs = { inherit inputs hostname; }; + extraSpecialArgs = { inherit hostname impermanence nix-colors nur; }; configuration = ./users/${username}; extraModules = [ ./modules/home-manager @@ -70,10 +70,10 @@ }; } # Devshell for bootstrapping - // inputs.flake-utils.lib.eachDefaultSystem (system: + // flake-utils.lib.eachDefaultSystem (system: let - pkgs = import inputs.nixpkgs { inherit system; }; - home-manager = inputs.home-manager.defaultPackage.${system}; + pkgs = import nixpkgs { inherit system; }; + hm = home-manager.defaultPackage.${system}; in { devShell = pkgs.mkShell { buildInputs = with pkgs; [ @@ -81,7 +81,7 @@ neovim nixFlakes nixos-rebuild - home-manager + hm nixfmt ]; }; diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix index 28d3db06..99ae4555 100644 --- a/hosts/atlas/default.nix +++ b/hosts/atlas/default.nix @@ -1,21 +1,17 @@ # System configuration for my main desktop PC -{ config, pkgs, inputs, ... }: +{ config, pkgs, hardware, impermanence, ... }: { imports = [ - inputs.hardware.nixosModules.common-cpu-amd - inputs.hardware.nixosModules.common-gpu-amd - inputs.hardware.nixosModules.common-pc-ssd - inputs.impermanence.nixosModules.impermanence + hardware.nixosModules.common-cpu-amd + hardware.nixosModules.common-gpu-amd + hardware.nixosModules.common-pc-ssd + impermanence.nixosModules.impermanence ./hardware-configuration.nix ../common.nix ]; networking.hostName = "atlas"; - nixpkgs = { - config.allowUnfree = true; - overlays = [ inputs.nur.overlay ]; - }; fileSystems."/data/var".neededForBoot = true; fileSystems."/data/home".neededForBoot = true; diff --git a/hosts/common.nix b/hosts/common.nix index 345becec..1ad9db88 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -1,5 +1,5 @@ # This file holds config that i use on all hosts -{ pkgs, inputs, ... }: +{ pkgs, nixpkgs, nix-colors, nur, ... }: { system.stateVersion = "21.11"; @@ -16,10 +16,16 @@ homeBinInPath = true; localBinInPath = true; }; + + nixpkgs = { + config.allowUnfree = true; + overlays = [ nur.overlay ]; + }; + nix = { registry = { - nixpkgs.flake = inputs.nixpkgs; - nix-colors.flake = inputs.nix-colors; + nixpkgs.flake = nixpkgs; + nix-colors.flake = nix-colors; }; trustedUsers = [ "root" "@wheel" ]; package = pkgs.nixUnstable; diff --git a/hosts/merope/default.nix b/hosts/merope/default.nix index f447864f..3466f2f8 100644 --- a/hosts/merope/default.nix +++ b/hosts/merope/default.nix @@ -1,20 +1,16 @@ # System configuration for my Raspberry Pi 4 -{ config, pkgs, inputs, ... }: +{ config, pkgs, hardware, impermanence, ... }: { imports = [ - inputs.hardware.nixosModules.raspberry-pi-4 - inputs.impermanence.nixosModules.impermanence + hardware.nixosModules.raspberry-pi-4 + impermanence.nixosModules.impermanence ./hardware-configuration.nix ./minecraft.nix ../common.nix ]; networking.hostName = "merope"; - nixpkgs = { - config.allowUnfree = true; - overlays = [ inputs.nur.overlay ]; - }; # Opt-in persistence on /data environment.persistence."/data" = { diff --git a/users/misterio/default.nix b/users/misterio/default.nix index 3d367995..04788331 100644 --- a/users/misterio/default.nix +++ b/users/misterio/default.nix @@ -1,9 +1,9 @@ -{ pkgs, hostname, inputs, ... }: +{ pkgs, hostname, impermanence, nix-colors, nur, ... }: { imports = [ - inputs.impermanence.nixosModules.home-manager.impermanence - inputs.nix-colors.homeManagerModule + impermanence.nixosModules.home-manager.impermanence + nix-colors.homeManagerModule ./scheme.nix @@ -48,7 +48,7 @@ nixpkgs = { config.allowUnfree = true; - overlays = [ inputs.nur.overlay ]; + overlays = [ nur.overlay ]; }; systemd.user.startServices = "sd-switch"; diff --git a/users/misterio/scheme.nix b/users/misterio/scheme.nix index a8549df3..ef5b3693 100644 --- a/users/misterio/scheme.nix +++ b/users/misterio/scheme.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, nix-colors, ... }: let colorschemeFromPicture = picture: kind: @@ -40,6 +40,8 @@ let installPhase = "mkdir -p $out && cp default.nix $out"; }); in { - wallpaper.path = ../../wallpapers/mountain-pink-purple.jpg; - colorscheme = colorschemeFromPicture config.wallpaper.path "dark"; + # wallpaper.path = ../../wallpapers/mountain-pink-purple.jpg; + # colorscheme = colorschemeFromPicture config.wallpaper.path "dark"; + colorscheme = nix-colors.colorSchemes.paraiso; + wallpaper.generate = true; }