From 049db3a4b88c7f11c324e6d7b67feb9ac4e85279 Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Thu, 30 Nov 2023 00:03:46 +0100 Subject: [PATCH] experiment some more with flakes --- flake.lock | 40 +++++++++++++++++++++++++++++++++++++++- flake.nix | 18 ++++++++++++++++-- overlay.nix | 15 +++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 overlay.nix diff --git a/flake.lock b/flake.lock index d07dd44..40b09ce 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1701068326, @@ -18,7 +34,29 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "swayfx": "swayfx" + } + }, + "swayfx": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701050261, + "narHash": "sha256-SlfJ34TR+QdFPnTpyo/UON9RDxS3MfLU9tOabWHkknQ=", + "owner": "WillPower3309", + "repo": "swayfx", + "rev": "7c75b21933215348f28a2c788b174901ef13e267", + "type": "github" + }, + "original": { + "owner": "WillPower3309", + "repo": "swayfx", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index ccf093a..b62763c 100644 --- a/flake.nix +++ b/flake.nix @@ -5,12 +5,26 @@ nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; }; + swayfx = { + url = "github:WillPower3309/swayfx"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs }: { + outputs = inputs @ { self, nixpkgs, ... }: let + system = "x86_64-linux"; + + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = [self.overlays.default]; + }; + in { + overlays.default = import ./overlay.nix {inherit inputs system;}; + nixosConfigurations = { grimmauld-nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; modules = [ ./configuration.nix ./modules/sway.nix diff --git a/overlay.nix b/overlay.nix new file mode 100644 index 0000000..3ba0b7f --- /dev/null +++ b/overlay.nix @@ -0,0 +1,15 @@ +{ + inputs, + system, + ... +}: final: prev: +{ + # stable packages + stable = import inputs.nixpkgs-stable { + inherit system; + config.allowUnfree = true; + }; + + # SwayFX + sway-unwrapped = inputs.swayfx.packages.${system}.default; +}