diff --git a/README.md b/README.md index a51f6b21..d6f2024a 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,7 @@ Inspired by _(stolen from)_ the following: - [colemickens](https://github.com/colemickens/nixcfg.git) - [Misterio77](https://github.com/Misterio77/nix-config.git) -To whoever stumbles across this repo, go to the ones above for answers. -And give the real authors credit where it's due :-) +> [!CAUTION] +> This repository is a hodgepodge and bastardisation of the repos above. +> My advice is to NOT copy anything of _mine_ and instead look at the sources. +> And don't forget to give them credit. :-) diff --git a/flake.lock b/flake.lock index 9cb5b1ac..c0751ebd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,32 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": [ + "hm" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1722339003, + "narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=", + "owner": "ryantm", + "repo": "agenix", + "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, "anyrun": { "inputs": { "flake-parts": "flake-parts", @@ -80,12 +107,12 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1722615689, - "narHash": "sha256-1nFssdBy2Wm5tihYjabxJqGoQOVsb0FZZ7gsH28cjDY=", - "rev": "a74f205ab8887f08985270723823e6555efb7d83", - "revCount": 1314, + "lastModified": 1722771754, + "narHash": "sha256-NXE43sBXHB5kto5dSH9afFUxug7W8bBZg75UHbydX5E=", + "rev": "69263a943d93c7af4429924ef66f3f64e5555089", + "revCount": 1315, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1314%2Brev-a74f205ab8887f08985270723823e6555efb7d83/019113e8-6de6-7d8b-a84a-9f8dc30916f1/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1315%2Brev-69263a943d93c7af4429924ef66f3f64e5555089/01911d53-f72d-75af-b463-5fd00a9507df/source.tar.gz" }, "original": { "type": "tarball", @@ -127,6 +154,28 @@ "type": "github" } }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -159,11 +208,11 @@ ] }, "locked": { - "lastModified": 1722691037, - "narHash": "sha256-JJhGg0ew5X9xDZXcfeFJvssCwuK2gBNNNNQDpxiiyQc=", + "lastModified": 1722777453, + "narHash": "sha256-HaVYqwfPuMqb1k8WHLH/0YGRr4P281jTD2vemjOWQNQ=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "68f73d9684c9cf93256936de23dfc87810407b61", + "rev": "3e3c59e1bf88fb018a468fc59920d12bc1daa626", "type": "github" }, "original": { @@ -302,11 +351,11 @@ ] }, "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "type": "github" }, "original": { @@ -523,11 +572,11 @@ ] }, "locked": { - "lastModified": 1722407237, - "narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", + "lastModified": 1722630065, + "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", "owner": "nix-community", "repo": "home-manager", - "rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", + "rev": "afc892db74d65042031a093adb6010c4c3378422", "type": "github" }, "original": { @@ -577,11 +626,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1722686530, - "narHash": "sha256-O0KIyfR3apBJ2wttOx2LRXB7XS6ysV+1bRhMh6vU6Os=", + "lastModified": 1722773977, + "narHash": "sha256-AqSmHptledo4Tp+hrHWovGR+e//bejR458sRmhq+jT4=", "ref": "refs/heads/main", - "rev": "9f5a57ff4569db57372bd86bd48add85a3a1a5e4", - "revCount": 5046, + "rev": "5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543", + "revCount": 5050, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -770,11 +819,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1722168631, - "narHash": "sha256-16XBXW86ceQC+jRx7feCREZo696kvIzpKYmN2LnKfaE=", + "lastModified": 1722773431, + "narHash": "sha256-puSEio9yjWojIBDBts4BSGZ43rv1LzIevdYOKmW/Mjg=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "4ce8efe904950cd85bda9624ff1c2ec55fe2ab6f", + "rev": "04a4b4d84e02590715e753da3d35fb03cddc6425", "type": "github" }, "original": { @@ -783,6 +832,24 @@ "type": "github" } }, + "microfetch": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1722781268, + "narHash": "sha256-uJQUMZtnowYH6ZbizNhGH/t6H7N5Q3m5pG4hf/0WMh8=", + "owner": "NotAShelf", + "repo": "microfetch", + "rev": "482ffe96cd92c14304723f91f723a9fa6670fe71", + "type": "github" + }, + "original": { + "owner": "NotAShelf", + "repo": "microfetch", + "type": "github" + } + }, "mozilla": { "flake": false, "locked": { @@ -807,11 +874,11 @@ ] }, "locked": { - "lastModified": 1722082646, - "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", + "lastModified": 1722609272, + "narHash": "sha256-Kkb+ULEHVmk07AX+OhwyofFxBDpw+2WvsXguUS2m6e4=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", + "rev": "f7142b8024d6b70c66fd646e1d099d3aa5bfec49", "type": "github" }, "original": { @@ -831,11 +898,11 @@ "umu": "umu" }, "locked": { - "lastModified": 1722476138, - "narHash": "sha256-37niGfDQ7ecc7OBMvl3Mf4wI1rKrSCUdw4kW07KIuZ0=", + "lastModified": 1722734656, + "narHash": "sha256-3Fk8o9WR1oVroPx3hDhmLguzhaFz0OifsIpLXLbef/Q=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "78f473731e818ae6e4e4cd4f34426855afab735e", + "rev": "88aa6c5d59424d979741bc7fc817f02f5b200c08", "type": "github" }, "original": { @@ -885,11 +952,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1722128034, - "narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", + "lastModified": 1722732880, + "narHash": "sha256-do2Mfm3T6SR7a5A804RhjQ+JTsF5hk4JTPGjCTRM/m8=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", + "rev": "8bebd4c74f368aacb047f0141db09ec6b339733c", "type": "github" }, "original": { @@ -916,11 +983,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1722421184, - "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "lastModified": 1722630782, + "narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "rev": "d04953086551086b44b6f3c6b7eeb26294f207da", "type": "github" }, "original": { @@ -964,11 +1031,26 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1722421184, - "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "lastModified": 1722719969, + "narHash": "sha256-E47qbT/mRtBCSZra+9S9208sp/QnNeOAq7EhHX+eMNE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83a364ced9d5b8a6bdac897bbef6b91e70777b97", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1722630782, + "narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "rev": "d04953086551086b44b6f3c6b7eeb26294f207da", "type": "github" }, "original": { @@ -993,11 +1075,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722605918, - "narHash": "sha256-eWVY6hM2IlxRIVUgKBlPCX4pJ1Nmh3Nvw/Io2LaE0Y4=", + "lastModified": 1722763580, + "narHash": "sha256-LgYIYkNYzqCldWJ/xJRQ156WDp6P9hHb4EsIXsRa+u4=", "owner": "nix-community", "repo": "nixvim", - "rev": "0bc169903705c94fda7934ecc27dd9038ad5f0e9", + "rev": "6f7cf23b226ceaee0a2d479c505652065dfe526f", "type": "github" }, "original": { @@ -1015,11 +1097,11 @@ ] }, "locked": { - "lastModified": 1722144272, - "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", + "lastModified": 1722493084, + "narHash": "sha256-ktjl908zZKWcGdMyz6kX1kHSg7LFFGPYBvTi9FgQleM=", "owner": "NuschtOS", "repo": "search", - "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", + "rev": "3f5abffa5f28b4ac3c9212c81c5e8d2d22876071", "type": "github" }, "original": { @@ -1057,6 +1139,7 @@ }, "root": { "inputs": { + "agenix": "agenix", "anyrun": "anyrun", "chaotic": "chaotic", "firefox-nightly": "firefox-nightly", @@ -1068,8 +1151,9 @@ "hyprland": "hyprland", "hyprland-contrib": "hyprland-contrib", "lanzaboote": "lanzaboote", + "microfetch": "microfetch", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "systems": "systems_6" } @@ -1215,11 +1299,11 @@ }, "locked": { "dir": "packaging/nix", - "lastModified": 1722028419, - "narHash": "sha256-kiujJqlhP1YUDf0+KfC+o7wdfltZUOBpJbPFPgR18hA=", + "lastModified": 1722710858, + "narHash": "sha256-PzMKVcp5ffL4v8+ukuTZRp78DI3kmjUBJUo0Vz5OYC4=", "ref": "refs/heads/main", - "rev": "7e00027c1bf9f4402318ee0530d95d34fbbc72c8", - "revCount": 684, + "rev": "babc7214d9bc5007eb6c0d59a720dea59fa694ac", + "revCount": 696, "submodules": true, "type": "git", "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" diff --git a/flake.nix b/flake.nix index cf61fc56..81bf6d85 100644 --- a/flake.nix +++ b/flake.nix @@ -8,17 +8,10 @@ imports = [ ./home ./hosts - # ./nixos/pkgs ]; perSystem = {pkgs, ...}: { - devShells.default = pkgs.mkShell { - packages = [ - pkgs.alejandra - pkgs.git - pkgs.nodePackages.prettier - ]; - }; + devShells = import ./system/nix/shell {inherit pkgs;}; formatter = pkgs.alejandra; }; }; @@ -83,14 +76,14 @@ # }; # }; anyrun.url = "github:anyrun-org/anyrun"; - # agenix = { - # url = "github:ryantm/agenix"; - # inputs = { - # nixpkgs.follows = "nixpkgs"; - # home-manager.follows = "hm"; - # systems.follows = "systems"; - # darwin.follows = ""; - # }; - # }; + microfetch.url = "github:NotAShelf/microfetch"; + agenix = { + url = "github:ryantm/agenix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "hm"; + systems.follows = "systems"; + }; + }; }; } diff --git a/home/bin/neovim/plugins/chatgpt.nix b/home/bin/neovim/plugins/chatgpt.nix new file mode 100644 index 00000000..11911159 --- /dev/null +++ b/home/bin/neovim/plugins/chatgpt.nix @@ -0,0 +1,5 @@ +{ + programs.nixvim.plugins.chatgpt = { + enable = true; + }; +} diff --git a/home/bin/neovim/plugins/default.nix b/home/bin/neovim/plugins/default.nix index 210bb4ef..c9973405 100644 --- a/home/bin/neovim/plugins/default.nix +++ b/home/bin/neovim/plugins/default.nix @@ -13,6 +13,7 @@ ./tagbar.nix ./telescope.nix ./treesitter.nix + # ./chatgpt.nix # ./vimtex.nix ./nonels.nix ./conform.nix diff --git a/home/default.nix b/home/default.nix index e9b46fc9..94e09217 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,3 @@ -# Yanked from fufexan { self, inputs, @@ -43,26 +42,22 @@ inherit (inputs.hm.lib) homeManagerConfiguration; pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + + # Function to create home configuration + makeHomeConfiguration = modules: + homeManagerConfiguration { + inherit pkgs extraSpecialArgs modules; + }; in { # we need to pass this to NixOS' HM module _module.args = {inherit homeImports;}; flake = { - homeConfigurations = { - "cnst_cnix" = homeManagerConfiguration { - modules = homeImports."cnst@cnix"; - inherit pkgs extraSpecialArgs; - }; - - "adam_adampad" = homeManagerConfiguration { - modules = homeImports."adam@adampad"; - inherit pkgs extraSpecialArgs; - }; - - "toothpick_toothpc" = homeManagerConfiguration { - modules = homeImports."toothpick@toothpc"; - inherit pkgs extraSpecialArgs; - }; - }; + homeConfigurations = builtins.listToAttrs (map + (name: { + name = builtins.replaceStrings ["@"] ["_"] name; + value = makeHomeConfiguration homeImports.${name}; + }) + (builtins.attrNames homeImports)); }; } diff --git a/home/opt/utility/default.nix b/home/opt/utility/default.nix index ed522800..b6d59dfb 100644 --- a/home/opt/utility/default.nix +++ b/home/opt/utility/default.nix @@ -30,5 +30,6 @@ qbittorrent networkmanagerapplet # tray icon for NetworkManager usbimager # write bootable usb images! + chatgpt-cli ]; } diff --git a/home/usr/share/shell/cnst/default.nix b/home/usr/share/shell/cnst/default.nix index 303a9210..a0d956dd 100644 --- a/home/usr/share/shell/cnst/default.nix +++ b/home/usr/share/shell/cnst/default.nix @@ -54,7 +54,7 @@ ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241' - + microfetch ''; }; } diff --git a/hosts/adampad/hardware-configuration.nix b/hosts/adampad/hardware-configuration.nix index 7d47ae01..80bd371f 100644 --- a/hosts/adampad/hardware-configuration.nix +++ b/hosts/adampad/hardware-configuration.nix @@ -18,7 +18,7 @@ "usb_storage" "sd_mod" ]; - kernelModules = ["amdgpu"]; + kernelModules = ["kvm-amd"]; }; kernelModules = ["kvm-amd"]; diff --git a/hosts/cnix/hardware-configuration.nix b/hosts/cnix/hardware-configuration.nix index b9c6e6e2..fe204050 100644 --- a/hosts/cnix/hardware-configuration.nix +++ b/hosts/cnix/hardware-configuration.nix @@ -18,7 +18,7 @@ "usb_storage" "sd_mod" ]; - kernelModules = ["amdgpu"]; + kernelModules = ["kvm-amd"]; }; kernelModules = ["kvm-amd"]; diff --git a/hosts/default.nix b/hosts/default.nix index f9f9e982..cbe6b5f8 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -36,8 +36,8 @@ }; } - # inputs.agenix.nixosModules.default inputs.chaotic.nixosModules.default + inputs.agenix.nixosModules.default ]; }; toothpc = nixosSystem { diff --git a/hosts/toothpc/hardware-configuration.nix b/hosts/toothpc/hardware-configuration.nix index 94ab50a6..b9ab6d32 100644 --- a/hosts/toothpc/hardware-configuration.nix +++ b/hosts/toothpc/hardware-configuration.nix @@ -20,7 +20,7 @@ "usb_storage" "sd_mod" ]; - kernelModules = ["nvidia"]; + kernelModules = ["kvm-intel"]; }; kernelModules = ["kvm-intel"]; extraModulePackages = []; diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 00000000..cb9099fe --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,3 @@ +{inputs, ...}: { + environment.systemPackages = [inputs.agenix.packages.x86_64-linux.default]; +} diff --git a/system/default.nix b/system/default.nix index 9603dc54..3296edf0 100644 --- a/system/default.nix +++ b/system/default.nix @@ -19,6 +19,8 @@ let ++ [ ./opt/gaming.nix ./opt/android + ./opt/agenix + ./opt/microfetch ./opt/gimp ./opt/inkscape ./srv/blueman diff --git a/system/etc/xserver/nvidia/default.nix b/system/etc/xserver/nvidia/default.nix index a52969b2..cc501fe2 100644 --- a/system/etc/xserver/nvidia/default.nix +++ b/system/etc/xserver/nvidia/default.nix @@ -2,6 +2,6 @@ services.xserver = { enable = true; videoDrivers = ["nvidia"]; - layout = "se"; + xkb.layout = "se"; }; } diff --git a/system/nix/default.nix b/system/nix/default.nix index dad3e7cb..c28cddc2 100644 --- a/system/nix/default.nix +++ b/system/nix/default.nix @@ -16,10 +16,13 @@ pkgs.git pkgs.scx pkgs.stow + pkgs.age ]; localBinInPath = true; }; + console.useXkbConfig = true; + nix = { # pin the registry to avoid downloading and evaling a new nixpkgs version every time registry = lib.mapAttrs (_: v: {flake = v;}) inputs; diff --git a/system/nix/dev/dev.nix b/system/nix/shell/default.nix similarity index 83% rename from system/nix/dev/dev.nix rename to system/nix/shell/default.nix index f98dbfca..1d891f0b 100644 --- a/system/nix/dev/dev.nix +++ b/system/nix/shell/default.nix @@ -1,6 +1,7 @@ {pkgs ? import {}, ...}: { default = pkgs.mkShell { NIX_CONFIG = "extra-experimental-features = nix-command flakes"; + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; nativeBuildInputs = with pkgs; [ rust-analyzer cargo diff --git a/system/opt/agenix/default.nix b/system/opt/agenix/default.nix new file mode 100644 index 00000000..cb9099fe --- /dev/null +++ b/system/opt/agenix/default.nix @@ -0,0 +1,3 @@ +{inputs, ...}: { + environment.systemPackages = [inputs.agenix.packages.x86_64-linux.default]; +} diff --git a/system/opt/microfetch/default.nix b/system/opt/microfetch/default.nix new file mode 100644 index 00000000..1ac91464 --- /dev/null +++ b/system/opt/microfetch/default.nix @@ -0,0 +1,3 @@ +{inputs, ...}: { + environment.systemPackages = [inputs.microfetch.packages.x86_64-linux.default]; +}