hippocampus: Fix merge

This commit is contained in:
2024-06-10 23:10:04 -04:00
29 changed files with 997 additions and 421 deletions

46
flake.lock generated
View File

@@ -66,11 +66,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706099765, "lastModified": 1717316182,
"narHash": "sha256-pt98CX+WkTwtnDdu+9kGnuia/3s5krsUqYOSGOYbuHk=", "narHash": "sha256-Xi0EpZcu39N0eW7apLjFfUOR9y80toyjYizez7J1wMI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "e84811035d7c8ec79ed6c687a97e19e2a22123c1", "rev": "9b53a10f4c91892f5af87cf55d08fba59ca086af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -88,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703003068, "lastModified": 1715437861,
"narHash": "sha256-cAp7UbrQTiPAfNhIO9DRs271RUJJHPyBYchDJ4wDMd4=", "narHash": "sha256-GIYYcAEYHaHfCGfKY9Te3e+p+IK9V3tMYidUdas9UKA=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "ed6e88d1069557f1e68aa769934f008cb6c1fed5", "rev": "048841f5881952e40e601d97ab825b9baac07c63",
"revCount": 45, "revCount": 52,
"type": "git", "type": "git",
"url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git" "url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git"
}, },
@@ -108,11 +108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705915768, "lastModified": 1716993688,
"narHash": "sha256-+Jlz8OAqkOwJlioac9wtpsCnjgGYUhvLpgJR/5tP9po=", "narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "1e706ef323de76236eb183d7784f3bd57255ec0b", "rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,11 +124,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1705856552, "lastModified": 1717196966,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,27 +156,27 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1705033721, "lastModified": 1717265169,
"narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "narHash": "sha256-IITcGd6xpNoyq9SZBigCkv4+qMHSqot0RDPR4xsZ2CA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "rev": "3b1b4895b2c5f9f5544d02132896aeb9ceea77bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-23.05", "ref": "release-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1705697961, "lastModified": 1717112898,
"narHash": "sha256-XepT3WS516evSFYkme3GrcI3+7uwXHqtHbip+t24J7E=", "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e5d1c87f5813afde2dda384ac807c57a105721cc", "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -201,11 +201,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1706130372, "lastModified": 1717297459,
"narHash": "sha256-fHZxKH1DhsXPP36a2vJ91Zy6S+q6+QRIFlpLr9fZHU8=", "narHash": "sha256-cZC2f68w5UrJ1f+2NWGV9Gx0dEYmxwomWN2B0lx0QRA=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4606d9b1595e42ffd9b75b9e69667708c70b1d68", "rev": "ab2a43b0d21d1d37d4d5726a892f714eaeb4b075",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -11,56 +11,45 @@
}; };
outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager }@attrs: let outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager }@attrs: let
hydraGitea = (final: prev: { hydraGitea = import ./overlays/hydra.nix;
hydra_unstable = prev.hydra_unstable.overrideAttrs nvidiaContainer = import ./overlays/nvidiacontainer.nix nixpkgs;
(old: { me-emacs-overlay = me-emacs.overlays.default;
doCheck = false;
patches = [
(final.fetchpatch {
name = "hydra-gitea-push-patch";
url = "https://patch-diff.githubusercontent.com/raw/NixOS/hydra/pull/1227.patch";
sha256 = "A4dN/4zLMKLYaD38lu87lzAWH/3EUM7G5njx7Q4W47w=";
})
];
});
});
nvidiaContainer = import ./nvidiacontainer-overlay.nix nixpkgs;
# Configuration for `nixpkgs` # Configuration for `nixpkgs`
nixpkgsConfig = { nixpkgsConfig = {
config = { allowUnfree = true; }; config = { allowUnfree = true; };
}; };
me-emacs-overlay = (final: prev: {
me-emacs = me-emacs.packages."x86_64-linux".emacs; pkgs_linux-x86_64 = nixpkgs.legacyPackages."x86-linux";
# Will in future be macports based pkgs_linux-aarch64 = nixpkgs.legacyPackages."aarch64-linux";
mac-emacs = me-emacs.packages."aarch64-darwin".emacs;
});
in { in {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations = {
system = "x86_64-linux"; nixos = nixpkgs.lib.nixosSystem {
specialArgs = attrs; system = "x86_64-linux";
modules = specialArgs = attrs;
[ modules =
({ config, pkgs, ... }: { [
nixpkgs.overlays = [ hydraGitea nvidiaContainer ]; ({ config, pkgs, ... }: {
}) nixpkgs.overlays = [ hydraGitea nvidiaContainer ];
./machines/hippocampus/configuration.nix })
sops-nix.nixosModules.sops ./machines/hippocampus/configuration.nix
]; sops-nix.nixosModules.sops
}; ];
nixosConfigurations.universedesktop = nixpkgs.lib.nixosSystem { };
system = "x86_64-linux"; universedesktop = nixpkgs.lib.nixosSystem {
specialArgs = attrs; system = "x86_64-linux";
modules = specialArgs = attrs;
[ modules =
({ config, pkgs, ... }: { [
nixpkgs.overlays = [ me-emacs-overlay ]; ({ config, pkgs, ... }: {
}) nixpkgs.overlays = [ me-emacs-overlay ];
./machines/universedesktop/configuration.nix })
sops-nix.nixosModules.sops ./machines/universedesktop/configuration.nix
]; sops-nix.nixosModules.sops
];
};
}; };
darwinConfigurations."Universe-Air" = nix-darwin.lib.darwinSystem { darwinConfigurations."UniverseAir" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin"; system = "aarch64-darwin";
specialArgs = { specialArgs = {
inputs = attrs; inputs = attrs;
@@ -76,5 +65,17 @@
} }
]; ];
}; };
homeConfigurations."universelaptop" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgs_linux-aarch64;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./machines/asahi/home.nix ];
extraSpecialArgs = {
pkgs-x86_64 = pkgs_linux-x86_64;
inputs = attrs;
};
};
}; };
} }

62
machines/asahi/home.nix Normal file
View File

@@ -0,0 +1,62 @@
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "universelaptop";
home.homeDirectory = "/home/universelaptop";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
me-emacs
armcord
# TODO: Make home-manager module for loading x86_64 apps and automatically
# wrapping them in box64-asahi (page size change, like in Fedora repo)
# as well as, with override option, to enable support for box86/wine
];
services.nextcloud-client.enable;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/universelaptop/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "emacs";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View File

@@ -0,0 +1,29 @@
{config, pkgs, lib, ...}: {
# Nix-darwin does not link installed applications to the user environment. This means apps will not show up
# in spotlight, and when launched through the dock they come with a terminal window. This is a workaround.
# Upstream issue: https://github.com/LnL7/nix-darwin/issues/214
system.activationScripts.applications.text = lib.mkForce ''
echo "setting up /Applications..." >&2
applications="/Applications"
nix_apps="$applications/Nix Apps"
# Delete the directory to remove old links
rm -rf "$nix_apps"
mkdir -p "$nix_apps"
find ${config.system.build.applications}/Applications -maxdepth 1 -type l -exec readlink '{}' + |
while read src; do
# Spotlight does not recognize symlinks, it will ignore directory we link to the applications folder.
# It does understand MacOS aliases though, a unique filesystem feature. Sadly they cannot be created
# from bash (as far as I know), so we use the oh-so-great Apple Script instead.
/usr/bin/osascript -e "
set fileToAlias to POSIX file \"$src\"
set applicationsFolder to POSIX file \"$nix_apps\"
tell application \"Finder\"
make new alias at applicationsFolder to fileToAlias
# This renames the alias; 'mpv.app alias' -> 'mpv.app'
set name of result to \"$(rev <<< "$src" | cut -d'/' -f1 | rev)\"
end tell
" 1>/dev/null
done
'';
}

View File

@@ -1,44 +1,64 @@
{ config, pkgs, inputs, ... }: let { config, pkgs, inputs, ... }: let
in in
{ {
imports = [
# Install Apps Detactable by Spotlight
./app-fix.nix
# Tiling Window Manager
./yabai.nix
# Shortcuts babe, not Automator
./skhd.nix
];
nix.registry.nixpkgs.flake = inputs.nixpkgs; nix.registry.nixpkgs.flake = inputs.nixpkgs;
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nixUnstable;
nix.settings.auto-optimise-store = false;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
users.users.universelaptop = { users.users.universelaptop = {
name = "universelaptop"; name = "universelaptop";
home = "/Users/universelaptop"; home = "/Users/universelaptop";
}; };
home-manager.users.universelaptop = { pkgs, ... }: { home-manager = {
programs.direnv.enable = true; useGlobalPkgs = true;
programs.direnv.nix-direnv.enable = true; useUserPackages = true;
programs.bash.enable = true; users.universelaptop = { pkgs, ... }: {
programs.zsh = { programs.direnv.enable = true;
enable = true; programs.direnv.nix-direnv.enable = true;
initExtra = '' programs.bash.enable = true;
PATH=$HOME/flutter/bin:$PATH programs.zsh = {
DYLD_LIBRARY_PATH=MR/v99/runtime/maci64:MR/v99/sys/os/maci64:MR/v99/bin/maci64:$DYLD_LIBRARY_PATH enable = true;
flakify() { initExtra = ''
eval "$(direnv hook bash)" if [[ $(uname -m) == 'arm64' ]]; then
if [ ! -e flake.nix ]; then eval "$(/opt/homebrew/bin/brew shellenv)"
nix flake new -t github:nix-community/nix-direnv . fi
fi '';
$EDITOR flake.nix shellAliases = {
} ssh = "kitty +kitten ssh";
''; sshu = "ssh universe";
shellAliases = { };
ssh = "kitty +kitten ssh";
sshu = "ssh universe@syzygial.cc -p 7000";
tailscale =
"/Applications/Tailscale.app/Contents/MacOS/Tailscale";
}; };
home.stateVersion = "22.05";
}; };
home.stateVersion = "22.05";
}; };
fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [
julia-mono
bqn386
];
services.emacs = {
# Emacsclient behaving weirdly
# enable = true;
package = pkgs.me-emacs;
};
environment.variables = { environment.variables = {
EDITOR = "emacs"; EDITOR = "emacs -nw";
VISUAL = "emacs";
}; };
nixpkgs.config.allowUnfree = true;
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
mac-emacs mac-emacs
@@ -48,23 +68,61 @@ flakify() {
en-science en-science
])) ]))
pandoc pandoc
texlive.combined.scheme-full texliveFull
wget wget
xquartz
kitty kitty
btop btop
remmina
cbqn-replxx cbqn-replxx
podman # Graphical Apps:
qemu rectangle
]); tailscale
# Or any other shell you're using. }; discord
# Auto upgrade nix package and the daemon service. slack
services.nix-daemon.enable = true; inkscape
nix.package = pkgs.nixUnstable; gimp
nix.settings.auto-optimise-store = false; # TODO: Consider using Yabai??
]);
homebrew = {
# It is not installed by nix, for now, so manually install:
# https://brew.sh/
enable = true;
onActivation = {
cleanup = "uninstall";
};
# Graphical apps to install through homebrew instead of nixpkgs
casks = [
"firefox"
"nextcloud"
"tidal"
"bitwarden"
"zoom-for-it-admins"
"libreoffice"
"microsoft-office"
"prismlauncher"
"kicad"
"tailscale"
"wine-stable"
];
# Apps to install outside of nix for when wanting to test/run
# things that... aren't used by other people who use nix, like
# python apps (which is why poetry is there)
brews = [
"poetry"
"python@3.11"
# sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk \
# /Library/Java/JavaVirtualMachines/openjdk.jdk
"openjdk"
];
};
# Create /etc/zshrc that loads the nix-darwin environment. # Create /etc/zshrc that loads the nix-darwin environment.
programs.bash.enable = true; # default shell on catalina programs.bash.enable = true; # default shell on catalina
programs.zsh.enable = true; # default shell on catalina programs.zsh.enable = true; # default shell on catalina

View File

@@ -0,0 +1,30 @@
{config, pkgs, lib, ...}: {
environment.systemPackages = with pkgs; [
sketchybar
];
services.sketchybar = {
enable = true;
config = ''
##### Bar Appearance #####
# Configuring the general appearance of the bar, these are only some of the
# options available. For all options see:
# https://felixkratz.github.io/SketchyBar/config/bar
# If you are looking for other colors, see the color picker:
# https://felixkratz.github.io/SketchyBar/config/tricks#color-picker
sketchybar --bar height=32 \
blur_radius=30 \
position=top \
sticky=off \
padding_left=10 \
padding_right=10 \
color=0x15ffffff
##### Finalizing Setup #####
# The below command is only needed at the end of the initial configuration to
# force all scripts to run the first time, it should never be run in an item script.
sketchybar --update
'';
};
}

View File

@@ -0,0 +1,9 @@
{config, pkgs, lib, ...}: {
services.skhd = {
enable = true;
skhdConfig = ''
cmd + shift - e : open '${pkgs.mac-emacs}/Applications/Emacs.app'
cmd + shift + ctrl - e : kitty -d ~ -1
'';
};
}

View File

@@ -0,0 +1,33 @@
{config, pkgs, lib, ...}: {
imports = [
# Custom Bar
# ./sketchybar.nix
# TODO: Customize Bar Later
];
environment.systemPackages = with pkgs; [
yabai
];
services.yabai = {
# Needs heavy configuration
enable = false;
enableScriptingAddition = true;
config = {
layout = "bsp";
focus_follows_mouse = "autofocus";
auto_balance = "on";
top_padding = 5;
bottom_padding = 5;
left_padding = 5;
right_padding = 5;
window_gap = 5;
};
extraConfig = ''
yabai -m rule --add app='System Settings' manage=off
yabai -m rule --add app='Boot Camp Assistant' manage=off
yabai -m rule --add app='System Information' manage=off
yabai -m rule --add title='^Figure' manage=off
'';
};
}

View File

@@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
ccacheWrapper = super.ccacheWrapper.override { ccacheWrapper = super.ccacheWrapper.override {
extraConfig = '' extraConfig = ''
export CCACHE_COMPRESS=1 export CCACHE_COMPRESS=1
export CCACHE_DIR="${config.programs.ccache.cacheDir}" export CCACHE_DIR="${config.programs.ccache.cacheDir}"
export CCACHE_UMASK=007 export CCACHE_UMASK=007
@@ -23,8 +23,22 @@ nixpkgs.overlays = [
exit 1 exit 1
fi fi
''; '';
}; };
}) })
]; ];
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ]; nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
nix.settings = {
substituters = [
"https://cuda-maintainers.cachix.org"
];
trusted-substituters = [
"https://cuda-maintainers.cachix.org"
];
trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
trusted-users = [
"universe"
];
};
} }

View File

@@ -13,6 +13,10 @@
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# Desktop/Graphical Things defined:
./desktop/default.nix
./fonts.nix
# Secrets specified via: # Secrets specified via:
./secrets.nix ./secrets.nix
@@ -82,75 +86,12 @@
users.users.brltty.isSystemUser = true; users.users.brltty.isSystemUser = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
programs.xwayland.enable = true;
# Configure keymap in X11
services.xserver.layout = "us";
# services.xserver.xkbOptions = "grp:switch";
# services.xserver.extraLayouts = {
# bqn = {
# description = "BQN Symbol Modifiers";
# languages = ["eng"];
# symbolsFile = pkgs.fetchurl {
# url = "https://raw.githubusercontent.com/mlochbaum/BQN/master/editors/bqn";
# sha256 = "F2fgLlWghcOrMu0BXGiyNHa0qh9YUyQE80GK0BWU2EY=";
# };
# };
# };
# # services.xserver.xkbOptions = {
# };
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
#sound.enable = true;
#hardware.pulseaudio.enable = true;
# rtkit is optional but recommended
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
};
# services.pipewire = {
# config.pipewire = {
# "context.properties" = {
# #"link.max-buffers" = 64;
# "link.max-buffers" = 16; # version < 3 clients can't handle more than this
# "log.level" = 2; # https://docs.pipewire.org/page_daemon.html
# #"default.clock.rate" = 48000;
# #"default.clock.quantum" = 1024;
# #"default.clock.min-quantum" = 32;
# #"default.clock.max-quantum" = 8192;
# };
# };
# };
# environment.etc = {
# "wireplumber/bluetooth.lua.d/52-bluez-config.lua".text = ''
# bluez_monitor.properties = {
# ["bluez5.enable-sbc-xq"] = true,
# ["bluez5.enable-msbc"] = true,
# ["bluez5.enable-hw-volume"] = true,
# ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
# '';
# };
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
users.groups.net = {}; users.groups.net = {};
users.users.universe = { users.users.universe = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "adbusers" "net" "brltty" "brlapi" "dialout" ]; extraGroups = [ "wheel" "adbusers" "net" "brltty" "brlapi" "dialout" "input" ];
packages = with pkgs; [ packages = with pkgs; [
]; ];
}; };
@@ -170,11 +111,7 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
# Wayland support
boot.kernelParams = ["nvidia_drm.modeset=1"];
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
services.fwupd.enable = true; services.fwupd.enable = true;
programs.adb.enable = true; programs.adb.enable = true;
@@ -198,7 +135,7 @@
]; ];
documentation.dev.enable = true; documentation.dev.enable = true;
documentation.man.generateCaches = true; documentation.man.generateCaches = false;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.

View File

@@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }: {
# Enable sound.
# rtkit is optional but recommended
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
# jack.enable = true;
};
}

View File

@@ -0,0 +1,6 @@
{ config, pkgs, lib, ... }: {
imports = [
./audio.nix
./displaymanager.nix
];
}

View File

@@ -0,0 +1,41 @@
{ config, pkgs, lib, ... }: let
empttyConf = pkgs.writeText "emptty-config" ''
TTY_NUMBER=7
WAYLAND_SESSIONS_PATH="${config.services.displayManager.sessionData.desktops}/share/wayland-sessions"
'';
in {
imports = [
./dwl.nix
];
services.displayManager = {
enable = true;
execCmd = "${pkgs.emptty}/bin/emptty -d";
};
systemd.services.display-manager = {
enable = true;
path = [pkgs.dwl];
serviceConfig = {
EnvironmentFile = empttyConf;
Type="idle";
TTYPath="/dev/tty7";
TTYReset="yes";
SendSIGHUP="yes";
KillMode="process";
};
};
environment.etc."emptty/conf".source = empttyConf;
services.displayManager.sessionPackages = [ pkgs.dwl ];
security.pam.services = {
emptty.text = ''
auth substack sshd
account include sshd
password substack sshd
session include sshd
'';
};
}

View File

@@ -0,0 +1,82 @@
{ config, pkgs, lib, ... }: let
launch_emacs = pkgs.writeScript "emacsclient-or-start" ''
#!${pkgs.bash}/bin/bash
emacsclient --create-frame --alternate-editor=""
'';
in {
imports = [
./wayland.nix
];
nixpkgs.overlays = [
(final: prev: {
dwl = prev.dwl.overrideAttrs (old: let
dwl-patches = pkgs.fetchgit {
url = "https://codeberg.org/dwl/dwl-patches.git";
rev = "7f93815e9c9d50add8493e680b3057ed0cc6e8a0";
hash = "sha256-LK1+WjAlguBvITPyS4oHXW5bNP19WUEfo87GFmyv8Js=";
};
patches = let
dwl-patch = p: "${dwl-patches}/patches/${p}/${p}.patch";
in [
(dwl-patch "ipc")
(dwl-patch "restore-monitor")
(dwl-patch "regexrules")
(dwl-patch "autostart")
];
in {
version = "10-05-2024";
src = final.fetchFromGitea {
domain = "codeberg.org";
owner = "dwl";
repo = "dwl";
rev = "9825c26cdd5dfed34022b77a8936c5d8f485e134";
hash = "sha256-p7BhCbCduMNTEK5DYNGBYXf+9WU6WlRvR9VdOuSTrVU=";
};
patches = (old.patches or []) ++ patches;
postPatch = ''
export termcmd=${pkgs.foot}/bin/foot
export editcmd=${launch_emacs}
export menucmd=${pkgs.fuzzel}/bin/fuzzel
export barcmd=${pkgs.waybar}/bin/waybar
export playcmd=${pkgs.writeScript "playerctl-play-pause" ''
#!${pkgs.bash}/bin/bash
${pkgs.playerctl}/bin/playerctl play-pause
''}
export scrncmd=${pkgs.writeScript "screenshot-region" ''
#!${pkgs.bash}/bin/bash
${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy
''}
substituteAll ${./dwl/config.def.h} ./config.def.h
'';
postInstall = ''
chmod ugo+x $out/share/wayland-sessions/dwl.desktop
'';
passthru.providedSessions = ["dwl"];
});
})
];
environment.sessionVariables = {
NIXOS_OZONE_WL=1;
WLR_NO_HARDWARE_CURSORS=1;
SDL_VIDEODRIVER="wayland";
QT_QPA_PLATFORM="wayland-egl";
QT_WAYLAND_DISABLE_WINDOW_DECORATIONS="1";
__JAVA_AWT_WM_NONREPARENTING=1;
# Bug with Wayland: Fixed in 23.1
# Causes firefox & thunderbird to crash
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646/diffs?commit_id=ee5d2250fd159689aae3f7d632a6226971bea85c
MOZ_ENABLE_WAYLAND=0;
GTK_THEME="Adwaita-dark";
};
environment.systemPackages = with pkgs; [
dwl
waybar
foot
pwvucontrol
];
}

View File

@@ -0,0 +1,182 @@
/* Taken from https://github.com/djpohly/dwl/issues/466 */
#define COLOR(hex) { ((hex >> 24) & 0xFF) / 255.0f, \
((hex >> 16) & 0xFF) / 255.0f, \
((hex >> 8) & 0xFF) / 255.0f, \
(hex & 0xFF) / 255.0f }
/* appearance */
static const int sloppyfocus = 1; /* focus follows mouse */
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
static const unsigned int borderpx = 3; /* border pixel of windows */
static const float rootcolor[] = COLOR(0x222222ff);
static const float bordercolor[] = COLOR(0x233e5dff);
static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */
/* tagging - TAGCOUNT must be no greater than 31 */
#define TAGCOUNT (9)
/* logging */
static int log_level = WLR_ERROR;
/* Autostart */
static const char *const autostart[] = {
"@barcmd@", NULL,
NULL /* terminate */
};
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
/* examples: */
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
};
/* layout(s) */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile },
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* monitors */
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
static const MonitorRule monrules[] = {
/* name mfact nmaster scale layout rotate/reflect x y */
{ "DP-3", 0.5f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0 },
{ "DP-2", 0.5f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 2560, 0 },
{ "HDMI-A-1", 0.5f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 2560+3440, 0 },
/* defaults */
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
};
/* keyboard */
static const struct xkb_rule_names xkb_rules = {
/* can specify fields: rules, model, layout, variant, options */
/* example:
.options = "ctrl:nocaps",
*/
.options = NULL,
};
static const int repeat_rate = 25;
static const int repeat_delay = 600;
/* Trackpad */
static const int tap_to_click = 1;
static const int tap_and_drag = 1;
static const int drag_lock = 1;
static const int natural_scrolling = 0;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 0;
/* You can choose between:
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
LIBINPUT_CONFIG_SCROLL_2FG
LIBINPUT_CONFIG_SCROLL_EDGE
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
*/
static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
/* You can choose between:
LIBINPUT_CONFIG_CLICK_METHOD_NONE
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
*/
static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
/* You can choose between:
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
*/
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
/* You can choose between:
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
*/
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
static const double accel_speed = 0.0;
/* You can choose between:
LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle
LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
*/
static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;
/* If you want to use the windows key for MODKEY, use WLR_MODIFIER_LOGO */
#define MODKEY WLR_MODIFIER_LOGO
#define TAGKEYS(KEY,SKEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} }
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static const char *termcmd[] = { "@termcmd@", NULL };
static const char *editcmd[] = { "@editcmd@", NULL };
static const char *menucmd[] = { "@menucmd@", NULL };
static const char *playcmd[] = { "@playcmd@", NULL };
static const char *scrncmd[] = { "@scrncmd@", NULL };
static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
{ MODKEY, XKB_KEY_r, spawn, {.v = menucmd} },
{ MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = editcmd} },
{ 0, XKB_KEY_XF86AudioPlay, spawn, {.v = playcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Print, spawn, {.v = scrncmd} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
{ MODKEY, XKB_KEY_z, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XKB_KEY_space, setlayout, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_F, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} },
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
/* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is
* do not remove them.
*/
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
};
static const Button buttons[] = {
{ MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
{ MODKEY, BTN_MIDDLE, togglefloating, {0} },
{ MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
};

View File

@@ -0,0 +1,2 @@
TTY_NUMBER=7

View File

@@ -0,0 +1,137 @@
# The PAM service that should be used to login
pam_service = "sshd"
focus_behaviour = "password"
# General settings for background style
[background]
show_background = true
[background.style]
# Allow to set the default background color for the login shell
color = "black"
# Settings for the background block's borders
show_border = true
border_color = "white"
# Shutdown option
[[power_controls.base_entries]]
hint = "Shutdown"
hint_color = "dark gray"
hint_modifiers = ""
key = "F1"
cmd = "systemctl poweroff -l"
# Reboot option
[[power_controls.base_entries]]
hint = "Reboot"
hint_color = "dark gray"
hint_modifiers = ""
key = "F2"
cmd = "systemctl reboot -l"
[environment_switcher]
include_tty_shell = true
mover_color_focused = "light cyan"
mover_modifiers_focused = "bold"
left_mover = "<["
right_mover = "]>"
# Neighbours' color and modifiers whilst the selector is unfocused
neighbour_color = "dark gray"
neighbour_modifiers = ""
# Neighbours' color and modifiers whilst the selector is focused
neighbour_color_focused = "gray"
neighbour_modifiers_focused = ""
# Margin between neighbours and selected
neighbour_margin = 1
# Selected's color and modifiers whilst the selector is unfocused
selected_color = "gray"
selected_modifiers = "underlined"
# Selected's color and modifiers whilst the selector is focused
selected_color_focused = "white"
selected_modifiers_focused = "bold"
# The length of the name of the desktop environment which is displayed.
max_display_length = 8
# The text used when no desktop environments are available
no_envs_text = "No environments..."
# The color and modifiers of the 'no desktop environments available text'
# whilst the selector is unfocused
no_envs_color = "white"
no_envs_modifiers = ""
# The color and modifiers of the 'no desktop environments available text'
# whilst the selector is focused
no_envs_color_focused = "red"
no_envs_modifiers_focused = ""
[username_field]
# Remember the username for the next time after a successful login attempt.
remember = true
[username_field.style]
# Enables showing a title
show_title = true
# The text used within the title
title = "Login"
# The title's color and modifiers whilst the username field is unfocused
title_color = "white"
content_color = "white"
# The title's color and modifiers whilst the username field is focused
title_color_focused = "blue"
content_color_focused = "blue"
# Enables showing the borders
show_border = true
# The borders' color and modifiers whilst the username field is unfocused
border_color = "white"
# The borders' color and modifiers whilst the username field is focused
border_color_focused = "light blue"
# Constrain the width of the username field
use_max_width = true
# The contraint of the username field's width
max_width = 48
[password_field]
# The character used for replacement when typing a password. Leave empty for no
# feedback.
# Note: Only one character is accepted.
content_replacement_character = "▮"
[password_field.style]
# Enables showing a title
show_title = true
# The text used within the title
title = "Password"
# The title's color and modifiers whilst the password field is unfocused
title_color = "white"
content_color = "white"
# The title's color and modifiers whilst the password field is focused
title_color_focused = "blue"
content_color_focused = "blue"
# Enables showing the borders
show_border = true
# The borders' color and modifiers whilst the username field is unfocused
border_color = "white"
# The borders' color and modifiers whilst the username field is focused
border_color_focused = "blue"
# Constrain the width of the password field
use_max_width = true
# The contraint of the password field's width
max_width = 48

View File

@@ -0,0 +1,38 @@
{ config, pkgs, lib, ... }: {
# Wayland support
hardware = {
opengl.enable = true;
opengl.driSupport = true;
opengl.driSupport32Bit = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
nvidiaSettings = true;
open = false;
package = let
rcu_patch = pkgs.fetchpatch {
url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
};
in config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "535.154.05";
sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg=";
sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k=";
openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo=";
settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10=";
persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE=";
patches = [ rcu_patch ];
};
};
};
programs.xwayland.enable = true;
environment.systemPackages = with pkgs; [
# Minecraft can behave oddly on wayland without this
glfw-wayland-minecraft
# Screen mirroring:
wdomirror
];
}

View File

@@ -0,0 +1,6 @@
{ config, pkgs, lib, ... }: {
fonts.packages = with pkgs; [
julia-mono
bqn386
];
}

View File

@@ -1,117 +1,114 @@
{ lib, config, pkgs, ... }: let { lib, config, pkgs, ... }: {
py3 = pkgs.python3; nixpkgs.overlays = [(final: prev: rec {
py3Pkgs = py3.pkgs; pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
# For 3D CNC machining (
opencamlib = py3Pkgs.toPythonModule (pkgs.stdenv.mkDerivation rec { python-final: python-prev: let
pname = "opencamlib"; py = python-prev;
version = "2019.07"; in {
nativeBuildInputs = (with pkgs;[ opencamlib = py.toPythonModule (pkgs.stdenv.mkDerivation rec {
cmake pname = "opencamlib";
git version = "2019.07";
doxygen nativeBuildInputs = (with pkgs;[
boost cmake
texlive.combined.scheme-full git
]); doxygen
propagatedNativeBuildInputs = (with pkgs; [ boost
py3 texlive.combined.scheme-full
py3.pkgs.boost ]);
py3.pkgs.vtk propagatedNativeBuildInputs = [
]); py.python
postPatch = '' py.boost
mkdir -p $out/${py3.sitePackages}/{lib,ocl} py.vtk
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake ];
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake postPatch = ''
''; mkdir -p $out/${py.python.sitePackages}/{lib,ocl}
cmakeFlags = [ sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py.python.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
"-DVERSION_STRING=2019.07" sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py.python.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
"-DBUILD_CXX_LIB=ON" '';
"-DBUILD_PY_LIB=ON" cmakeFlags = [
"-DUSE_PY_3=ON" "-DVERSION_STRING=2019.07"
"-DCMAKE_BUILD_TYPE=Release" "-DBUILD_CXX_LIB=ON"
"-DBUILD_PY_LIB=ON"
"-DUSE_PY_3=ON"
"-DCMAKE_BUILD_TYPE=Release"
];
src = pkgs.fetchFromGitHub {
owner = "aewallin";
repo = "opencamlib";
rev = "2019.07";
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
};
});
equation = py.buildPythonPackage {
pname = "Equation";
version = "1.2.01";
nativeBuildInputs = [
py.setuptools
py.numpy
];
src = pkgs.fetchzip {
url = "https://files.pythonhosted.org/packages/2e/cc/115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2/Equation-1.2.01.zip";
sha256 = "YFxZB3vaC5s49K1AQLFF4WGUr2RpomJTLQdZ24ITXr4=";
};
};
morphio = py.toPythonModule ( pkgs.stdenv.mkDerivation rec {
pname = "MorphIO";
version = "3.3.4";
nativeBuildInputs = (with pkgs; [
cmake
ninja
py.numpy
hdf5
]);
cmakeFlags = [
"-DMorphIO_CXX_WARNINGS=OFF"
];
postInstall = ''
mkdir -p $out/${py.python.sitePackages}
mv ../morphio $out/${py.python.sitePackages}
cp binds/python/_morphio.* $out/${py.python.sitePackages}/morphio/
'';
src = pkgs.fetchFromGitHub {
owner = "BlueBrain";
repo = "MorphIO";
rev = "v${version}";
deepClone = true;
fetchSubmodules = true;
sha256 = "C3zDziG7LF7v22ZvplBrtOYq7iKGnAavfpiBCcShHaQ=";
};
});
}
)
]; ];
src = pkgs.fetchFromGitHub {
owner = "aewallin";
repo = "opencamlib";
rev = "2019.07";
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
};
});
equation = py3Pkgs.buildPythonPackage {
pname = "Equation";
version = "1.2.01";
nativeBuildInputs = [
py3Pkgs.setuptools
py3Pkgs.numpy
];
src = pkgs.fetchzip {
url = "https://files.pythonhosted.org/packages/2e/cc/115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2/Equation-1.2.01.zip";
sha256 = "YFxZB3vaC5s49K1AQLFF4WGUr2RpomJTLQdZ24ITXr4=";
};
};
morphio = py3.pkgs.toPythonModule ( pkgs.stdenv.mkDerivation rec {
pname = "MorphIO";
version = "3.3.4";
nativeBuildInputs = (with pkgs; [
cmake
ninja
py3
py3.pkgs.numpy
hdf5
]);
cmakeFlags = [
"-DMorphIO_CXX_WARNINGS=OFF"
];
postInstall = ''
mkdir -p $out/${py3.sitePackages}
mv ../morphio $out/${py3.sitePackages}
cp binds/python/_morphio.* $out/${py3.sitePackages}/morphio/
'';
src = pkgs.fetchFromGitHub {
owner = "BlueBrain";
repo = "MorphIO";
rev = "v${version}";
deepClone = true;
fetchSubmodules = true;
sha256 = "C3zDziG7LF7v22ZvplBrtOYq7iKGnAavfpiBCcShHaQ=";
};
});
in {
nixpkgs.overlays = [(self: super: rec {
# Add CUDA Support to Blender # Add CUDA Support to Blender
blender_cuda = super.blender.override { blender_cuda = prev.blender.override {
stdenv = super.ccacheStdenv;
cudaSupport = true; cudaSupport = true;
}; };
# Add Opencamlib for BlenderCAM Support blender = final.blender_cuda.withPackages (p: with p; [
blender = blender_cuda.overrideAttrs (old: { # OpenCAMLib support
pythonPath = old.pythonPath ++ (with py3Pkgs; [ shapely
# OpenCAMLib support equation
shapely opencamlib
equation # NeuroMorphoVis support
opencamlib matplotlib
# NeuroMorphoVis support seaborn
matplotlib pandas
seaborn pillow
pandas h5py
pillow morphio
h5py # TODO add BluePy support?
morphio ]);
# TODO add BluePy support?
]);
});
# Update RX and Aseprite # Update RX and Aseprite
rx = super.rx.overrideAttrs (old: { rx = prev.rx.overrideAttrs (old: {
version = "git"; version = "git";
src = super.fetchFromGitHub { src = prev.fetchFromGitHub {
owner = "cloudhead"; owner = "cloudhead";
repo = old.pname; repo = old.pname;
rev = "18625a68921873ebe21a7ea8096409a9f0314541"; rev = "18625a68921873ebe21a7ea8096409a9f0314541";
sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM="; sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM=";
}; };
}); });
glaxnimate = super.glaxnimate.override {
python3 = self.python310;
};
})]; })];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -3,7 +3,9 @@
easyeffects easyeffects
helvum helvum
musescore # https://nixpk.gs/pr-tracker.html?pr=290037
# Waiting for this ^
# musescore
audacity audacity
tidal-hifi tidal-hifi

View File

@@ -1,74 +1,4 @@
{ lib, config, pkgs, ... }: let { lib, config, pkgs, ... }: {
# FreeCAD uses pyside2 (qt 5.15) which doesn't support > 3.10
py3 = pkgs.python310;
py3Pkgs = py3.pkgs;
# For 3D CNC machining
opencamlib = py3Pkgs.toPythonModule (pkgs.stdenv.mkDerivation rec {
pname = "opencamlib";
version = "2019.07";
nativeBuildInputs = (with pkgs;[
cmake
git
doxygen
boost
texlive.combined.scheme-full
]);
propagatedNativeBuildInputs = (with pkgs; [
py3
py3.pkgs.boost
py3.pkgs.vtk
]);
postPatch = ''
mkdir -p $out/${py3.sitePackages}/{lib,ocl}
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
'';
cmakeFlags = [
"-DVERSION_STRING=2019.07"
"-DBUILD_CXX_LIB=ON"
"-DBUILD_PY_LIB=ON"
"-DUSE_PY_3=ON"
"-DCMAKE_BUILD_TYPE=Release"
];
src = pkgs.fetchFromGitHub {
owner = "aewallin";
repo = "opencamlib";
rev = "2019.07";
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
};
});
py3Cad = py3.withPackages (p: (with p; [
numpy
scipy
seaborn
pandas
matplotlib
ipython
python-lsp-server
opencamlib
]));
in {
# if you also want support for flakes
nixpkgs.overlays = [(self: super: rec {
freecad = super.freecad.override {
stdenv = super.ccacheStdenv;
python = py3Cad;
boost = py3Pkgs.boost;
inherit (py3Pkgs)
gitpython
matplotlib
pivy
ply
pycollada
pyside2
pyside2-tools
pyyaml
scipy
shiboken2;
};
})];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
openscad openscad
freecad freecad

View File

@@ -26,8 +26,12 @@
discord-canary discord-canary
discord discord
vesktop
betterdiscordctl betterdiscordctl
slack slack
signal-desktop signal-desktop
zoom-us
anki
]; ];
} }

View File

@@ -1,56 +1,22 @@
{ lib, config, pkgs, ... }: let { lib, config, pkgs, ... }: {
wiiUDownloader = pkgs.stdenv.mkDerivation rec {
pname = "WiiUDownloader";
version = "1.32";
src = pkgs.fetchFromGitHub {
owner = "Xpl0itU";
repo = "WiiUDownloader";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-R3FiNiK27Q2x5HbHmWw3F4LPJNKz5BAoOyl4fYAEQlc=";
};
preConfigure = ''
cp ${./gtitles.c} src/gtitles.c
'';
nativeBuildInputs = with pkgs; [
cmake
pkg-config
wrapGAppsHook
];
buildInputs = with pkgs; [
curl
mbedtls
gtkmm3
pcre2
pcre-cpp
util-linux
libselinux
libsepol
libthai
libdatrie
xorg.libXdmcp
libxkbcommon
libepoxy
xorg.libXtst
];
propagatedBuildInputs = with pkgs; [
gsettings-desktop-schemas
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv * $out/bin
runHook postInstall
'';
};
in {
# For steam # For steam
services.flatpak.enable = true; services.flatpak.enable = true;
## Flatpak requires this
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
xdg.portal.config.common.default = "*";
programs.steam.enable = true;
# Game compat # Game compat
programs.gamemode.enable = true; programs.gamemode.enable = true;
nixpkgs.overlays = [
(final: prev: {
prismlauncher = prev.prismlauncher.override {
withWaylandGLFW=true;
};
})
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# For Steam # For Steam
protontricks protontricks
@@ -61,11 +27,5 @@ in {
# PS2 Games # PS2 Games
pcsx2 pcsx2
# Switch / WiiU Games
cemu
wiiUDownloader
yuzu-early-access
ukmm
]; ];
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,6 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
kitty
me-emacs me-emacs
rnix-lsp
texlive.combined.scheme-full texlive.combined.scheme-full
pandoc pandoc
libreoffice-qt libreoffice-qt

View File

@@ -1,4 +1,4 @@
wireless: ENC[AES256_GCM,data:VS8XBhc2DfqDdOeUvwnMYy8R1x/Qbr7lSuCb3l+X1xFdK7gni5aGm71pZk4=,iv:3I/GMA6KbYyD4fOkdLrW99JoIbUPA111fpZ4mlpgA8c=,tag:fAZyTM4AhNX3SENKpJxnsw==,type:str] wireless: ENC[AES256_GCM,data:rOnpkuFvcy3/mNPGVQXm6gjEDkIkmEMNJyugSfKddnWAlqbMbVbBhy8UQg==,iv:7/ba9+kUxsLaVG6uxZjF4WBUGa5i0/FFRyGAhkATEg8=,tag:ZD+Xy69K/txJzC1C/CLDlg==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@@ -14,8 +14,8 @@ sops:
WS93Uzg1UkFSSGM1eUR1UG9WRFVCYVEKbnE6DuVqtkynqphNIybtVgfVFJtgm6vI WS93Uzg1UkFSSGM1eUR1UG9WRFVCYVEKbnE6DuVqtkynqphNIybtVgfVFJtgm6vI
XywmFg8F1dOq1xDz97oFBbzbJa1J9qsMjNlPxZkC04snM9msZm9v2g== XywmFg8F1dOq1xDz97oFBbzbJa1J9qsMjNlPxZkC04snM9msZm9v2g==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-01-02T02:01:25Z" lastmodified: "2024-03-08T03:50:15Z"
mac: ENC[AES256_GCM,data:oZCQ9G7C7cqmuK/oXK0zo/siUvKMlKNArP39w9imAwWRSeLy1Vazu/oFH2F1Kzmq7B5iukBXID7T4kGB8vgLINa0T9qKP8s5GfxbcKadY3e6BqcMjXUXy5+UayQ+S/KxDFr4ftoJ4khwmVR8sW8Gpfo4y3VJgDBQTcrRNf8TAq0=,iv:jRMxlw+FDigIN1ZOLXQotqI+hRM6Fgi/DXWjPKKW5TQ=,tag:y7kl2Cjan+w3MqIwLW5dGA==,type:str] mac: ENC[AES256_GCM,data:1mZG+AFeBhilH8Zenvy+0YZM60CcCil7KfX02aEci8+0ne3g8y9jrbycCyR/E2wmB/FNYuNvwfwEWroHvooayeTZ09Wlh3D9RhTWPIHIj3s6aTmdV+OkcbfJt6tpuuSLcNcpHWnKF8EBKwPiZZnZSUuoGgEKAPiznV7qPLDYqLc=,iv:GnfojCZ4G6rHOTEYvt8AfAM2Vh1GUsGv3Aevcx9gkT8=,tag:bG/nckGVmSJx4SmsTLrUPg==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.8.1 version: 3.8.1

13
overlays/hydra.nix Normal file
View File

@@ -0,0 +1,13 @@
(final: prev: {
hydra_unstable = prev.hydra_unstable.overrideAttrs
(old: {
doCheck = false;
patches = [
(final.fetchpatch {
name = "hydra-gitea-push-patch";
url = "https://patch-diff.githubusercontent.com/raw/NixOS/hydra/pull/1227.patch";
sha256 = "A4dN/4zLMKLYaD38lu87lzAWH/3EUM7G5njx7Q4W47w=";
})
];
});
});