Initial commit

This commit is contained in:
Mats Rauhala 2021-11-18 12:34:27 +02:00
commit ebfcef9faf
2 changed files with 83 additions and 0 deletions

41
flake.lock Normal file
View File

@ -0,0 +1,41 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1637219977,
"narHash": "sha256-nH3KukLpsaShaEJHzPcY2R/0K6DoKPgcRgTe2o+zXuU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e8ff3181b754e4646766849b5e8142406ac3f12",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

42
flake.nix Normal file
View File

@ -0,0 +1,42 @@
{
description = "A very basic flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
{
overlay = final: prev:
let
qutebrowser-desktop-file = final.writeText "qutebrowser.desktop"
''
[Desktop Entry]
Categories=Network;WebBrowser;
Comment=
Exec=qutebrowser %U
GenericName=Web Browser
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https
Name=Qutebrowser
Terminal=false
Type=Application
'';
in
{
qutebrowser-desktop = final.runCommand "qutebrowser.desktop" {}
''
mkdir -p $out/share/applications
cp ${qutebrowser-desktop-file} $out/share/applications/qutebrowser.desktop
'';
};
}
//
flake-utils.lib.eachDefaultSystem ( system:
let
pkgs = import nixpkgs { system = system; overlays = [ self.overlay ]; };
in
rec {
packages.qutebrowser-desktop = pkgs.qutebrowser-desktop;
defaultPackage = packages.qutebrowser-desktop;
});
}