From 1008e6035f7df2e0d7cb4c3f5a64c38440a9f3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:31:12 +0100 Subject: [PATCH 1/8] fix(base): remove redundant nvd script --- modules/profiles/base.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 6d301d6..2513511 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -311,10 +311,4 @@ in }; xdg.userDirs.enable = true; }; - - system.activationScripts.diff = '' - if [ -e /run/current-system ]; then - ${pkgs.nvd}/bin/nvd --nix-bin-dir ${pkgs.nix}/bin diff /run/current-system/ "$systemConfig" - fi - ''; } From 4f0d0de4d6668165c343e957a199ffcfecd81e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:31:47 +0100 Subject: [PATCH 2/8] chore: clean up inputs --- flake.lock | 208 +++++++---------------------------------------------- flake.nix | 54 ++++++-------- 2 files changed, 46 insertions(+), 216 deletions(-) diff --git a/flake.lock b/flake.lock index 2dcff6d..85637e2 100644 --- a/flake.lock +++ b/flake.lock @@ -196,22 +196,6 @@ } }, "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -225,7 +209,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_6": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1696426674, @@ -301,27 +285,6 @@ "type": "indirect" } }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nix-super", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -423,37 +386,6 @@ "type": "github" } }, - "git-hooks-nix": { - "inputs": { - "flake-compat": [ - "nix-super" - ], - "gitignore": [ - "nix-super" - ], - "nixpkgs": [ - "nix-super", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix-super", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "git-hooks_2": { "inputs": { "flake-compat": [ @@ -857,23 +789,6 @@ "type": "github" } }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1715853528, - "narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96", - "type": "github" - }, - "original": { - "owner": "libgit2", - "ref": "v1.8.1", - "repo": "libgit2", - "type": "github" - } - }, "master": { "locked": { "lastModified": 1729839280, @@ -1011,30 +926,6 @@ "type": "github" } }, - "nix-super": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts_4", - "git-hooks-nix": "git-hooks-nix", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_6", - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1723852416, - "narHash": "sha256-iEwS5PbPBk433xZ5/Ll5hzOU9K2MAE6iqYh8EYoaIgk=", - "owner": "privatevoid-net", - "repo": "nix-super", - "rev": "7bf3b90d4d67b18d4cbfe28fd5d786aab17d009b", - "type": "github" - }, - "original": { - "owner": "privatevoid-net", - "repo": "nix-super", - "type": "github" - } - }, "nixos-facter-modules": { "locked": { "lastModified": 1728725827, @@ -1066,22 +957,6 @@ "type": "github" } }, - "nixpkgs-23-11": { - "locked": { - "lastModified": 1717159533, - "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { "lastModified": 1727825735, @@ -1094,22 +969,6 @@ "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" } }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1726062281, @@ -1174,22 +1033,6 @@ "type": "github" } }, - "nixpkgs_10": { - "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1725194671, @@ -1255,22 +1098,6 @@ } }, "nixpkgs_6": { - "locked": { - "lastModified": 1723688146, - "narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c3d4ac725177c030b1e289015989da2ad9d56af0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { "locked": { "lastModified": 1729788628, "narHash": "sha256-3suayUinicnvE/4shMZwp9FHT5izUM8gMpdEO/NHBTo=", @@ -1286,7 +1113,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { "lastModified": 1729665710, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -1302,7 +1129,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1719082008, "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", @@ -1318,12 +1145,28 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": [ "devshell" ], - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_4", "flake-parts": [ "flake-parts" ], @@ -1332,7 +1175,7 @@ "home-manager" ], "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, @@ -1414,9 +1257,9 @@ }, "pre-commit-hooks_2": { "inputs": { - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_5", "gitignore": "gitignore_4", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { @@ -1469,9 +1312,8 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", "nix-monitored": "nix-monitored", - "nix-super": "nix-super", "nixos-facter-modules": "nixos-facter-modules", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "nur": "nur", "pre-commit-hooks": "pre-commit-hooks_2", @@ -1589,7 +1431,7 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_9", "utils": "utils" }, "locked": { diff --git a/flake.nix b/flake.nix index bebb754..72baa12 100644 --- a/flake.nix +++ b/flake.nix @@ -5,25 +5,36 @@ # Nix agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.url = "github:ryantm/agenix"; + devshell.url = "github:numtide/devshell"; + disko.url = "github:nix-community/disko"; + flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; + impermanence.url = "github:nix-community/impermanence"; + master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; stable.url = "github:nixos/nixpkgs/nixos-24.05"; + + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + nur.url = "github:nix-community/NUR"; + nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - # Programs - nix-super.url = "github:privatevoid-net/nix-super"; + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + nix-monitored.url = "github:ners/nix-monitored"; nix-monitored.inputs.nixpkgs.follows = "nixpkgs"; + + # Programs timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; # Neovim @@ -55,9 +66,6 @@ arkenfox-userjs.flake = false; ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty"; - # ghostty.url = "/home/moritz/Documents/ghostty"; - - nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; }; outputs = inputs@{ self, flake-parts, ... }: @@ -80,29 +88,6 @@ sudo EDITOR="${pkgs.lib.getExe pkgs.vim}" ${pkgs.lib.getExe' inputs'.agenix.packages.default "agenix"} --identity /etc/ssh/ssh_host_ed25519_key "$@" ''; } - { - name = "build"; - help = "use nom to build system"; - command = - '' - nom build --no-link ".#nixosConfigurations.$(hostname).config.system.build.toplevel" $@ - ''; - } - { - name = "apply"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild switch --flake . $@"; - } - { - name = "test"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild test --flake . $@"; - } - { - name = "boot"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild boot --flake . $@"; - } { name = "vim-startuptime"; help = "test vim startup time"; @@ -113,6 +98,7 @@ stylua sumneko-lua-language-server nixpkgs-fmt + nh ]; }; @@ -181,16 +167,18 @@ nixConfig = { extra-substituters = [ - "https://hyprland.cachix.org" + # "https://hyprland.cachix.org" "https://nix-community.cachix.org" "https://pre-commit-hooks.cachix.org" - "https://ghostty.cachix.org" + # "https://ghostty.cachix.org" + "https://cache.lix.systems" ]; extra-trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + # "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" - "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" ]; }; } From 5077fd6a2bfa362def5850da5cf00746b74cd942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:32:25 +0100 Subject: [PATCH 3/8] feat(laptop): enable ai features --- hosts/nixos-laptop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 48f97f7..00c29a2 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -12,6 +12,7 @@ facter.reportPath = ./facter.json; my = { + ai.enable = true; virtualisation.libvirtd.enable = true; yubikey.luksSupport.enable = false; profiles = { From e05684c279f06d9f91f559461b9cb5d267178c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:32:47 +0100 Subject: [PATCH 4/8] fix(laptop): kanshi settings --- hosts/nixos-laptop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 00c29a2..b9e84ba 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -38,14 +38,14 @@ ]; } { - profile.name = "docked"; + profile.name = "docked-scads"; profile.outputs = [ { criteria = "eDP-1"; position = "640,1800"; # NOTE: 2160 / 1.2 = 1800 } { - criteria = "DP-3"; + criteria = "Dell Inc. DELL S2721QS DWTC513"; scale = 1.2; position = "0,0"; } From baa7a7eabb7a457d40c3b2ea4c6d5f44d82ade32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:33:26 +0100 Subject: [PATCH 5/8] feat(river): add passthrough mode --- modules/programs/river/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index 7b3692c..48c6f72 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -66,6 +66,9 @@ in open = "spawn 'wlr-randr --output eDP-1 --on'"; }; map = { + passthrough = { + "Super F11" = "enter-mode normal"; + }; normal = { "Super Q" = "close"; "Super Return" = "spawn '${config.my.terminal.package}'"; @@ -103,6 +106,8 @@ in "None XF86AudioNext" = "spawn 'playerctl -p spotifyd,firefox next'"; "None XF86AudioPlay" = "spawn 'playerctl -p spotifyd,firefox play-pause'"; "None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'"; + + "Super F11" = "enter-mode passthrough"; } // # tags ( From c6968d57dcb325f33c5047ec2a95492e732ac48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:34:16 +0100 Subject: [PATCH 6/8] chore(river): remove unused alsa 32bit support --- modules/programs/river/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index 48c6f72..a1e5033 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -262,7 +262,6 @@ in pipewire = { enable = true; alsa.enable = true; - alsa.support32Bit = true; pulse.enable = true; }; displayManager = { From 707cbcca9ed648a45b1e043e1aed979eea3908ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:34:34 +0100 Subject: [PATCH 7/8] feat(laptop): add wl-clipboard --- hosts/nixos-laptop/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index b9e84ba..ddb2858 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -26,7 +26,10 @@ services.mullvad.enable = true; }; - users.users.moritz.packages = [ pkgs.poetry ]; + users.users.moritz.packages = with pkgs; [ + poetry + wl-clipboard + ]; home-manager.users.moritz.services.kanshi.settings = [ { From 04407a5726d081cad236cb1d969b6b842a762d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 19:47:22 +0100 Subject: [PATCH 8/8] feat: add offline search --- flake.lock | 108 +++++++++++++++++++++++++++-- flake.nix | 25 ++++++- hosts/nixos-laptop/default.nix | 1 - modules/config/terminal.nix | 1 + modules/programs/python.nix | 2 +- modules/programs/river/default.nix | 4 +- 6 files changed, 130 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 85637e2..b8cda3e 100644 --- a/flake.lock +++ b/flake.lock @@ -339,6 +339,24 @@ "type": "github" } }, + "flake-utils_4": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "ghostty": { "inputs": { "nixpkgs-stable": "nixpkgs-stable", @@ -789,6 +807,32 @@ "type": "github" } }, + "ixx_2": { + "inputs": { + "flake-utils": [ + "search", + "flake-utils" + ], + "nixpkgs": [ + "search", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, "master": { "locked": { "lastModified": 1729839280, @@ -1033,6 +1077,22 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1725194671, @@ -1147,16 +1207,16 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1318,10 +1378,31 @@ "nur": "nur", "pre-commit-hooks": "pre-commit-hooks_2", "river": "river", + "search": "search", "stable": "stable", "timers": "timers" } }, + "search": { + "inputs": { + "flake-utils": "flake-utils_4", + "ixx": "ixx_2", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1731874326, + "narHash": "sha256-FVodEap6GQT/1DSG5KOcpsrKXfG9gMNObQxW+HNJnW8=", + "owner": "NuschtOS", + "repo": "search", + "rev": "64832c4cf885350ad0e63a27fd7055bcfc7955f6", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "stable": { "locked": { "lastModified": 1729691686, @@ -1428,10 +1509,25 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "utils": "utils" }, "locked": { @@ -1471,7 +1567,7 @@ }, "utils": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1692799911, diff --git a/flake.nix b/flake.nix index 72baa12..2b1d3bc 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,8 @@ arkenfox-userjs.url = "github:arkenfox/user.js"; arkenfox-userjs.flake = false; + search.url = "github:NuschtOS/search"; + ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty"; }; @@ -115,7 +117,28 @@ }; legacyPackages = pkgs; - + packages = + let + modules = [ + { name = "My stuff"; } + ]; + mkName = name: "${name} Search"; + mkSearch = name: value: inputs'.search.packages.mkSearch { + urlPrefix = "file://${self}/flake.nix"; + title = mkName name; + optionsJSON = "${(pkgs.nixosOptionsDoc { inherit (value) options; warningsAreErrors = false; }).optionsJSON}/share/doc/nixos/options.json"; + }; + serveSearch = name: value: + pkgs.writeShellApplication { + name = mkName name; + text = '' + xdg-open http://127.0.0.1:8080 + static-web-server -p 8080 -d ${mkSearch name value} + ''; + runtimeInputs = with pkgs; [ static-web-server xdg-utils ]; + }; + in + pkgs.lib.mapAttrs serveSearch self.nixosConfigurations; }; flake = { diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index ddb2858..072bab7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -21,7 +21,6 @@ webis.enable = true; impermanence.enable = true; }; - terminal.package = pkgs.kitty; programs.exercism.enable = true; services.mullvad.enable = true; }; diff --git a/modules/config/terminal.nix b/modules/config/terminal.nix index dbae99b..871e9bd 100644 --- a/modules/config/terminal.nix +++ b/modules/config/terminal.nix @@ -6,6 +6,7 @@ with lib; { options.my.terminal = { package = mkOption { + description = "Terminal emulator package to use. Gets converted to path of bin automatically."; type = types.package; apply = lib.getExe; }; diff --git a/modules/programs/python.nix b/modules/programs/python.nix index 41c4959..9fbfb26 100644 --- a/modules/programs/python.nix +++ b/modules/programs/python.nix @@ -10,7 +10,7 @@ let cfg = config.my.programs.python; - pythonVersions = map (version: "3${toString version}") (range 8 13); + pythonVersions = map (version: "3${toString version}") (range 9 13); enabledVersions = filterAttrs (_: value: value.enable) cfg.versions; pythonPackages = version: attrNames pkgs."python${version}Packages"; diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index a1e5033..5436ea1 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -15,10 +15,10 @@ in enable = mkEnableOption "river"; keyboardLayouts = mkOption { type = types.listOf types.str; - description = "list of keyboard layouts"; + description = "List of keyboard layouts."; default = [ "us" "de" ]; }; - nvidiaSupport = mkEnableOption "nvidiaSupport"; + nvidiaSupport = mkEnableOption "nvidia gpu support"; }; config = mkIf cfg.enable {