Compare commits
6 Commits
7b6402550a
...
847aa60fd5
Author | SHA1 | Date | |
---|---|---|---|
847aa60fd5 | |||
9138d6dbfe | |||
5909cb0865 | |||
c1fc4d12aa | |||
db536c0b50 | |||
8d18f3e348 |
50
flake.lock
50
flake.lock
|
@ -155,16 +155,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716736833,
|
"lastModified": 1731832479,
|
||||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
"narHash": "sha256-icDDuYwJ0avTMZTxe1qyU/Baht5JOqw4pb5mWpR+hT0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
"rev": "5056a1cf0ce7c2a08ab50713b6c4af77975f6111",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"ref": "master",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -213,17 +213,15 @@
|
||||||
"nixos-apple-silicon": {
|
"nixos-apple-silicon": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718588737,
|
"lastModified": 1731473366,
|
||||||
"narHash": "sha256-06acqoMEYtc+/w5gWiIIuUFfdtdOBKlp1qrC/InRiBY=",
|
"narHash": "sha256-sE2WfD3YyNrCROfRZKqMDR77g3KV4FXUaJ7NWe+A7ro=",
|
||||||
"owner": "tpwrules",
|
"owner": "tpwrules",
|
||||||
"repo": "nixos-apple-silicon",
|
"repo": "nixos-apple-silicon",
|
||||||
"rev": "b0a2376f6c164a0af963d47386c064cc6fdcd5ea",
|
"rev": "3eee753e4b074790342fadb1c4e7183d037ddac4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -234,16 +232,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726062281,
|
"lastModified": 1731139594,
|
||||||
"narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=",
|
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8",
|
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -268,11 +266,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726436956,
|
"lastModified": 1731763621,
|
||||||
"narHash": "sha256-a3rP7uafX/qBFX0y4CGS8vvTPvxsLl9eZQ85DkIn3DI=",
|
"narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "039b72d0c738c934e2e36d7fc5520d1b425287a6",
|
"rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -282,6 +280,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731858824,
|
||||||
|
"narHash": "sha256-0KhJ6SOyWjx408tsgcoVQFx9nEn55DwrhFbCE49Oyac=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7937932921ea34c51c1b586e2505574f6f0be5a7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "release-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agda": "agda",
|
"agda": "agda",
|
||||||
|
@ -290,7 +304,7 @@
|
||||||
"kak": "kak",
|
"kak": "kak",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixos-apple-silicon": "nixos-apple-silicon",
|
"nixos-apple-silicon": "nixos-apple-silicon",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"unambig-path": "unambig-path",
|
"unambig-path": "unambig-path",
|
||||||
"unispect": "unispect"
|
"unispect": "unispect"
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -3,10 +3,11 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Specify the source of Home Manager and Nixpkgs.
|
# Specify the source of Home Manager and Nixpkgs.
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
# TODO: We run whole system unstable until 24.11 drops, then the gpu drivers should work
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
@ -37,7 +38,8 @@
|
||||||
};
|
};
|
||||||
nixos-apple-silicon = {
|
nixos-apple-silicon = {
|
||||||
url = "github:tpwrules/nixos-apple-silicon";
|
url = "github:tpwrules/nixos-apple-silicon";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
# TODO: when nixos-24.11 drops, change this
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -179,7 +181,7 @@
|
||||||
use-iwd = false;
|
use-iwd = false;
|
||||||
};
|
};
|
||||||
graphical = mkNixOsGraphical {
|
graphical = mkNixOsGraphical {
|
||||||
inherit pkgs;
|
inherit pkgs pkgs-unstable;
|
||||||
background = "pan-wire-3.png";
|
background = "pan-wire-3.png";
|
||||||
use-display-manager = true;
|
use-display-manager = true;
|
||||||
};
|
};
|
||||||
|
@ -219,6 +221,7 @@
|
||||||
nixos-apple-silicon.nixosModules.apple-silicon-support
|
nixos-apple-silicon.nixosModules.apple-silicon-support
|
||||||
./nixos/machines/foxhut/hardware.nix
|
./nixos/machines/foxhut/hardware.nix
|
||||||
(import ./nixos/machines/foxhut/boot.nix { inherit pkgs pkgs-unstable asahi-firmware; })
|
(import ./nixos/machines/foxhut/boot.nix { inherit pkgs pkgs-unstable asahi-firmware; })
|
||||||
|
(import ./nixos/machines/foxhut/machine.nix { inherit pkgs pkgs-unstable asahi-firmware; })
|
||||||
base
|
base
|
||||||
networking
|
networking
|
||||||
graphical
|
graphical
|
||||||
|
|
|
@ -62,8 +62,8 @@ esac";
|
||||||
foreground = "#ebdbb2";
|
foreground = "#ebdbb2";
|
||||||
};
|
};
|
||||||
|
|
||||||
shell.program = "${pkgs.zsh}/bin/zsh";
|
terminal.shell.program = "${pkgs.zsh}/bin/zsh";
|
||||||
shell.args = [ "--login" "-c" "${tmux-menu}" ];
|
terminal.shell.args = [ "--login" "-c" "${tmux-menu}" ];
|
||||||
|
|
||||||
keyboard.bindings = import ./keybinds.nix { bind-broken-mac-keybinds = stdenv.isDarwin; };
|
keyboard.bindings = import ./keybinds.nix { bind-broken-mac-keybinds = stdenv.isDarwin; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ in rec {
|
||||||
inkscape
|
inkscape
|
||||||
]
|
]
|
||||||
++ (if pkgs.stdenv.isDarwin then [alloy6-mac] else [pkgs.alloy6])
|
++ (if pkgs.stdenv.isDarwin then [alloy6-mac] else [pkgs.alloy6])
|
||||||
++ (if pkgs.stdenv.isDarwin then [] else [pkgs.keepassxc pkgs.vesktop pkgs.signal-desktop pkgs.ares])
|
++ (if pkgs.stdenv.isDarwin then [] else [pkgs.keepassxc pkgs.vesktop pkgs.ares])
|
||||||
;
|
;
|
||||||
|
|
||||||
programs.alacritty = alacritty;
|
programs.alacritty = alacritty;
|
||||||
|
|
|
@ -1,12 +1,39 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
background-image ? "pan-wire-3.png",
|
background-image ? "pan-wire-3.png",
|
||||||
use-display-manager,
|
use-display-manager,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let start-plasma-shortcut = pkgs.writeScriptBin "desktop" ''
|
let start-plasma-shortcut = pkgs.writeScriptBin "desktop" ''
|
||||||
${pkgs.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.plasma-workspace}/bin/startplasma-wayland
|
${pkgs.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.plasma-workspace}/bin/startplasma-wayland
|
||||||
'';
|
'';
|
||||||
|
# kicad is broken in 2411
|
||||||
|
# TODO: update to 2411
|
||||||
|
pkgs_2405 = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/e8c38b73aeb218e27163376a2d617e61a2ad9b59.tar.gz") {};
|
||||||
|
|
||||||
|
kicad-patch = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "kicad-patch";
|
||||||
|
version = pkgs_2405.kicad-small.version;
|
||||||
|
src = pkgs_2405.kicad-small;
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cp -r $src/* $out
|
||||||
|
chmod -R u+w $out
|
||||||
|
# don't want the individual kicad things to show up as applications
|
||||||
|
mv $out/share/applications $out/share/applications.0
|
||||||
|
mkdir $out/share/applications
|
||||||
|
cp $out/share/applications.0/org.kicad.kicad.desktop $out/share/applications/
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/338062#issuecomment-2430847477
|
||||||
|
for prog in $out/bin/* ; do
|
||||||
|
wrapProgram $prog \
|
||||||
|
--set GDK_BACKEND x11
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
@ -35,7 +62,7 @@ in
|
||||||
|
|
||||||
console.useXkbConfig = true;
|
console.useXkbConfig = true;
|
||||||
|
|
||||||
sound.enable = false; # let pipewire handle sound
|
# sound.enable = false; # let pipewire handle sound
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
|
@ -53,15 +80,16 @@ in
|
||||||
uid = 1002;
|
uid = 1002;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = (with pkgs; [
|
||||||
stilo-themes
|
stilo-themes
|
||||||
|
|
||||||
firefox
|
|
||||||
thunderbird
|
thunderbird
|
||||||
glxinfo
|
glxinfo
|
||||||
start-plasma-shortcut
|
start-plasma-shortcut
|
||||||
remmina
|
remmina
|
||||||
libreoffice
|
libreoffice
|
||||||
kicad-small
|
kicad-patch
|
||||||
];
|
]) ++ (with pkgs_2405; [
|
||||||
|
firefox
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, asahi-firmware, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
|
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -27,11 +23,5 @@
|
||||||
device = "/swap";
|
device = "/swap";
|
||||||
size = 16 * 1024; # 16GB
|
size = 16 * 1024; # 16GB
|
||||||
}];
|
}];
|
||||||
|
|
||||||
environment.systemPackages = (with pkgs-unstable; [
|
|
||||||
renoise
|
|
||||||
]) ++ (with pkgs; [
|
|
||||||
prismlauncher
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
63
nixos/machines/foxhut/machine.nix
Normal file
63
nixos/machines/foxhut/machine.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = (with pkgs-unstable; [
|
||||||
|
renoise
|
||||||
|
signal-desktop
|
||||||
|
wireguard-tools
|
||||||
|
cifs-utils
|
||||||
|
]) ++ (with pkgs; [
|
||||||
|
prismlauncher
|
||||||
|
]);
|
||||||
|
|
||||||
|
services.mysql = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
dataDir = "/var/lib/mysql";
|
||||||
|
settings = {
|
||||||
|
mysqld = {
|
||||||
|
bind_address = "127.0.0.1";
|
||||||
|
# socket = "/tmp/mariadb.sock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ensureDatabases = [
|
||||||
|
"bnuybase"
|
||||||
|
];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "xenia";
|
||||||
|
ensurePermissions = {
|
||||||
|
"bnuybase.*" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [ 51821 ];
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces.wg0 = {
|
||||||
|
ips = [ "192.168.69.254/32" ];
|
||||||
|
listenPort = 51821;
|
||||||
|
privateKeyFile = "/home/xenia/wireguard-keys/private";
|
||||||
|
peers = [ {
|
||||||
|
publicKey = "XfHU29ij76y4TB8P/QJyn1JnTl9tvxO77IGVmM6p+ic=";
|
||||||
|
allowedIPs = [ "10.30.0.0/16" "10.250.0.0/16" "10.254.0.0/16" "192.168.30.0/24" "192.168.40.0/24" "192.168.50.0/24" "192.168.51.0/24" "192.168.250.0/24" ];
|
||||||
|
endpoint = "129.16.13.37:13231";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
} ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.pipewire.wireplumber.extraConfig."10-bluez" = {
|
||||||
|
"monitor.bluez.properties" = {
|
||||||
|
"bluez5.enable-sbc-xq" = true;
|
||||||
|
"bluez5.enable-msbc" = false;
|
||||||
|
"bluez5.enable-hw-volume" = true;
|
||||||
|
"bluez5.codecs" = [
|
||||||
|
"sbc" "sbc_xq" "aac"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,16 +1,35 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
}:
|
}:
|
||||||
let tiny-dfr = pkgs.tiny-dfr.overrideAttrs (old: {
|
let tiny-dfr = with pkgs; rustPlatform.buildRustPackage rec {
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
|
pname = "tiny-dfr";
|
||||||
|
version = "0.3.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
owner = "xeniagda";
|
owner = "xeniagda";
|
||||||
repo = "tiny-dfr";
|
repo = "tiny-dfr";
|
||||||
rev = "master";
|
rev = "v${version}";
|
||||||
hash = "sha256-I2R28wQz4Vd8VonbDcM6TZOn5lnWSXqwX4w/sieaQL8=";
|
hash = "sha256-6BzUMh6Mrae6QNwEWNmZVeKGJ8e2uFmx/O10bxt5k8I=";
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
cargoHash = "sha256-IfjXuXDMZ1hOwPWSXgNk5rin/uwFc2iFE+XusjQ3kKE=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ cairo gdk-pixbuf glib libinput libxml2 pango udev ];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
substituteInPlace etc/systemd/system/tiny-dfr.service \
|
||||||
|
--replace-fail /usr/bin $out/bin
|
||||||
|
substituteInPlace src/*.rs --replace-quiet /usr/share $out/share
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
cp -R etc $out/lib
|
||||||
|
cp -R share $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
assert tiny-dfr.version == "0.3.1";
|
|
||||||
{
|
{
|
||||||
services.udev.packages = [ tiny-dfr ];
|
services.udev.packages = [ tiny-dfr ];
|
||||||
systemd.services.tiny-dfr = {
|
systemd.services.tiny-dfr = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user