Various updates

This commit is contained in:
Daniel Flanagan 2024-03-19 10:25:29 -05:00
parent a44fc2764e
commit 93f60a925e
15 changed files with 169 additions and 106 deletions

View File

@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1701025348,
"narHash": "sha256-42GHmYH+GF7VjwGSt+fVT1CQuNpGanJbNgVHTAZppUM=",
"lastModified": 1709610799,
"narHash": "sha256-5jfLQx0U9hXbi2skYMGodDJkIgffrjIOgMRjZqms2QE=",
"owner": "ipetkov",
"repo": "crane",
"rev": "42afaeb1a0325194a7cdb526332d2cb92fddd07b",
"rev": "81c393c776d5379c030607866afef6406ca1be57",
"type": "github"
},
"original": {
@ -48,11 +48,11 @@
]
},
"locked": {
"lastModified": 1708910350,
"narHash": "sha256-cTuJVlOm05aQFIgGuYikgkrI61P2vTO2OfXwIRWEzUg=",
"lastModified": 1710427903,
"narHash": "sha256-sV0Q5ndvfjK9JfCg/QM/HX/fcittohvtq8dD62isxdM=",
"owner": "nix-community",
"repo": "disko",
"rev": "a13f36255cf4ce99cc4236a34251c2e7106e101d",
"rev": "21d89b333ca300bef82c928c856d48b94a9f997c",
"type": "github"
},
"original": {
@ -83,11 +83,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
@ -137,11 +137,11 @@
},
"hardware": {
"locked": {
"lastModified": 1709147990,
"narHash": "sha256-vpXMWoaCtMYJ7lisJedCRhQG9BSsInEyZnnG5GfY9tQ=",
"lastModified": 1710123225,
"narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "33a97b5814d36ddd65ad678ad07ce43b1a67f159",
"rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba",
"type": "github"
},
"original": {
@ -158,11 +158,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1709201369,
"narHash": "sha256-L1n9nSYMvkHFctaMkIuCfBMxJ6qGhgsta0SBi0Gcld0=",
"lastModified": 1710593447,
"narHash": "sha256-cL3LPle9oIqItLfkEJ7PBYe5YLxs5WoiY2GcwSUeIDs=",
"owner": "helix-editor",
"repo": "helix",
"rev": "d0bb77447138f5f70f96b174a8f29045a956c8c4",
"rev": "6fea7876a47df8627a4b40361a6fc0f692c6601f",
"type": "github"
},
"original": {
@ -179,11 +179,11 @@
]
},
"locked": {
"lastModified": 1709204054,
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
"lastModified": 1710532761,
"narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
"rev": "206f457fffdb9a73596a4cb2211a471bd305243d",
"type": "github"
},
"original": {
@ -195,11 +195,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"lastModified": 1709479366,
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github"
},
"original": {
@ -211,11 +211,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1709677081,
"narHash": "sha256-tix36Y7u0rkn6mTm0lA45b45oab2cFLqAzDbJxeXS+c=",
"lastModified": 1710420202,
"narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "880992dcc006a5e00dd0591446fdf723e6a51a64",
"rev": "878ef7d9721bee9f81f8a80819f9211ad1f993da",
"type": "github"
},
"original": {
@ -259,11 +259,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1709150264,
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
"lastModified": 1710451336,
"narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
"rev": "d691274a972b3165335d261cc4671335f5c67de9",
"type": "github"
},
"original": {
@ -324,11 +324,11 @@
]
},
"locked": {
"lastModified": 1701137803,
"narHash": "sha256-0LcPAdql5IhQSUXJx3Zna0dYTgdIoYO7zUrsKgiBd04=",
"lastModified": 1709604635,
"narHash": "sha256-le4fwmWmjGRYWwkho0Gr7mnnZndOOe4XGbLw68OvF40=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9dd940c967502f844eacea52a61e9596268d4f70",
"rev": "e86c0fb5d3a22a5f30d7f64ecad88643fe26449d",
"type": "github"
},
"original": {
@ -363,11 +363,11 @@
]
},
"locked": {
"lastModified": 1708987867,
"narHash": "sha256-k2lDaDWNTU5sBVHanYzjDKVDmk29RHIgdbbXu5sdzBA=",
"lastModified": 1710433464,
"narHash": "sha256-IXlPoWgIRovZ32mYvqqdBgOQln71LouE/HBhbKc1wcw=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a1c8de14f60924fafe13aea66b46157f0150f4cf",
"rev": "6c32d3b9c7593f4b466ec5404e59fc09a803a090",
"type": "github"
},
"original": {

View File

@ -1,4 +1,5 @@
{
config,
pkgs,
inputs,
colors,
@ -6,6 +7,25 @@
}: let
inherit (pkgs) system;
in {
# helix rust debugger stuff
# https://github.com/helix-editor/helix/wiki/Debugger-Configurations
home.file."${config.xdg.configHome}/lldb_vscode_rustc_primer.py" = {
text = ''
import subprocess
import pathlib
import lldb
# Determine the sysroot for the active Rust interpreter
rustlib_etc = pathlib.Path(subprocess.getoutput('rustc --print sysroot')) / 'lib' / 'rustlib' / 'etc'
if not rustlib_etc.exists():
raise RuntimeError('Unable to determine rustc sysroot')
# Load lldb_lookup.py and execute lldb_commands with the correct path
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
'';
};
programs.helix = {
enable = true;
package = inputs.helix.packages.${system}.helix;
@ -51,6 +71,31 @@ in {
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
# auto-format = true;
# }
{
name = "rust";
debugger = {
name = "lldb-vscode";
transport = "stdio";
command = "lldb-vscode";
templates = [
{
name = "binary";
request = "launch";
completion = [
{
name = "binary";
completion = "filename";
}
];
args = {
program = "{0}";
initCommands = ["command script import ${config.xdg.configHome}/lldb_vscode_rustc_primer.py"];
};
}
];
};
}
{
name = "html";
file-types = ["html"];

View File

@ -4,7 +4,7 @@
...
}: {
services.mako = with colors.withHashPrefix; {
enable = true;
enable = false; # mako is launched alongside the wm/de instead
borderSize = 1;
maxVisible = 5;
defaultTimeout = 15000;

View File

@ -2,8 +2,8 @@
programs.senpai = {
enable = true;
config = {
addr = "a";
nick = "a";
address = "a";
nickname = "a";
};
};

View File

@ -145,6 +145,7 @@
"timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\" & maybe-good-morning &'"
];
}
# {command = "mako";}
# {command = "firefox";}
# {command = "wezterm";}
{command = "kitty --single-instance";}

View File

@ -1,9 +1,18 @@
{pkgs, ...}: {
environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs.neovim = {
enable = true;
# plugins = [
# pkgs.vimPlugins.nvim-treesitter.withAllGrammars
# ];
};
environment.systemPackages = with pkgs; [
taplo # toml language server for editing helix configs per repo
watchexec
android-tools
kubectl
vscode
stern
libresprite
audacity

View File

@ -11,7 +11,7 @@
services.xserver.enable = lib.mkDefault true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enable = true;
hardware.pulseaudio.enable = false;

View File

@ -58,6 +58,7 @@
libinput
libinput-gestures
libnotify
# mako
# lutris
# nil
# nixpkgs-fmt

View File

@ -68,8 +68,6 @@
# };
# };
services.mako.enable = lib.mkForce false; # don't use mako when using plasma
wayland.windowManager.hyprland = {
settings = {
env = [

View File

@ -21,16 +21,51 @@ in {
# postgres
wifi
# hyprland
{
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
# programs.steam.package = inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.steam;
programs.steam.remotePlay.openFirewall = true;
services.udev.packages = with pkgs; [steam];
}
{
# laptop power management
services.upower.enable = true;
swapDevices = [
# TODO: move this to disko?
# NOTE(oninstall):
# sudo btrfs subvolume create /swap
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
# sudo swapon /swap/swapfile
{device = "/swap/swapfile";}
];
# findmnt -no UUID -T /swap/swapfile
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
systemd.sleep.extraConfig = "HibernateDelaySec=30m";
services.fwupd.enable = true;
# source: https://github.com/NixOS/nixos-hardware/tree/master/framework/13-inch/7040-amd#getting-the-fingerprint-sensor-to-work
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
# services.fwupd.package =
# (import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
# }) {
# inherit (pkgs) system;
# })
# .fwupd;
services.fwupd.extraRemotes = ["lvfs-testing"];
services.logind = {
lidSwitch = "suspend-then-hibernate";
# HandleLidSwitchDocked=ignore
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleActionSec=10m
IdleAction=suspend-then-hibernate
'';
};
}
];
services.xserver.enable = true;
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
# programs.steam.package = inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.steam;
programs.steam.remotePlay.openFirewall = true;
services.udev.packages = with pkgs; [steam];
environment = {
systemPackages = with pkgs; [
steam
@ -58,7 +93,6 @@ in {
# wallpaper-manager
# hyprland
];
home = {
stateVersion = "24.05";
pointerCursor = {
@ -98,49 +132,6 @@ in {
};
};
services.upower.enable = true;
# use updated ppd for framework 13:
# source: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/137?u=lytedev
swapDevices = [
# TODO: move this to disko?
# NOTE(oninstall):
# sudo btrfs subvolume create /swap
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
# sudo swapon /swap/swapfile
{device = "/swap/swapfile";}
];
# findmnt -no UUID -T /swap/swapfile
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
services.logind = {
lidSwitch = "suspend-then-hibernate";
# HandleLidSwitchDocked=ignore
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleActionSec=10m
IdleAction=suspend-then-hibernate
'';
};
systemd.sleep.extraConfig = "HibernateDelaySec=30m";
services.fwupd.enable = true;
# source: https://github.com/NixOS/nixos-hardware/tree/master/framework/13-inch/7040-amd#getting-the-fingerprint-sensor-to-work
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
# services.fwupd.package =
# (import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
# }) {
# inherit (pkgs) system;
# })
# .fwupd;
services.fwupd.extraRemotes = ["lvfs-testing"];
hardware.opengl.extraPackages = [
# pkgs.rocmPackages.clr.icd
pkgs.amdvlk

View File

@ -6,7 +6,13 @@
nixpkgs,
}: let
inherit (self) outputs;
supportedSystems = ["x86_64-linux"];
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forEachSupportedSystem (system: let

View File

@ -10,14 +10,15 @@
}: let
inherit (self) outputs;
systems = [
supportedSystems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = system: import nixpkgs {inherit system;};
in {

View File

@ -7,11 +7,15 @@
...
}: let
inherit (self) outputs;
systems = [
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forAllSystems (system: let
pkgs = import nixpkgs {inherit system;};

View File

@ -1,8 +1,6 @@
{
inputs = {
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
outputs = {
self,
@ -12,14 +10,15 @@
}: let
inherit (self) outputs;
systems = [
supportedSystems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);

View File

@ -5,7 +5,13 @@
nixpkgs,
}: let
inherit (self) outputs;
supportedSystems = ["x86_64-linux"];
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forEachSupportedSystem (system: let
@ -18,6 +24,8 @@
rustfmt
rustPackages.clippy
rust-analyzer
lldb
pkg-config
];
};