···11-{ config, pkgs, ... }:
22-33-{
44- # Home Manager needs a bit of information about you and the paths it should
55- # manage.
66- home.username = "joshua";
77- home.homeDirectory = "/home/joshua";
88-99- # This value determines the Home Manager release that your configuration is
1010- # compatible with. This helps avoid breakage when a new Home Manager release
1111- # introduces backwards incompatible changes.
1212- #
1313- # You should not change this value, even if you update Home Manager. If you do
1414- # want to update the value, then make sure to first check the Home Manager
1515- # release notes.
1616- home.stateVersion = "25.05"; # Please read the comment before changing.
1717-1818- # The home.packages option allows you to install Nix packages into your
1919- # environment.
2020- home.packages = with pkgs; [
2121- # # Adds the 'hello' command to your environment. It prints a friendly
2222- # # "Hello, world!" when run.
2323- rsync
2424- keepassxc
2525- syncthing
2626- terminus_font
2727- jujutsu
2828- ripgrep
2929- goose-cli
3030- kubectl
3131- k3d
3232- tilt
3333- # # It is sometimes useful to fine-tune packages, for example, by applying
3434- # # overrides. You can do that directly here, just don't forget the
3535- # # parentheses. Maybe you want to install Nerd Fonts with a limited number
3636- # # of fonts?
3737- # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
3838-3939- # # You can also create simple shell scripts directly inside your
4040- # # configuration. For example, this adds a command 'my-hello' to your
4141- # # environment:
4242- # (pkgs.writeShellScriptBin "my-hello" ''
4343- # echo "Hello, ${config.home.username}!"
4444- # '')
4545- ];
4646-4747- # Home Manager is pretty good at managing dotfiles. The primary way to manage
4848- # plain files is through 'home.file'.
4949- home.file = {
5050- # # Building this configuration will create a copy of 'dotfiles/screenrc' in
5151- # # the Nix store. Activating the configuration will then make '~/.screenrc' a
5252- # # symlink to the Nix store copy.
5353- # ".screenrc".source = dotfiles/screenrc;
5454-5555- # # You can also set the file content immediately.
5656- # ".gradle/gradle.properties".text = ''
5757- # org.gradle.console=verbose
5858- # org.gradle.daemon.idletimeout=3600000
5959- # '';
6060- };
6161-6262- # Home Manager can also manage your environment variables through
6363- # 'home.sessionVariables'. These will be explicitly sourced when using a
6464- # shell provided by Home Manager. If you don't want to manage your shell
6565- # through Home Manager then you have to manually source 'hm-session-vars.sh'
6666- # located at either
6767- #
6868- # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
6969- #
7070- # or
7171- #
7272- # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
7373- #
7474- # or
7575- #
7676- # /etc/profiles/per-user/joshua/etc/profile.d/hm-session-vars.sh
7777- #
7878- home.sessionVariables = {
7979-8080- };
8181-8282- # Let Home Manager install and manage itself.
8383- programs.home-manager.enable = true;
8484- programs.zsh.enable = true;
8585- programs.emacs.enable = true;
8686- programs.atuin ={
8787- enable = true;
8888- flags = [ "--disable-up-arrow" ];
8989- };
9090- programs.direnv = {
9191- enable = true;
9292- enableZshIntegration = true;
9393- nix-direnv.enable = true;
9494- };
9595- services.emacs.enable = true;
9696- services.emacs.defaultEditor = true;
9797- services.emacs.startWithUserSession = "graphical";
9898-}
9999-
···11+# Edit this configuration file to define what should be installed on
22+# your system. Help is available in the configuration.nix(5) man page, on
33+# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
44+55+{ config, lib, pkgs, ... }:
66+77+{
88+ imports =
99+ [ # Include the results of the hardware scan.
1010+ ./hardware-configuration.nix
1111+ ];
1212+1313+ # Use the systemd-boot EFI boot loader.
1414+ boot.loader.systemd-boot.enable = true;
1515+ boot.loader.efi.canTouchEfiVariables = true;
1616+ hardware.amdgpu.initrd.enable = true;
1717+ hardware.bluetooth.enable = true;
1818+ networking.hostId = "5398fbbf";
1919+ system.stateVersion = "25.11"; # Did you read the comment?
2020+2121+ # Disable auto-suspend if gdm is installed.
2222+ services.displayManager.gdm.autoSuspend = false;
2323+ # Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
2424+ # If no user is logged in, the machine will power down after 20 minutes.
2525+ systemd.targets.sleep.enable = false;
2626+ systemd.targets.suspend.enable = false;
2727+ systemd.targets.hibernate.enable = false;
2828+ systemd.targets.hybrid-sleep.enable = false;
2929+3030+ profiles = {
3131+ desktop = {
3232+ enable = true;
3333+ niri.enable = true;
3434+ };
3535+ perftools.enable = true;
3636+ games.enable = true;
3737+ docs.enable = true;
3838+ zfs.enable = true;
3939+# nix-ld.enable = true;
4040+ };
4141+}
4242+
···11+# Configuration for Linux performance profiling tools (perf, ebpf tracing,
22+# flamegraphs).
33+{
44+ config,
55+ lib,
66+ pkgs,
77+ ...
88+}:
99+with lib; let
1010+ linuxpkgs = config.boot.kernelPackages;
1111+ cfg = config.profiles.perftools.enable;
1212+in {
1313+ options.profiles.perftools.enable = mkEnableOption "perftools";
1414+1515+ config = mkIf cfg {
1616+ environment.systemPackages = with pkgs; [
1717+ # use the correct version of `perf` for the configured `linuxPackages`
1818+ perf
1919+ # also include userspace perf-tools and flamegraph scripts
2020+ perf-tools
2121+ flamegraph
2222+ ];
2323+ # this does the same thing as above (using the correct `linuxPackages`) but
2424+ # for `bcc`...sad there's no version of this for perf out of the box.
2525+ programs.bcc.enable = true;
2626+ };
2727+}
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page, on
33-# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
44-55-{ config, lib, pkgs, ... }:
66-77-{
88- imports =
99- [ # Include the results of the hardware scan.
1010- ./hardware-configuration.nix
1111- ../modules/zfs.nix
1212- ];
1313-1414- # Use the systemd-boot EFI boot loader.
1515- boot.loader.systemd-boot.enable = true;
1616- boot.loader.efi.canTouchEfiVariables = true;
1717- hardware.amdgpu.initrd.enable = true;
1818- hardware.bluetooth.enable = true;
1919- profiles.zfs.enable = true;
2020- networking.hostId = "5398fbbf";
2121- networking.hostName = "uruk"; # Define your hostname.
2222- services.openssh.enable = true;
2323- system.stateVersion = "25.11"; # Did you read the comment?
2424-2525-}
2626-