add resources

This commit is contained in:
Lukas Heiligenbrunner 2023-11-26 22:32:14 +01:00
parent 951a4c32e8
commit 24676bfeea
6 changed files with 124 additions and 29 deletions

View File

@ -21,20 +21,20 @@
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
# newest kernel # newest kernel
#boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_testing;
# set mainline kernel version # set mainline kernel version
#boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_5; #boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_5;
# set specific kernel version # set specific kernel version
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_6.override { #boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_6.override {
argsOverride = rec { # argsOverride = rec {
src = pkgs.fetchurl { # src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; # url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34="; # sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34=";
}; # };
version = "6.6.2"; # version = "6.6.2";
modDirVersion = "6.6.2"; # modDirVersion = "6.6.2";
}; # };
}); #});
# Enable networking # Enable networking

View File

@ -35,7 +35,7 @@ in {
"org/gnome/shell" = { "org/gnome/shell" = {
favorite-apps = [ favorite-apps = [
"org.gnome.Nautilus.desktop" "org.gnome.Nautilus.desktop"
"gnome-system-monitor.desktop" "net.nokyan.Resources.desktop"
"firefox.desktop" "firefox.desktop"
"org.gnome.Console.desktop" "org.gnome.Console.desktop"
]; ];

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, allPkgs, ... }: { config, lib, pkgs, custompkgs, modulesPath, allPkgs, ... }:
{ {
imports = imports =
@ -23,6 +23,9 @@
# disable xterm # disable xterm
services.xserver.excludePackages = [ pkgs.xterm ]; services.xserver.excludePackages = [ pkgs.xterm ];
# disable documentation install
documentation.nixos.enable = false;
# cli util to upate hardware # cli util to upate hardware
services.fwupd.enable = true; services.fwupd.enable = true;
programs.steam.enable = true; programs.steam.enable = true;
@ -44,9 +47,10 @@
neofetch neofetch
dmidecode dmidecode
#(pkgs.callPackage ./resources.nix { })
# web # web
firefox firefox
# development # development
openscad openscad
vscode vscode
@ -57,13 +61,12 @@
iperf3 iperf3
discord discord
#cargo rustup
#rustc
## jetbrains ides ## ides
jetbrains.idea-ultimate jetbrains.idea-ultimate
jetbrains.dataspell jetbrains.dataspell
kicad gnome-builder
## R statistics stuff ## R statistics stuff
rstudio rstudio
@ -81,5 +84,8 @@
pdfarranger pdfarranger
diebahn diebahn
appflowy appflowy
]; kicad
] ++ ([
custompkgs.resources
]);
} }

View File

@ -0,0 +1,64 @@
{ lib
, stdenv
, fetchFromGitHub
, appstream-glib
, cargo
, desktop-file-utils
, meson
, ninja
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
, glib
, gtk4
, libadwaita
}:
stdenv.mkDerivation rec {
pname = "resources";
version = "1.2.1";
src = fetchFromGitHub {
owner = "nokyan";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-OVz1vsmOtH/5sEuyl2BfDqG2/9D1HGtHA0FtPntKQT0=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-v${version}";
hash = "sha256-JxcqHM7jccZ+YwU93AejXejZK1bj7IggO1QrE5cSPYU=";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
meson
ninja
pkg-config
wrapGAppsHook4
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
glib
gtk4
libadwaita
];
mesonFlags = [
"-Dprofile=default"
];
meta = {
description = "Resources";
homepage = "https://github.com/nokyan/resources";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ dotlambda foo-dogsquared ];
platforms = lib.platforms.all;
};
}

35
flake.lock generated
View File

@ -1,5 +1,21 @@
{ {
"nodes": { "nodes": {
"customnixpkgs": {
"locked": {
"lastModified": 1701032485,
"narHash": "sha256-k7vaOoXSEge6cFAtLo9jqSwyfZsAMy5FcI7CoLZUO1k=",
"owner": "lukas-heiligenbrunner",
"repo": "nixpkgs",
"rev": "65fe93c4b879f64081e43539628ceb0b15078842",
"type": "github"
},
"original": {
"owner": "lukas-heiligenbrunner",
"ref": "resources-init",
"repo": "nixpkgs",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -7,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1700847865, "lastModified": 1700900274,
"narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=", "narHash": "sha256-KWoKDP5I1viHR4bG3ENnJ7H1DD16tXWH4ROvS0IfXw8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe", "rev": "a462e7315deaa8194b0821f726709bb7e51a850c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +38,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1700559156, "lastModified": 1701020860,
"narHash": "sha256-gL4epO/qf+wo30JjC3g+b5Bs8UrpxzkhNBBsUYxpw2g=", "narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "c3abafb01cd7045dba522af29b625bd1e170c2fb", "rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +54,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1700612854, "lastModified": 1700794826,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614", "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,6 +70,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"customnixpkgs": "customnixpkgs",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"

View File

@ -4,6 +4,9 @@
inputs = { inputs = {
# import nixos packages # import nixos packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
customnixpkgs.url = "github:lukas-heiligenbrunner/nixpkgs/resources-init";
# import homemanager # import homemanager
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -11,18 +14,23 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
}; };
outputs = { self, nixpkgs, home-manager, nixos-hardware }: outputs = { self, nixpkgs, home-manager, nixos-hardware, customnixpkgs }:
let let
system="x86_64-linux"; system="x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
custompkgs = import customnixpkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in {
nixosConfigurations = { nixosConfigurations = {
laptop = lib.nixosSystem { laptop = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit custompkgs; };
modules = [ modules = [
nixos-hardware.nixosModules.framework-13-7040-amd nixos-hardware.nixosModules.framework-13-7040-amd