From afc6d178f095acf638d98c29c52d01852e09c848 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 25 Jan 2022 12:26:06 +0200 Subject: [PATCH] feat: the overlay stuff actually works now! --- configuration.nix | 2 +- flake.nix | 8 ++++++-- modules/applications/misc.nix | 2 +- modules/overlays/default.nix | 4 ++-- modules/overlays/discord.nix | 12 ------------ modules/overlays/flakes.nix | 2 ++ modules/overlays/tweakSources.nix | 17 +++++++++++++++++ 7 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 modules/overlays/discord.nix create mode 100644 modules/overlays/tweakSources.nix diff --git a/configuration.nix b/configuration.nix index 8cbe9ea..7ca076d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,7 +1,6 @@ { pkgs, lib, ... }: { imports = [ ./modules ]; - nixpkgs.config.allowBroken = true; boot.loader.systemd-boot.enable = true; home-manager.useGlobalPkgs = true; @@ -95,5 +94,6 @@ system.stateVersion = "21.11"; nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowBroken = true; } diff --git a/flake.nix b/flake.nix index 5886056..9f6e49b 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,14 @@ }; outputs = inputs@{ self, nixpkgs, home-manager, ... }: - let provideInputs = import ./modules/overlays/flakes.nix inputs; + let + system = "x86_64-linux"; + provideInputs = + import ./modules/overlays/flakes.nix { inherit system; } inputs; in { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; + modules = [ home-manager.nixosModules.home-manager provideInputs diff --git a/modules/applications/misc.nix b/modules/applications/misc.nix index 3ea9e5c..a3fcc04 100644 --- a/modules/applications/misc.nix +++ b/modules/applications/misc.nix @@ -71,7 +71,7 @@ # fceux # games - tetrio-desktop + # tetrio-desktop # mindustry ]; } diff --git a/modules/overlays/default.nix b/modules/overlays/default.nix index bae92c0..72d6fde 100644 --- a/modules/overlays/default.nix +++ b/modules/overlays/default.nix @@ -1,4 +1,4 @@ -{ ... }: { - nixpkgs.overlays = [ import ./discord ]; +{ pkgs, ... }: { + nixpkgs.overlays = [ (import ./tweakSources.nix) ]; # imports = [ ./legacy.nix ]; } diff --git a/modules/overlays/discord.nix b/modules/overlays/discord.nix deleted file mode 100644 index a209869..0000000 --- a/modules/overlays/discord.nix +++ /dev/null @@ -1,12 +0,0 @@ -self: super: -let version = "0.0.15"; -in { - discord = super.discord.overrideAttrs (old: { - inherit version; - src = builtins.fetchurl { - url = - "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; - sha256 = "0pn2qczim79hqk2limgh88fsn93sa8wvana74mpdk5n6x5afkvdd"; - }; - }); -} diff --git a/modules/overlays/flakes.nix b/modules/overlays/flakes.nix index 365245c..0ada88c 100644 --- a/modules/overlays/flakes.nix +++ b/modules/overlays/flakes.nix @@ -1,3 +1,4 @@ +{ system }: { home-manager, nixpkgs-unstable, nixos-unstable, easy-purescript-nix , easy-dhall-nix, z, agnoster, ... }: ({ pkgs, ... }: { @@ -5,6 +6,7 @@ (self: super: { # inherit nixos-unstable; unstable = import nixpkgs-unstable { + inherit system; config.allowUnfree = true; config.allowBroken = true; }; diff --git a/modules/overlays/tweakSources.nix b/modules/overlays/tweakSources.nix new file mode 100644 index 0000000..17904b8 --- /dev/null +++ b/modules/overlays/tweakSources.nix @@ -0,0 +1,17 @@ +self: super: +with self; { + discord = unstable.discord; + vscode = unstable.vscode; +} +# let version = "0.0.15"; +# in self +# { +# discord = super.discord.overrideAttrs (old: { +# inherit version; +# src = builtins.fetchurl { +# url = +# "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; +# sha256 = "0pn2qczim79hqk2limgh88fsn93sa8wvana74mpdk5n6x5afkvdd"; +# }; +# }); +# }