Compare commits

..

1 Commits

Author SHA1 Message Date
18f0a37407 wip 2024-10-05 19:00:35 -07:00
28 changed files with 291 additions and 549 deletions

125
flake.lock generated
View File

@@ -1,44 +1,5 @@
{ {
"nodes": { "nodes": {
"doomemacs": {
"flake": false,
"locked": {
"lastModified": 1733434763,
"narHash": "sha256-sebujw5VvBWMS+wXyjiGF81iyjPM/QQDnw5l7tDJCvk=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "ba1dca322f9a07bc2b7bec6a98f2c3c55c0bbd77",
"type": "github"
},
"original": {
"owner": "doomemacs",
"repo": "doomemacs",
"type": "github"
}
},
"emacs-overlay": {
"inputs": {
"nixpkgs": [
"nix-doom-emacs-unstraightened"
],
"nixpkgs-stable": [
"nix-doom-emacs-unstraightened"
]
},
"locked": {
"lastModified": 1735870044,
"narHash": "sha256-3t/AdIIniLZHetkG5An08oeB/z/gOAhC4iViw4Aig+Q=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "57ad4a6cfaf4666c9ce71b81bd7243e4ed2d8b01",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -46,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735925111, "lastModified": 1728041527,
"narHash": "sha256-/NptDI4njO5hH0ZVQ2yzbvTXmBOabZaGYkjhnMJ37TY=", "narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ef64efdbaca99f9960f75efab991e4c49e79a5f1", "rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -59,36 +20,13 @@
"type": "github" "type": "github"
} }
}, },
"nix-doom-emacs-unstraightened": {
"inputs": {
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1735893424,
"narHash": "sha256-/FAzolzHPQiyba5AhzSQcLGDZtBVsMgs87rHMrWMHNk=",
"owner": "marienz",
"repo": "nix-doom-emacs-unstraightened",
"rev": "f90d619eb3d423e6cd3024879a073680ba2f9eba",
"type": "github"
},
"original": {
"owner": "marienz",
"repo": "nix-doom-emacs-unstraightened",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1735834308, "lastModified": 1727802920,
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=", "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6df24922a1400241dae323af55f30e4318a6ca65", "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -98,35 +36,26 @@
"type": "github" "type": "github"
} }
}, },
"plasma-manager": { "nixpkgs-stable": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1735049224, "lastModified": 1725762081,
"narHash": "sha256-fWUd9kyXdepphJ7cCzOsuSo7l0kbFCkUqfgKqZyFZzE=", "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
"owner": "nix-community", "owner": "NixOS",
"repo": "plasma-manager", "repo": "nixpkgs",
"rev": "d16bbded0ae452bc088489e7dca3ef58d8d1830b", "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "NixOS",
"repo": "plasma-manager", "ref": "release-24.05",
"repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"plasma-manager": "plasma-manager",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@@ -134,14 +63,15 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1735844895, "lastModified": 1727423009,
"narHash": "sha256-CIRlqX9tBK2awJkmVu2cKuap/0QziDXStQZ/u/+e8Z4=", "narHash": "sha256-+4B/dQm2EnORIk0k2wV3aHGaE0WXTBjColXjj7qWh10=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "24d89184adf76d7ccc99e659dc5f3838efb5ee32", "rev": "127a96f49ddc377be6ba76964411bab11ae27803",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -149,21 +79,6 @@
"repo": "sops-nix", "repo": "sops-nix",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -13,17 +13,6 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nix-doom-emacs-unstraightened = {
url = "github:marienz/nix-doom-emacs-unstraightened";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, ... } @ inputs: let outputs = { self, nixpkgs, ... } @ inputs: let
@@ -34,10 +23,6 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.nix-doom-emacs-unstraightened.hmModule
];
} }
]; ];
in { in {
@@ -48,6 +33,8 @@
./machines/z790prors/configuration.nix ./machines/z790prors/configuration.nix
{ {
home-manager.users.johno = import ./home/home-z790prors.nix; home-manager.users.johno = import ./home/home-z790prors.nix;
home-manager.extraSpecialArgs.customPkgs =
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
} }
]; ];
}; };
@@ -58,6 +45,8 @@
./machines/nix-book/configuration.nix ./machines/nix-book/configuration.nix
{ {
home-manager.users.johno = import ./home/home-nix-book.nix; home-manager.users.johno = import ./home/home-nix-book.nix;
home-manager.extraSpecialArgs.customPkgs =
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
} }
]; ];
}; };
@@ -69,6 +58,8 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
{ {
home-manager.users.johno = import ./home/home-default.nix; home-manager.users.johno = import ./home/home-default.nix;
home-manager.extraSpecialArgs.customPkgs =
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
} }
]; ];
}; };

View File

@@ -1,8 +1,5 @@
{ pkgs, customPkgs, ... }: { pkgs, customPkgs, ... }:
let
customPkgs = pkgs.callPackage ../packages {};
in
{ {
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
@@ -98,7 +95,6 @@ in
# /etc/profiles/per-user/johno/etc/profile.d/hm-session-vars.sh # /etc/profiles/per-user/johno/etc/profile.d/hm-session-vars.sh
# #
home.sessionVariables = { home.sessionVariables = {
ENABLE_GAMESCOPE_WSI = "1";
}; };
home.sessionPath = [ home.sessionPath = [
@@ -108,10 +104,8 @@ in
imports = [ imports = [
./modules/emacs ./modules/emacs
./modules/i3+sway
./modules/lutris ./modules/lutris
./modules/plasma-manager ./modules/i3+sway
./modules/tmux
]; ];
programs.bash.enable = true; programs.bash.enable = true;

View File

@@ -3,6 +3,7 @@
{ {
imports = [ imports = [
./home-default.nix ./home-default.nix
./modules/hyprland/nix-book.nix
]; ];
home.i3_sway.extraSwayConfig = { home.i3_sway.extraSwayConfig = {

View File

@@ -3,5 +3,6 @@
{ {
imports = [ imports = [
./home-default.nix ./home-default.nix
./modules/hyprland/z790prors.nix
]; ];
} }

View File

@@ -2,15 +2,21 @@
with lib; with lib;
{ let
doomSync = (let
git = pkgs.git;
in ''
export PATH=${pkgs.emacs}/bin:${git}/bin:$PATH
${config.xdg.configHome}/emacs/bin/doom sync -u -j $((`nproc`/4*3))
'');
in {
config = { config = {
home.packages = [ home.packages = [
pkgs.emacs-all-the-icons-fonts pkgs.emacs-all-the-icons-fonts
pkgs.fontconfig pkgs.fontconfig
pkgs.graphviz pkgs.graphviz
pkgs.isort pkgs.isort
pkgs.nerd-fonts.fira-code pkgs.nerdfonts
pkgs.nerd-fonts.droid-sans-mono
pkgs.nil # nix lsp language server pkgs.nil # nix lsp language server
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style
(pkgs.ripgrep.override {withPCRE2 = true;}) (pkgs.ripgrep.override {withPCRE2 = true;})
@@ -19,15 +25,43 @@ with lib;
pkgs.python3 pkgs.python3
]; ];
programs.doom-emacs = {
enable = true;
doomDir = ./doom;
};
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.file = {
".config/emacs" = {
source = fetchGit {
url = "https://github.com/doomemacs/doomemacs.git";
# When updating me, remember to run `doom sync`
rev = "5ad99220b86ae1bf421861dfad24492d768ac4d9";
};
# We need to use recursive mode here or else doom fails to sync for
# some reason related to the permissions on the synced path. I'm not
# quite sure of everything that's going on here.
recursive = true;
# Because `recursive = true` will cause this to sync every single
# activation, we turn this off here.
#
# There's probably a way we could do better detection of this within
# our onChange shell?
#
# onChange = doomSync;
};
};
home.sessionVariables = { home.sessionVariables = {
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
EDITOR = "emacs -nw"; EDITOR = "emacs -nw";
}; };
home.sessionPath = [
"${config.xdg.configHome}/emacs/bin"
];
xdg.configFile."doom" = {
source = ./doom;
# Sync doom if we updated the config
onChange = doomSync;
};
}; };
} }

View File

@@ -28,7 +28,6 @@
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely ;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues! ;; wasn't installed correctly. Font issues are rarely Doom issues!
(setq doom-font (font-spec :family "Fira Code"))
;; There are two ways to load a theme. Both assume the theme is installed and ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the ;; available. You can either set `doom-theme' or manually load a theme with the
@@ -44,11 +43,7 @@
(setq org-directory "~/org/") (setq org-directory "~/org/")
(after! org (after! org
(setq org-agenda-span 'week (setq org-agenda-span 'week
my-agenda-dirs '("projects" "roam") org-agenda-files `(,org-directory ,(concat org-directory "roam/"))
org-agenda-files (cons org-directory (mapcan (lambda (x) (directory-files-recursively
(expand-file-name x org-directory)
"\.org$"))
my-agenda-dirs))
org-log-done 'time org-log-done 'time
org-agenda-custom-commands '(("n" "Agenda" org-agenda-custom-commands '(("n" "Agenda"
((agenda "") ((agenda "")

View File

@@ -149,7 +149,7 @@
;;lua ; one-based indices? one-based indices ;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
(nix +tree-sitter) ; I hereby declare "nix geht mehr!" (nix +tree-sitter +lsp) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel ;;ocaml ; an objective camel
(org +roam2) ; organize your plain life in plain text (org +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother

View File

@@ -0,0 +1,94 @@
{ inputs, ... }:
{
imports = [
./hyprpaper.nix
];
wayland.windowManager.hyprland = {
enable = true;
plugins = [ inputs.hy3.packages.x86_64-linux.hy3 ];
settings = {
"$mod" = "SUPER";
"$terminal" = "kitty";
"$fileManager" = "dolphin";
"$menu" = "wofi --show drun";
exec-once = [
"waybar"
"dunst"
];
xwayland = {
force_zero_scaling = true;
};
input = {
kb_layout = "us";
kb_options = "caps:escape";
follow_mouse = 1;
touchpad.natural_scroll = false;
};
windowrulev2 = [
# I can guess, but I should figure out what this actually does
"suppressevent maximize, class:.*"
];
general.layout = "hy3";
bind =
[
"SHIFT_$mod, Q, killactive"
"SHIFT_$mod, M, exit"
"$mod, D, exec, $menu"
"$mod, Return, exec, $terminal"
"$mod, H, hy3:movefocus, l"
"$mod, L, hy3:movefocus, r"
"$mod, K, hy3:movefocus, u"
"$mod, J, hy3:movefocus, d"
"SHIFT_$mod, H, hy3:movewindow, l"
"SHIFT_$mod, L, hy3:movewindow, r"
"SHIFT_$mod, K, hy3:movewindow, u"
"SHIFT_$mod, J, hy3:movewindow, d"
"$mod, V, hy3:makegroup, opposite"
"$mod, W, hy3:changegroup, toggletab"
"$mod, A, hy3:changefocus, raise"
"SHIFT_$mod, A, hy3:changefocus, lower"
"$mod, M, fullscreen, 0"
"$mod, E, hy3:expand, expand"
"SHIFT_$mod, E, hy3:expand, base"
"$mod, Q, hy3:warpcursor"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, hy3:movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
bindm =
[
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}

View File

@@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = [
"${config.xdg.dataHome}/wallpaper.jpg"
];
wallpaper = [
",${config.xdg.dataHome}/wallpaper.jpg"
];
};
};
xdg.dataFile."wallpaper.jpg" = {
source = ./wallpaper.jpg;
};
}

View File

@@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
wayland.windowManager.hyprland.settings.monitor = ",preferred,2880x1800@90.00Hz,1.33333";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 KiB

View File

@@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
wayland.windowManager.hyprland.settings.monitor = "DP-1,3440x1440@164.90,0x0,1.33333,vrr,1";
wayland.windowManager.hyprland.settings.env = [
"LIBVA_DRIVER_NAME,nvidia"
"XDG_SESSION_TYPE,wayland"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"NVD_BACKEND,direct"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"NIXOS_OZONE_WL,1"
];
wayland.windowManager.hyprland.settings.cursor.no_hardware_cursors = true;
}

View File

@@ -6,13 +6,13 @@ let
cfg = config.home.i3_sway; cfg = config.home.i3_sway;
i3_cfg = config.xsession.windowManager.i3.config; i3_cfg = config.xsession.windowManager.i3.config;
shared_config = recursiveUpdate rec { shared_config = recursiveUpdate {
modifier = "Mod4"; modifier = "Mod4";
terminal = "kitty"; terminal = "kitty";
defaultWorkspace = "workspace number 1"; defaultWorkspace = "workspace number 1";
keybindings = { keybindings = {
"${shared_config.modifier}+Return" = "exec ${terminal}"; "${shared_config.modifier}+Return" = "exec ${i3_cfg.terminal}";
"${shared_config.modifier}+Shift+q" = "kill"; "${shared_config.modifier}+Shift+q" = "kill";
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}"; "${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
@@ -129,13 +129,6 @@ in {
"type:keyboard" = { "type:keyboard" = {
xkb_options = "caps:escape"; xkb_options = "caps:escape";
}; };
"type:touchpad" = {
tap = "enabled";
tap_button_map = "lrm";
drag = "enabled";
natural_scroll = "disabled";
dwt = "enabled";
};
}; };
}; };
in { in {

View File

@@ -1,127 +0,0 @@
{ config, lib, pkgs, ... }:
# The current KDE config can be output with the command:
# nix run github:nix-community/plasma-manager
#
# Plasma-manager options documentation
# https://nix-community.github.io/plasma-manager/options.xhtml
#
# TODO: (ambitious) Add Kmail support to plasma-manager
{
programs.plasma = {
enable = true;
overrideConfig = true;
hotkeys.commands."launch-konsole" = {
name = "Launch Konsole";
key = "Meta+Return";
command = "konsole";
};
shortcuts = {
kmix = {
"decrease_microphone_volume" = "Microphone Volume Down";
"decrease_volume" = "Volume Down";
"decrease_volume_small" = "Shift+Volume Down";
"increase_microphone_volume" = "Microphone Volume Up";
"increase_volume" = "Volume Up";
"increase_volume_small" = "Shift+Volume Up";
"mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Volume Mute,Mute Microphone"];
"mute" = "Volume Mute";
};
mediacontrol = {
"mediavolumedown" = "none,,Media volume down";
"mediavolumeup" = "none,,Media volume up";
"nextmedia" = "Media Next";
"pausemedia" = "Media Pause";
"playmedia" = "none,,Play media playback";
"playpausemedia" = "Media Play";
"previousmedia" = "Media Previous";
"stopmedia" = "Media Stop";
};
ksmserver = {
"Lock Session" = ["Meta+Ctrl+Q" "Screensaver" "Screensaver,Lock Session"];
};
kwin = {
"Window Close" = "Meta+Shift+Q";
"Kill Window" = "Meta+Ctrl+Esc";
"Window Operations Menu" = "Alt+F3";
"Window Resize" = "Meta+R,,Resize Window";
"Overview" = "Meta+W";
"Grid View" = "Meta+G";
"Edit Tiles" = "Meta+T";
"Activate Window Demanding Attention" = "Meta+Ctrl+A";
"Show Desktop" = "Meta+D";
"Walk Through Windows" = "Alt+Tab";
"Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
"Walk Through Windows of Current Application" = "Alt+`";
"Walk Through Windows of Current Application (Reverse)" = "Alt+~";
"Window Fullscreen" = "Meta+Shift+F,,Make Window Fullscreen";
"Window Quick Tile Bottom" = "Meta+Down";
"Window Quick Tile Left" = "Meta+Left";
"Window Quick Tile Right" = "Meta+Right";
"Window Quick Tile Top" = "Meta+Up";
"view_actual_size" = "Meta+0";
"view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"];
"view_zoom_out" = "Meta+-";
};
"org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down";
"org_kde_powerdevil"."Hibernate" = "Hibernate";
"org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up";
"org_kde_powerdevil"."PowerDown" = "Power Down";
"org_kde_powerdevil"."PowerOff" = "Power Off";
"org_kde_powerdevil"."Sleep" = "Sleep";
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
"org_kde_powerdevil"."Turn Off Screen" = [ ];
"org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"];
plasmashell = {
"activate application launcher" = ["Meta" "Alt+F1,Meta" "Alt+F1,Activate Application Launcher"];
"activate task manager entry 1" = "none,,";
"activate task manager entry 2" = "none,,";
"activate task manager entry 3" = "none,,";
"activate task manager entry 4" = "none,,";
"activate task manager entry 5" = "none,,";
"activate task manager entry 6" = "none,,";
"activate task manager entry 7" = "none,,";
"activate task manager entry 8" = "none,,";
"activate task manager entry 9" = "none,,";
"activate task manager entry 10" = "none,,";
"show activity switcher" = "none,,";
};
};
configFile = {
kwinrc.Desktops.Number = {
value = 10;
immutable = true;
};
kcminputrc.Libinput = {
AccelerationProfile = "adaptive";
PointerAcceleration = 0.5;
};
kcminputrc.Mouse = {
X11LibInputXAccelProfileFlat = false;
XLbInptAccelProfileFlat = false;
};
kdeglobals.KDE.LookAndFeelPackage = "org.kde.breezedark.desktop";
};
};
}

View File

@@ -1,58 +0,0 @@
{ config, lib, pkgs, ... }:
let
tokyo-night = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tokyo-night";
rtpFilePath = "tokyo-night.tmux";
version = "1.6.1";
src = pkgs.fetchFromGitHub {
owner = "janoamaral";
repo = "tokyo-night-tmux";
rev = "d610ced20d5f602a7995854931440e4a1e0ab780";
sha256 = "sha256-17vEgkL7C51p/l5gpT9dkOy0bY9n8l0/LV51mR1k+V8=";
};
};
in
{
programs.tmux.enable = true;
programs.tmux.escapeTime = 0;
programs.tmux.mouse = true;
programs.tmux.newSession = true;
programs.tmux.historyLimit = 50000;
programs.tmux.clock24 = true;
programs.tmux.baseIndex = 1;
programs.tmux.prefix = "`";
programs.tmux.extraConfig = ''
set -g mouse on
set -g default-terminal "screen-256color"
bind -n S-Left previous-window
bind -n S-Right next-window
'';
programs.tmux.plugins = with pkgs; [
tmuxPlugins.cpu
tmuxPlugins.battery
tmuxPlugins.better-mouse-mode
tmuxPlugins.net-speed
tmuxPlugins.online-status
tmuxPlugins.pain-control
tmuxPlugins.tilish
tmuxPlugins.yank
{
plugin = tmuxPlugins.resurrect;
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15' # minutes
'';
}
tokyo-night
];
}

View File

@@ -12,13 +12,9 @@
roles = { roles = {
audio.enable = true; audio.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
desktop = { desktop.enable = true;
enable = true;
waylandOnly = true;
};
nfs-mounts.enable = true; nfs-mounts.enable = true;
printing.enable = true; printing.enable = true;
spotifyd.enable = true;
users = { users = {
enable = true; enable = true;
extraGroups = [ "video" ]; extraGroups = [ "video" ];

View File

@@ -29,7 +29,6 @@
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/ec1f70ea-27b6-4646-ad3b-eac41bd83e3e"; } [ { device = "/dev/disk/by-uuid/ec1f70ea-27b6-4646-ad3b-eac41bd83e3e"; }
]; ];
zramSwap.enable = true;
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -29,14 +29,9 @@
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
#boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot"; boot.loader.grub.useOSProber = true;
boot.loader.grub = {
enable = true;
useOSProber = true;
devices = [ "nodev" ];
};
networking = { networking = {
hostName = "z790prors-nix"; # Define your hostname. hostName = "z790prors-nix"; # Define your hostname.

View File

@@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, pkgs, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports =
@@ -15,11 +15,6 @@
"nvidia_uvm" "nvidia_uvm"
"nvidia_drm" "nvidia_drm"
]; ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"nvidia_drm.fbdev=1"
"nvidia_drm.modeset=1"
];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@@ -33,19 +28,7 @@
powerManagement.finegrained = false; powerManagement.finegrained = false;
open = false; open = false;
nvidiaSettings = true; nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.latest; package = config.boot.kernelPackages.nvidiaPackages.production;
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
#version = "555.58";
#sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
#sha256_aarch64 = lib.fakeSha256;
#openSha256 = lib.fakeSha256;
#settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
#persistencedSha256 = lib.fakeSha256;
#};
};
environment.sessionVariables = {
KWIN_DRM_ALLOW_NVIDIA_COLORSPACE = "1";
}; };
fileSystems."/" = fileSystems."/" =
@@ -58,28 +41,13 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/steam" = fileSystems."/arch" =
{ device = "/dev/disk/by-uuid/E494DA9A94DA6E94"; { device = "/dev/disk/by-label/endeavouros";
fsType = "ntfs"; fsType = "btrfs";
options = [
"nofail"
"rw"
"user"
"exec" # This needs to go after "user". See https://askubuntu.com/questions/30243/why-does-ubuntu-refuse-to-execute-files-from-an-ntfs-partition
"umask=000"
];
}; };
swapDevices = [ ]; swapDevices = [ ];
services.beesd.filesystems = {
root = {
spec = "LABEL=nixos";
hashTableSizeMB = 4096;
verbosity = "crit";
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
nextcloudTalkDesktop = pkgs.callPackage ./nextcloud-talk-desktop {}; nextcloudTalkDesktop = pkgs.callPackage ./nextcloud-talk-desktop {};
vulkanHDRLayer = pkgs.callPackage ./vulkan-hdr-layer {};
} }

View File

@@ -1,61 +1,52 @@
{ { lib
lib, , stdenv
stdenv, , fetchzip
fetchzip, , autoPatchelfHook
autoPatchelfHook,
nss, , nss
cairo, , cairo
xorg, , xorg
libxkbcommon, , libxkbcommon
alsa-lib, , alsa-lib
at-spi2-core, , at-spi2-core
mesa, , mesa
pango, , pango
libdrm, , libdrm
vivaldi-ffmpeg-codecs, , vivaldi-ffmpeg-codecs
gtk3, , gtk3
libGL, , libGL
libglvnd, , libglvnd
systemd, , systemd
}: }:
stdenv.mkDerivation (finalAttrs: rec { stdenv.mkDerivation (finalAttrs: {
pname = "nextcloud-talk-desktop"; pname = "nextcloud-talk-desktop";
version = "0.39.0"; version = "0.29.0";
# Building from source would require building also building Server and Talk components # Building from source would require building also building Server and Talk components
# See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites # See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites
src = fetchzip { src = fetchzip {
url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64-${finalAttrs.version}.zip"; url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64-${finalAttrs.version}.zip";
hash = "sha256-f8X6I2Je9wgstMTuYGaX7AXAqpZC92RUAltDVsHr9Vo="; hash = "sha256-fBIeNv8tfrVTFExLQDBPhIazvbsJ7a76+W9G0cuQDlw=";
stripRoot = false; stripRoot = false;
}; };
nativeBuildInputs = [ autoPatchelfHook ]; nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = buildInputs = [
[ nss
nss cairo
cairo alsa-lib
alsa-lib at-spi2-core
at-spi2-core pango
pango libdrm
libdrm libxkbcommon
libxkbcommon gtk3
gtk3 vivaldi-ffmpeg-codecs
vivaldi-ffmpeg-codecs mesa
mesa libGL
libGL libglvnd
libglvnd ] ++ (with xorg; [libX11 libXcomposite libXdamage libXrandr libXfixes libXcursor]);
]
++ (with xorg; [
libX11
libXcomposite
libXdamage
libXrandr
libXfixes
libXcursor
]);
# Required to launch the application and proceed past the zygote_linux fork() process # Required to launch the application and proceed past the zygote_linux fork() process
# Fixes `Zygote could not fork` # Fixes `Zygote could not fork`
@@ -64,23 +55,25 @@ stdenv.mkDerivation (finalAttrs: rec {
preInstall = '' preInstall = ''
mkdir -p $out/bin mkdir -p $out/bin
mkdir -p $out/opt mkdir -p $out/opt
cp -r $src/* $out/opt/ cp -r $src/* $out/opt/
''; '';
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
# Link the application in $out/bin away from contents of `preInstall` # Link the application in $out/bin away from contents of `preInstall`
ln -s "$out/opt/Nextcloud Talk" $out/bin/nextcloud-talk-desktop ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/${finalAttrs.pname}
runHook postInstall runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
description = "Nextcloud Talk Desktop Client"; description = "Nextcloud Talk Desktop Client Preview";
homepage = "https://github.com/nextcloud/talk-desktop"; homepage = "https://github.com/nextcloud/talk-desktop";
changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md"; changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md";
license = licenses.agpl3Only; license = licenses.agpl3Only;
maintainers = with maintainers; [ kashw2 ]; maintainers = with maintainers; [ kashw2 ];
mainProgram = "nextcloud-talk-desktop"; mainProgram = finalAttrs.pname;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
}; };
}) })

View File

@@ -1,34 +0,0 @@
{ lib, stdenv, fetchFromGitHub, meson, pkg-config, vulkan-loader, ninja, writeText, vulkan-headers, vulkan-utility-libraries, jq, libX11, libXrandr, libxcb, wayland, wayland-scanner }:
stdenv.mkDerivation rec {
pname = "vulkan-hdr-layer";
version = "63d2eec";
src = (fetchFromGitHub {
owner = "Zamundaaa";
repo = "VK_hdr_layer";
rev = "869199cd2746e7f69cf19955153080842b6dacfc";
fetchSubmodules = true;
hash = "sha256-xfVYI+Aajmnf3BTaY2Ysg5fyDO6SwDFGyU0L+F+E3is=";
}).overrideAttrs (_: {
GIT_CONFIG_COUNT = 1;
GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
GIT_CONFIG_VALUE_0 = "git@github.com:";
});
nativeBuildInputs = [ vulkan-headers meson ninja pkg-config jq ];
buildInputs = [ vulkan-headers vulkan-loader vulkan-utility-libraries libX11 libXrandr libxcb wayland wayland-scanner ];
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''
addToSearchPath XDG_DATA_DIRS @out@/share
'';
meta = with lib; {
description = "Layers providing Vulkan HDR";
homepage = "https://github.com/Zamundaaa/VK_hdr_layer";
platforms = platforms.linux;
license = licenses.mit;
};
}

View File

@@ -22,13 +22,11 @@ in
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
}; };
services.pulseaudio = { hardware.pulseaudio.package = pkgs.pulseaudioFull;
package = pkgs.pulseaudioFull; hardware.pulseaudio.extraConfig = "
extraConfig = '' load-module module-combine-sink
load-module module-combine-sink load-module module-switch-on-connect
load-module module-switch-on-connect ";
'';
};
}; };
} }

View File

@@ -1,7 +1,10 @@
{ lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let
cfg = config.roles;
in
{ {
imports = [ imports = [
./audio ./audio
@@ -16,6 +19,10 @@ with lib;
./virtualisation ./virtualisation
]; ];
options.roles = {
enable = mkEnableOption "Enable roles";
};
config = { config = {
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
@@ -31,26 +38,16 @@ with lib;
}; };
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
# Don't go to emergency mode if we aren't able to mount filesystems.
# This is silly if you have multiple hard drives or partitions
# configured on a machine and then one goes away intentionally or
# unintentionally. If the system is already booting, let it continue
# to try and boot.
systemd.enableEmergencyMode = false;
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git git
pciutils
tree
usbutils
vim
]; ];
nix = { nix = {
package = pkgs.nix; package = pkgs.nixFlakes;
distributedBuilds = true; distributedBuilds = true;
buildMachines = [{ buildMachines = [{
hostName = "z790prors.oglehome"; hostName = "z790prors.oglehome";
@@ -66,13 +63,11 @@ with lib;
max-jobs = "auto"; max-jobs = "auto";
trusted-users = [ "johno" ]; trusted-users = [ "johno" ];
substituters = [ substituters = [
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
};
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--delete-older-than 10d";
}; };
}; };

View File

@@ -5,20 +5,12 @@ with lib;
let let
cfg = config.roles.desktop; cfg = config.roles.desktop;
customPackages = pkgs.callPackage ../../packages {};
basePackages = with pkgs; [ basePackages = with pkgs; [
bambu-studio
blender
brightnessctl brightnessctl
ghostty
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
protonup-qt
#customPackages.vulkanHDRLayer
]; ];
x11BasePackages = with pkgs; [ x11BasePackages = with pkgs; [
]; ];
x11OnlyPackages = with pkgs; [ x11OnlyPackages = with pkgs; [
@@ -43,13 +35,9 @@ in
type = types.bool; type = types.bool;
default = false; default = false;
}; };
waylandOnly = mkOption {
type = types.bool;
default = false;
};
}; };
config = mkIf cfg.enable config =
{ {
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
@@ -83,41 +71,10 @@ in
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.java.enable = true; programs.java.enable = true;
programs.gamemode = {
enable = true;
};
programs.gamescope = {
enable = true;
#capSysNice = true;
args = [
#"--adaptive-sync"
#"--nested-refresh 165"
#"--backend wayland"
"--hdr-enabled"
"--hdr-itm-enable"
"--hdr-debug-force-output"
"--mangoapp"
"--rt"
"--steam"
#"--xwayland-count 2"
];
env = {
#PROTON_DISABLE_NVAPI = "1";
MANGOHUD = "1";
#MANGOHUD_CONFIG = "cpu_temp gpu_temp ram vram";
};
};
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true; localNetworkGameTransfers.openFirewall = true;
gamescopeSession = {
enable = true;
};
extraCompatPackages = with pkgs; [
proton-ge-bin
];
#package = pkgs.steam.override { #package = pkgs.steam.override {
#withJava = true; #withJava = true;
#withPrimus = true; #withPrimus = true;
@@ -126,7 +83,7 @@ in
}; };
services.sunshine = { services.sunshine = {
enable = true; enable = true;
autoStart = false; autoStart = true;
capSysAdmin = true; capSysAdmin = true;
openFirewall = true; openFirewall = true;
}; };
@@ -136,10 +93,11 @@ in
environment.systemPackages = with pkgs; mkMerge [ environment.systemPackages = with pkgs; mkMerge [
basePackages basePackages
(mkIf (!cfg.waylandOnly) x11BasePackages) x11BasePackages
(mkIf cfg.x11Only x11OnlyPackages) (mkIf cfg.x11Only x11OnlyPackages)
# TODO: Do we need a "wayland only" mode?
(mkIf (!cfg.x11Only) waylandBasePackages) (mkIf (!cfg.x11Only) waylandBasePackages)
(mkIf (cfg.waylandOnly) waylandOnlyPackages) (mkIf (!cfg.x11Only) waylandOnlyPackages)
]; ];
}; };

View File

@@ -35,7 +35,7 @@ in
}; };
services = if cfg.autologin then mkMerge [ services = if cfg.autologin then mkMerge [
(mkIf cfg.wayland { mkIf cfg.wayland {
cage = mkIf cfg.wayland { cage = mkIf cfg.wayland {
user = "kodi"; user = "kodi";
program = "${kodiPkg}/bin/kodi-standalone"; program = "${kodiPkg}/bin/kodi-standalone";
@@ -45,9 +45,9 @@ in
enable = false; enable = false;
autorun = false; autorun = false;
}; };
}) }
(mkIf (!cfg.wayland) { mkIf (!cfg.wayland) {
xserver = { xserver = {
enable = true; enable = true;
desktopManager.kodi = { desktopManager.kodi = {
@@ -65,7 +65,7 @@ in
defaultSession = "kodi"; defaultSession = "kodi";
sessionData.autologinSession = "kodi"; sessionData.autologinSession = "kodi";
}; };
}) }
] else {}; ] else {};
}; };
} }

View File

@@ -25,7 +25,7 @@ in
users.users.johno = { users.users.johno = {
isNormalUser = true; isNormalUser = true;
description = "John Ogle"; description = "John Ogle";
extraGroups = [ "wheel" "networkmanager" "audio" "video" ] ++ cfg.extraGroups; extraGroups = [ "wheel" "networkmanager" "audio" ] ++ cfg.extraGroups;
}; };
users.users.eli = mkIf cfg.kids { users.users.eli = mkIf cfg.kids {