diff --git a/flake.lock b/flake.lock index b8cda3e..2dcff6d 100644 --- a/flake.lock +++ b/flake.lock @@ -196,6 +196,22 @@ } }, "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=", @@ -209,7 +225,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_5": { + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1696426674, @@ -285,6 +301,27 @@ "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" @@ -339,24 +376,6 @@ "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", @@ -404,6 +423,37 @@ "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": [ @@ -807,29 +857,20 @@ "type": "github" } }, - "ixx_2": { - "inputs": { - "flake-utils": [ - "search", - "flake-utils" - ], - "nixpkgs": [ - "search", - "nixpkgs" - ] - }, + "libgit2": { + "flake": false, "locked": { - "lastModified": 1729958008, - "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "lastModified": 1715853528, + "narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=", + "owner": "libgit2", + "repo": "libgit2", + "rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96", "type": "github" }, "original": { - "owner": "NuschtOS", - "ref": "v0.0.6", - "repo": "ixx", + "owner": "libgit2", + "ref": "v1.8.1", + "repo": "libgit2", "type": "github" } }, @@ -970,6 +1011,30 @@ "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, @@ -1001,6 +1066,22 @@ "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, @@ -1013,6 +1094,22 @@ "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, @@ -1158,6 +1255,22 @@ } }, "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=", @@ -1173,7 +1286,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1729665710, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -1189,7 +1302,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1719082008, "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", @@ -1205,28 +1318,12 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1731676054, - "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "devshell": [ "devshell" ], - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-parts": [ "flake-parts" ], @@ -1235,7 +1332,7 @@ "home-manager" ], "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, @@ -1317,9 +1414,9 @@ }, "pre-commit-hooks_2": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_6", "gitignore": "gitignore_4", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { @@ -1372,37 +1469,17 @@ "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_6", + "nixpkgs": "nixpkgs_7", "nixvim": "nixvim", "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, @@ -1509,21 +1586,6 @@ "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", @@ -1567,7 +1629,7 @@ }, "utils": { "inputs": { - "systems": "systems_7" + "systems": "systems_6" }, "locked": { "lastModified": 1692799911, diff --git a/flake.nix b/flake.nix index 2b1d3bc..bebb754 100644 --- a/flake.nix +++ b/flake.nix @@ -5,36 +5,25 @@ # 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"; - stable.url = "github:nixos/nixpkgs/nixos-24.05"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - + stable.url = "github:nixos/nixpkgs/nixos-24.05"; nur.url = "github:nix-community/NUR"; - nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; - + # Programs + nix-super.url = "github:privatevoid-net/nix-super"; 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 @@ -65,9 +54,10 @@ 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"; + # ghostty.url = "/home/moritz/Documents/ghostty"; + + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; }; outputs = inputs@{ self, flake-parts, ... }: @@ -90,6 +80,29 @@ 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"; @@ -100,7 +113,6 @@ stylua sumneko-lua-language-server nixpkgs-fmt - nh ]; }; @@ -117,28 +129,7 @@ }; 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 = { @@ -190,18 +181,16 @@ 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://cache.lix.systems" + "https://ghostty.cachix.org" ]; 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=" - "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" ]; }; } diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 072bab7..48f97f7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -12,7 +12,6 @@ facter.reportPath = ./facter.json; my = { - ai.enable = true; virtualisation.libvirtd.enable = true; yubikey.luksSupport.enable = false; profiles = { @@ -21,14 +20,12 @@ webis.enable = true; impermanence.enable = true; }; + terminal.package = pkgs.kitty; programs.exercism.enable = true; services.mullvad.enable = true; }; - users.users.moritz.packages = with pkgs; [ - poetry - wl-clipboard - ]; + users.users.moritz.packages = [ pkgs.poetry ]; home-manager.users.moritz.services.kanshi.settings = [ { @@ -40,14 +37,14 @@ ]; } { - profile.name = "docked-scads"; + profile.name = "docked"; profile.outputs = [ { criteria = "eDP-1"; position = "640,1800"; # NOTE: 2160 / 1.2 = 1800 } { - criteria = "Dell Inc. DELL S2721QS DWTC513"; + criteria = "DP-3"; scale = 1.2; position = "0,0"; } diff --git a/modules/config/terminal.nix b/modules/config/terminal.nix index 871e9bd..dbae99b 100644 --- a/modules/config/terminal.nix +++ b/modules/config/terminal.nix @@ -6,7 +6,6 @@ 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/profiles/base.nix b/modules/profiles/base.nix index 2513511..6d301d6 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -311,4 +311,10 @@ 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 + ''; } diff --git a/modules/programs/python.nix b/modules/programs/python.nix index 9fbfb26..41c4959 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 9 13); + pythonVersions = map (version: "3${toString version}") (range 8 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 5436ea1..7b3692c 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 "nvidia gpu support"; + nvidiaSupport = mkEnableOption "nvidiaSupport"; }; config = mkIf cfg.enable { @@ -66,9 +66,6 @@ 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}'"; @@ -106,8 +103,6 @@ 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 ( @@ -262,6 +257,7 @@ in pipewire = { enable = true; alsa.enable = true; + alsa.support32Bit = true; pulse.enable = true; }; displayManager = {