mirror of
https://github.com/bartvdbraak/dotfiles.git
synced 2025-04-27 06:31:20 +00:00
working example for now
This commit is contained in:
parent
f87cbd8ad9
commit
fd8292cd41
4 changed files with 153 additions and 101 deletions
|
@ -2,18 +2,14 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1736883708,
|
||||
"narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8",
|
||||
"type": "github"
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-vH5mXxEvZeoGNkqKoCluhTGfoeXCZ1seYhC2pbMN0sg=",
|
||||
"path": "/nix/store/zd5dgszslv09jzybcpf25gpl12s6r2d9-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
|
@ -43,11 +39,11 @@
|
|||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736997529,
|
||||
"narHash": "sha256-eyZXz3aphVJ8mMZ5KivtnYS+5vhNxVjWGlBJM0DMqlE=",
|
||||
"lastModified": 1737404254,
|
||||
"narHash": "sha256-L8Lxp/WVdy9gKO2cXptphdP8cMsnGvZF5Noj8N3jLzI=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "96be5663cc2ef52e8815c90f7abf3363be3950c2",
|
||||
"rev": "f8ef9c97ac2f49d5c04dbf3b3d80a0490c05fefb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
117
nixos/flake.nix
117
nixos/flake.nix
|
@ -2,14 +2,13 @@
|
|||
description = "Bart's NixOS Configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, ... } @ inputs:
|
||||
{
|
||||
nixosConfigurations = {
|
||||
default = nixpkgs.lib.nixosSystem {
|
||||
tongfang = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hardware/tongfang.nix
|
||||
|
@ -20,75 +19,31 @@
|
|||
];
|
||||
};
|
||||
|
||||
tongfang = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hardware/tongfang.nix
|
||||
# tongfang = nixpkgs.lib.nixosSystem {
|
||||
# specialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./hardware/tongfang.nix
|
||||
|
||||
./modules/kde.nix
|
||||
./modules/battery.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/bootloader.nix
|
||||
./modules/configuration.nix
|
||||
./modules/creative-tools.nix
|
||||
./modules/devops-tools.nix
|
||||
./modules/display-manager.nix
|
||||
./modules/environment-variables.nix
|
||||
./modules/firewall.nix
|
||||
./modules/fonts.nix
|
||||
./modules/gc.nix
|
||||
./modules/greeter.nix
|
||||
./modules/info-fetchers.nix
|
||||
./modules/internationalisation.nix
|
||||
./modules/keyboard.nix
|
||||
./modules/linux-kernel.nix
|
||||
./modules/lsp.nix
|
||||
./modules/networking.nix
|
||||
./modules/nix-settings.nix
|
||||
./modules/nixpkgs.nix
|
||||
./modules/open-ssh.nix
|
||||
./modules/printing.nix
|
||||
./modules/programming-languages.nix
|
||||
./modules/screen.nix
|
||||
./modules/services.nix
|
||||
./modules/sound.nix
|
||||
./modules/terminal-utils.nix
|
||||
./modules/theme.nix
|
||||
./modules/time.nix
|
||||
./modules/usb.nix
|
||||
./modules/users.nix
|
||||
./modules/utils.nix
|
||||
./modules/virtualisation.nix
|
||||
./modules/vpn.nix
|
||||
./modules/work.nix
|
||||
];
|
||||
};
|
||||
|
||||
qemu = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hardware/qemu.nix
|
||||
|
||||
./modules/kde.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/battery.nix
|
||||
# ./modules/bluetooth.nix
|
||||
# ./modules/bootloader.nix
|
||||
./modules/configuration.nix
|
||||
# ./modules/configuration.nix
|
||||
# ./modules/creative-tools.nix
|
||||
# ./modules/devops-tools.nix
|
||||
./modules/display-manager.nix
|
||||
# ./modules/display-manager.nix
|
||||
# ./modules/environment-variables.nix
|
||||
# ./modules/firewall.nix
|
||||
# ./modules/fonts.nix
|
||||
# ./modules/gc.nix
|
||||
./modules/greeter.nix
|
||||
# ./modules/greeter.nix
|
||||
# ./modules/info-fetchers.nix
|
||||
# ./modules/internationalisation.nix
|
||||
# ./modules/keyboard.nix
|
||||
# ./modules/linux-kernel.nix
|
||||
# ./modules/lsp.nix
|
||||
./modules/networking.nix
|
||||
./modules/nix-settings.nix
|
||||
# ./modules/networking.nix
|
||||
# ./modules/nix-settings.nix
|
||||
# ./modules/nixpkgs.nix
|
||||
# ./modules/open-ssh.nix
|
||||
# ./modules/printing.nix
|
||||
|
@ -100,13 +55,57 @@
|
|||
# ./modules/theme.nix
|
||||
# ./modules/time.nix
|
||||
# ./modules/usb.nix
|
||||
./modules/users.nix
|
||||
# ./modules/users.nix
|
||||
# ./modules/utils.nix
|
||||
# ./modules/virtualisation.nix
|
||||
# ./modules/vpn.nix
|
||||
# ./modules/work.nix
|
||||
];
|
||||
};
|
||||
# ];
|
||||
# };
|
||||
|
||||
# qemu = nixpkgs.lib.nixosSystem {
|
||||
# specialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./hardware/qemu.nix
|
||||
|
||||
# ./modules/kde.nix
|
||||
# # ./modules/battery.nix
|
||||
# # ./modules/bluetooth.nix
|
||||
# # ./modules/bootloader.nix
|
||||
# ./modules/configuration.nix
|
||||
# # ./modules/creative-tools.nix
|
||||
# # ./modules/devops-tools.nix
|
||||
# ./modules/display-manager.nix
|
||||
# # ./modules/environment-variables.nix
|
||||
# # ./modules/firewall.nix
|
||||
# # ./modules/fonts.nix
|
||||
# # ./modules/gc.nix
|
||||
# ./modules/greeter.nix
|
||||
# # ./modules/info-fetchers.nix
|
||||
# # ./modules/internationalisation.nix
|
||||
# # ./modules/keyboard.nix
|
||||
# # ./modules/linux-kernel.nix
|
||||
# # ./modules/lsp.nix
|
||||
# ./modules/networking.nix
|
||||
# ./modules/nix-settings.nix
|
||||
# # ./modules/nixpkgs.nix
|
||||
# # ./modules/open-ssh.nix
|
||||
# # ./modules/printing.nix
|
||||
# # ./modules/programming-languages.nix
|
||||
# # ./modules/screen.nix
|
||||
# # ./modules/services.nix
|
||||
# # ./modules/sound.nix
|
||||
# # ./modules/terminal-utils.nix
|
||||
# # ./modules/theme.nix
|
||||
# # ./modules/time.nix
|
||||
# # ./modules/usb.nix
|
||||
# ./modules/users.nix
|
||||
# # ./modules/utils.nix
|
||||
# # ./modules/virtualisation.nix
|
||||
# # ./modules/vpn.nix
|
||||
# # ./modules/work.nix
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
yt6801 = import ./yt6801.nix {
|
||||
inherit (pkgs) stdenv lib fetchzip;
|
||||
kernel = pkgs.linuxPackages.kernel;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
|
51
nixos/hardware/yt6801.nix
Normal file
51
nixos/hardware/yt6801.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
kernel,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchzip,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "yt6801";
|
||||
version = "1.0.29";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://www.motor-comm.com/Public/Uploads/uploadfile/files/20240812/yt6801-linux-driver-1.0.29.zip";
|
||||
sha256 = "sha256-oz6CeOUN6QWKXxe3WUZljhGDTFArsknjzBuQ4IchGeU=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
preConfigure = "cd src";
|
||||
|
||||
configurePhase = "true";
|
||||
|
||||
buildFlags = [ "modules" ];
|
||||
|
||||
makeFlags =
|
||||
[
|
||||
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
||||
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/ethernet/motorcomm
|
||||
cp src/yt6801.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/ethernet/motorcomm/
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Motorcomm yt6801 Network Interface Card driver";
|
||||
homepage = "https://www.motor-comm.com/product/ethernet-control-chip";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
gpl2Only
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue