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;
# newest kernel
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_testing;
# set mainline kernel version
#boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_5;
# set specific kernel version
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_6.override {
argsOverride = rec {
src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34=";
};
version = "6.6.2";
modDirVersion = "6.6.2";
};
});
#boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_6.override {
# argsOverride = rec {
# src = pkgs.fetchurl {
# url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
# sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34=";
# };
# version = "6.6.2";
# modDirVersion = "6.6.2";
# };
#});
# Enable networking

View File

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

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, allPkgs, ... }:
{ config, lib, pkgs, custompkgs, modulesPath, allPkgs, ... }:
{
imports =
@ -23,6 +23,9 @@
# disable xterm
services.xserver.excludePackages = [ pkgs.xterm ];
# disable documentation install
documentation.nixos.enable = false;
# cli util to upate hardware
services.fwupd.enable = true;
programs.steam.enable = true;
@ -44,9 +47,10 @@
neofetch
dmidecode
#(pkgs.callPackage ./resources.nix { })
# web
firefox
# development
openscad
vscode
@ -57,13 +61,12 @@
iperf3
discord
#cargo
#rustc
rustup
## jetbrains ides
## ides
jetbrains.idea-ultimate
jetbrains.dataspell
kicad
gnome-builder
## R statistics stuff
rstudio
@ -81,5 +84,8 @@
pdfarranger
diebahn
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": {
"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": {
"inputs": {
"nixpkgs": [
@ -7,11 +23,11 @@
]
},
"locked": {
"lastModified": 1700847865,
"narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=",
"lastModified": 1700900274,
"narHash": "sha256-KWoKDP5I1viHR4bG3ENnJ7H1DD16tXWH4ROvS0IfXw8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe",
"rev": "a462e7315deaa8194b0821f726709bb7e51a850c",
"type": "github"
},
"original": {
@ -22,11 +38,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1700559156,
"narHash": "sha256-gL4epO/qf+wo30JjC3g+b5Bs8UrpxzkhNBBsUYxpw2g=",
"lastModified": 1701020860,
"narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "c3abafb01cd7045dba522af29b625bd1e170c2fb",
"rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2",
"type": "github"
},
"original": {
@ -38,11 +54,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1700612854,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github"
},
"original": {
@ -54,6 +70,7 @@
},
"root": {
"inputs": {
"customnixpkgs": "customnixpkgs",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"

View File

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