This commit is contained in:
Alex Davies 2024-09-07 10:57:17 -03:00
commit 66d0de2aa6
6 changed files with 76 additions and 60 deletions

View File

@ -9,6 +9,7 @@ nixos-rebuild build-vm --flake ./#athame
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
nix-shell -p home-manager
home-manager switch --flake git+https://codeberg.org/traverseda/nixos-config.git?ref=main#traverseda@generic --extra-experimental-features nix-command --extra-experimental-features flakes
```

View File

@ -8,11 +8,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1722339003,
"narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=",
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
@ -163,11 +163,11 @@
]
},
"locked": {
"lastModified": 1722857853,
"narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=",
"lastModified": 1724857454,
"narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da",
"rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6",
"type": "github"
},
"original": {
@ -226,11 +226,11 @@
]
},
"locked": {
"lastModified": 1723015306,
"narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=",
"lastModified": 1724435763,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
"type": "github"
},
"original": {
@ -288,11 +288,11 @@
]
},
"locked": {
"lastModified": 1722924007,
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
"lastModified": 1724561770,
"narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
"rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e",
"type": "github"
},
"original": {
@ -308,11 +308,11 @@
]
},
"locked": {
"lastModified": 1722740924,
"narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=",
"lastModified": 1724576102,
"narHash": "sha256-uM7n5nNL6fmA0bwMJBNll11f4cMWOFa2Ni6F5KeIldM=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "97ca0a0fca0391de835f57e44f369a283e37890f",
"rev": "e333d62b70b179da1dd78d94315e8a390f2d12e5",
"type": "github"
},
"original": {
@ -354,11 +354,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"lastModified": 1724819573,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
"type": "github"
},
"original": {
@ -370,11 +370,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1722987190,
"narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=",
"lastModified": 1724727824,
"narHash": "sha256-0XH9MJk54imJm+RHOLTUJ7e+ponLW00tw5ke4MTVa1Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90",
"rev": "36bae45077667aff5720e5b3f1a5458f51cf0776",
"type": "github"
},
"original": {
@ -398,11 +398,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1722925293,
"narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=",
"lastModified": 1724910205,
"narHash": "sha256-eH2yPsTkaGp87rtxATx9d2dGBQUXH3kQPEOTKmaEb0s=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2",
"rev": "d150ce320e4eda99d8865bbd4c74ee8c47a88097",
"type": "github"
},
"original": {
@ -422,11 +422,11 @@
]
},
"locked": {
"lastModified": 1723232379,
"narHash": "sha256-F4Y3f9305aHGWKqAd3s2GyNRONdpDBuNuK4TCSdaHz8=",
"lastModified": 1724556439,
"narHash": "sha256-gPR3sxkKxISUvydnqoj54znpUkK8av/HVFuFJuYUw3w=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "22bea90404c5ff6457913a03c1a54a3caa5b1c57",
"rev": "5c97fe8af2a2e561f14195ed357d8c451fdbff4c",
"type": "github"
},
"original": {
@ -456,11 +456,11 @@
]
},
"locked": {
"lastModified": 1723032080,
"narHash": "sha256-Um/O5KEPUuWjJOxknWT76RO6PBgeBT/A2fS+e9Kz1pA=",
"lastModified": 1724117129,
"narHash": "sha256-syYDeNi50lYGaSajggdgcLbV8P/E3v77F2fF5vTuCoI=",
"owner": "lopsided98",
"repo": "nix-ros-overlay",
"rev": "69219f8f35e5ae08e4ccff256529355744bc06ba",
"rev": "1992646cf65ac8f036a21a2005e10c4454c9e3fc",
"type": "github"
},
"original": {
@ -507,11 +507,11 @@
]
},
"locked": {
"lastModified": 1722330636,
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
"lastModified": 1724833132,
"narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
"rev": "3ffd842a5f50f435d3e603312eefa4790db46af5",
"type": "github"
},
"original": {

View File

@ -291,12 +291,8 @@
programs.ssh = {
enable = true; # Enable SSH module
extraConfig = ''
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
'';
controlMaster = "auto"; # Enable ControlMaster
controlPersist = "10m"; # Enable Control
};
home.packages = [
@ -363,6 +359,17 @@
fi
'';
};
programs.bash = {
enable = true;
enableCompletion = true;
initExtra = ''
if [[ -n ''${NVIM+x} ]]; then
alias vim="nvr --remote"
export EDITOR=nvr-edit
fi
'';
};
# Enable home-manager and git
programs.home-manager.enable = true;

View File

@ -29,9 +29,9 @@
device = "/dev/nvme0n1p3";
randomEncryption.enable = true;
} ];
hardware.nvidia = {
hardware.nvidia-container-toolkit.enable = true;
hardware.nvidia = {
powerManagement.finegrained = true;
prime = {
offload = {
enable = true;
@ -42,7 +42,8 @@
intelBusId = "PCI:0:0:2";
nvidiaBusId = "PCI:1:0:0";
};
};
};
services.xserver.videoDrivers = [ "nvidia" ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -5,7 +5,7 @@ let
in {
networking.firewall.trustedInterfaces = privateZeroTierInterfaces; # TRUST VPN ONLY
services.avahi = {
enable = true;
#allowInterfaces = privateZeroTierInterfaces; # ONLY BROADCAST ON VPN
@ -18,7 +18,7 @@ in {
publish.workstation = true; # ADDED TO DESKTOP MACHINES
cacheEntriesMax = 512;
};
systemd.services.createDevicemap = {
description = "Create ZeroTier devicemap file";
before = [ "zerotierone.service" ]; # Ensure ZeroTier service has started

View File

@ -18,32 +18,39 @@ let
multiPkgs = pkgs: with pkgs; [ qt5.qtbase libGL libz ];
};
# Create a desktop entry for Creality Print
desktopItem = pkgs.makeDesktopItem {
name = "creality-print";
exec = "${creality-print}/bin/creality-print";
icon = "creality-print";
desktopName = "Creality Print";
genericName = "3D Printer Software";
categories = [ "Graphics" ];
};
in
# Define the package
pkgs.stdenv.mkDerivation {
name = "creality-print";
buildInputs = [ creality-print ];
buildInputs = [ creality-print pkgs.bash ];
nativeBuildInputs = [ pkgs.makeWrapper ];
nativeBuildInputs = [ pkgs.makeWrapper pkgs.icoutils pkgs.unpacker ];
# No sources to unpack
unpackPhase = "true";
# Installation phase
# Extraction phase to get the icon from the AppImage
installPhase = ''
mkdir -p $out/bin $out/share/applications
mkdir -p $out/bin $out/share/applications $out/share/icons/hicolor/256x256/apps
# Extract the AppImage content
appimage-extract ${creality-print}/bin/creality-print
# Find and copy the icon (typically the largest icon available)
cp ./squashfs-root/*.png $out/share/icons/hicolor/256x256/apps/creality-print.png || true
# Copy the binary files
cp ${creality-print}/bin/* $out/bin
ln -s ${desktopItem}/share/applications/* $out/share/applications/
# Create the desktop entry with the extracted icon
cat > $out/share/applications/creality-print.desktop <<EOF
[Desktop Entry]
Name=Creality Print
Exec=$out/bin/creality-print
Icon=creality-print
Type=Application
Categories=Graphics;
EOF
'';
# Package metadata