fixing some st00pid stuff i dont remember

This commit is contained in:
cnst
2024-08-05 20:08:48 +02:00
parent e5f3027ce6
commit 6609f58772
19 changed files with 185 additions and 89 deletions

View File

@@ -6,5 +6,7 @@ Inspired by _(stolen from)_ the following:
- [colemickens](https://github.com/colemickens/nixcfg.git) - [colemickens](https://github.com/colemickens/nixcfg.git)
- [Misterio77](https://github.com/Misterio77/nix-config.git) - [Misterio77](https://github.com/Misterio77/nix-config.git)
To whoever stumbles across this repo, go to the ones above for answers. > [!CAUTION]
And give the real authors credit where it's due :-) > 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. :-)

178
flake.lock generated
View File

@@ -1,5 +1,32 @@
{ {
"nodes": { "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": { "anyrun": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
@@ -80,12 +107,12 @@
"yafas": "yafas" "yafas": "yafas"
}, },
"locked": { "locked": {
"lastModified": 1722615689, "lastModified": 1722771754,
"narHash": "sha256-1nFssdBy2Wm5tihYjabxJqGoQOVsb0FZZ7gsH28cjDY=", "narHash": "sha256-NXE43sBXHB5kto5dSH9afFUxug7W8bBZg75UHbydX5E=",
"rev": "a74f205ab8887f08985270723823e6555efb7d83", "rev": "69263a943d93c7af4429924ef66f3f64e5555089",
"revCount": 1314, "revCount": 1315,
"type": "tarball", "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": { "original": {
"type": "tarball", "type": "tarball",
@@ -127,6 +154,28 @@
"type": "github" "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": { "devshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -159,11 +208,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722691037, "lastModified": 1722777453,
"narHash": "sha256-JJhGg0ew5X9xDZXcfeFJvssCwuK2gBNNNNQDpxiiyQc=", "narHash": "sha256-HaVYqwfPuMqb1k8WHLH/0YGRr4P281jTD2vemjOWQNQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-firefox-nightly", "repo": "flake-firefox-nightly",
"rev": "68f73d9684c9cf93256936de23dfc87810407b61", "rev": "3e3c59e1bf88fb018a468fc59920d12bc1daa626",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -302,11 +351,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719994518, "lastModified": 1722555600,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -523,11 +572,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722407237, "lastModified": 1722630065,
"narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", "rev": "afc892db74d65042031a093adb6010c4c3378422",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -577,11 +626,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1722686530, "lastModified": 1722773977,
"narHash": "sha256-O0KIyfR3apBJ2wttOx2LRXB7XS6ysV+1bRhMh6vU6Os=", "narHash": "sha256-AqSmHptledo4Tp+hrHWovGR+e//bejR458sRmhq+jT4=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "9f5a57ff4569db57372bd86bd48add85a3a1a5e4", "rev": "5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543",
"revCount": 5046, "revCount": 5050,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -770,11 +819,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1722168631, "lastModified": 1722773431,
"narHash": "sha256-16XBXW86ceQC+jRx7feCREZo696kvIzpKYmN2LnKfaE=", "narHash": "sha256-puSEio9yjWojIBDBts4BSGZ43rv1LzIevdYOKmW/Mjg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lib-aggregate", "repo": "lib-aggregate",
"rev": "4ce8efe904950cd85bda9624ff1c2ec55fe2ab6f", "rev": "04a4b4d84e02590715e753da3d35fb03cddc6425",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -783,6 +832,24 @@
"type": "github" "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": { "mozilla": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -807,11 +874,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722082646, "lastModified": 1722609272,
"narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", "narHash": "sha256-Kkb+ULEHVmk07AX+OhwyofFxBDpw+2WvsXguUS2m6e4=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", "rev": "f7142b8024d6b70c66fd646e1d099d3aa5bfec49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -831,11 +898,11 @@
"umu": "umu" "umu": "umu"
}, },
"locked": { "locked": {
"lastModified": 1722476138, "lastModified": 1722734656,
"narHash": "sha256-37niGfDQ7ecc7OBMvl3Mf4wI1rKrSCUdw4kW07KIuZ0=", "narHash": "sha256-3Fk8o9WR1oVroPx3hDhmLguzhaFz0OifsIpLXLbef/Q=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "78f473731e818ae6e4e4cd4f34426855afab735e", "rev": "88aa6c5d59424d979741bc7fc817f02f5b200c08",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -885,11 +952,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1722128034, "lastModified": 1722732880,
"narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", "narHash": "sha256-do2Mfm3T6SR7a5A804RhjQ+JTsF5hk4JTPGjCTRM/m8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", "rev": "8bebd4c74f368aacb047f0141db09ec6b339733c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -916,11 +983,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1722421184, "lastModified": 1722630782,
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", "narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", "rev": "d04953086551086b44b6f3c6b7eeb26294f207da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -964,11 +1031,26 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1722421184, "lastModified": 1722719969,
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", "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", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", "rev": "d04953086551086b44b6f3c6b7eeb26294f207da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -993,11 +1075,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1722605918, "lastModified": 1722763580,
"narHash": "sha256-eWVY6hM2IlxRIVUgKBlPCX4pJ1Nmh3Nvw/Io2LaE0Y4=", "narHash": "sha256-LgYIYkNYzqCldWJ/xJRQ156WDp6P9hHb4EsIXsRa+u4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "0bc169903705c94fda7934ecc27dd9038ad5f0e9", "rev": "6f7cf23b226ceaee0a2d479c505652065dfe526f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1015,11 +1097,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722144272, "lastModified": 1722493084,
"narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", "narHash": "sha256-ktjl908zZKWcGdMyz6kX1kHSg7LFFGPYBvTi9FgQleM=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "16565307c267ec219c2b5d3494ba66df08e7d403", "rev": "3f5abffa5f28b4ac3c9212c81c5e8d2d22876071",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1057,6 +1139,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"anyrun": "anyrun", "anyrun": "anyrun",
"chaotic": "chaotic", "chaotic": "chaotic",
"firefox-nightly": "firefox-nightly", "firefox-nightly": "firefox-nightly",
@@ -1068,8 +1151,9 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib", "hyprland-contrib": "hyprland-contrib",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"microfetch": "microfetch",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"nixvim": "nixvim", "nixvim": "nixvim",
"systems": "systems_6" "systems": "systems_6"
} }
@@ -1215,11 +1299,11 @@
}, },
"locked": { "locked": {
"dir": "packaging/nix", "dir": "packaging/nix",
"lastModified": 1722028419, "lastModified": 1722710858,
"narHash": "sha256-kiujJqlhP1YUDf0+KfC+o7wdfltZUOBpJbPFPgR18hA=", "narHash": "sha256-PzMKVcp5ffL4v8+ukuTZRp78DI3kmjUBJUo0Vz5OYC4=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "7e00027c1bf9f4402318ee0530d95d34fbbc72c8", "rev": "babc7214d9bc5007eb6c0d59a720dea59fa694ac",
"revCount": 684, "revCount": 696,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"

View File

@@ -8,17 +8,10 @@
imports = [ imports = [
./home ./home
./hosts ./hosts
# ./nixos/pkgs
]; ];
perSystem = {pkgs, ...}: { perSystem = {pkgs, ...}: {
devShells.default = pkgs.mkShell { devShells = import ./system/nix/shell {inherit pkgs;};
packages = [
pkgs.alejandra
pkgs.git
pkgs.nodePackages.prettier
];
};
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
}; };
}; };
@@ -83,14 +76,14 @@
# }; # };
# }; # };
anyrun.url = "github:anyrun-org/anyrun"; anyrun.url = "github:anyrun-org/anyrun";
# agenix = { microfetch.url = "github:NotAShelf/microfetch";
# url = "github:ryantm/agenix"; agenix = {
# inputs = { url = "github:ryantm/agenix";
# nixpkgs.follows = "nixpkgs"; inputs = {
# home-manager.follows = "hm"; nixpkgs.follows = "nixpkgs";
# systems.follows = "systems"; home-manager.follows = "hm";
# darwin.follows = ""; systems.follows = "systems";
# }; };
# }; };
}; };
} }

View File

@@ -0,0 +1,5 @@
{
programs.nixvim.plugins.chatgpt = {
enable = true;
};
}

View File

@@ -13,6 +13,7 @@
./tagbar.nix ./tagbar.nix
./telescope.nix ./telescope.nix
./treesitter.nix ./treesitter.nix
# ./chatgpt.nix
# ./vimtex.nix # ./vimtex.nix
./nonels.nix ./nonels.nix
./conform.nix ./conform.nix

View File

@@ -1,4 +1,3 @@
# Yanked from fufexan
{ {
self, self,
inputs, inputs,
@@ -43,26 +42,22 @@
inherit (inputs.hm.lib) homeManagerConfiguration; inherit (inputs.hm.lib) homeManagerConfiguration;
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
# Function to create home configuration
makeHomeConfiguration = modules:
homeManagerConfiguration {
inherit pkgs extraSpecialArgs modules;
};
in { in {
# we need to pass this to NixOS' HM module # we need to pass this to NixOS' HM module
_module.args = {inherit homeImports;}; _module.args = {inherit homeImports;};
flake = { flake = {
homeConfigurations = { homeConfigurations = builtins.listToAttrs (map
"cnst_cnix" = homeManagerConfiguration { (name: {
modules = homeImports."cnst@cnix"; name = builtins.replaceStrings ["@"] ["_"] name;
inherit pkgs extraSpecialArgs; value = makeHomeConfiguration homeImports.${name};
}; })
(builtins.attrNames homeImports));
"adam_adampad" = homeManagerConfiguration {
modules = homeImports."adam@adampad";
inherit pkgs extraSpecialArgs;
};
"toothpick_toothpc" = homeManagerConfiguration {
modules = homeImports."toothpick@toothpc";
inherit pkgs extraSpecialArgs;
};
};
}; };
} }

View File

@@ -30,5 +30,6 @@
qbittorrent qbittorrent
networkmanagerapplet # tray icon for NetworkManager networkmanagerapplet # tray icon for NetworkManager
usbimager # write bootable usb images! usbimager # write bootable usb images!
chatgpt-cli
]; ];
} }

View File

@@ -54,7 +54,7 @@
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241' ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241'
microfetch
''; '';
}; };
} }

View File

@@ -18,7 +18,7 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
kernelModules = ["amdgpu"]; kernelModules = ["kvm-amd"];
}; };
kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];

View File

@@ -18,7 +18,7 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
kernelModules = ["amdgpu"]; kernelModules = ["kvm-amd"];
}; };
kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];

View File

@@ -36,8 +36,8 @@
}; };
} }
# inputs.agenix.nixosModules.default
inputs.chaotic.nixosModules.default inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
]; ];
}; };
toothpc = nixosSystem { toothpc = nixosSystem {

View File

@@ -20,7 +20,7 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
kernelModules = ["nvidia"]; kernelModules = ["kvm-intel"];
}; };
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
extraModulePackages = []; extraModulePackages = [];

3
modules/default.nix Normal file
View File

@@ -0,0 +1,3 @@
{inputs, ...}: {
environment.systemPackages = [inputs.agenix.packages.x86_64-linux.default];
}

View File

@@ -19,6 +19,8 @@ let
++ [ ++ [
./opt/gaming.nix ./opt/gaming.nix
./opt/android ./opt/android
./opt/agenix
./opt/microfetch
./opt/gimp ./opt/gimp
./opt/inkscape ./opt/inkscape
./srv/blueman ./srv/blueman

View File

@@ -2,6 +2,6 @@
services.xserver = { services.xserver = {
enable = true; enable = true;
videoDrivers = ["nvidia"]; videoDrivers = ["nvidia"];
layout = "se"; xkb.layout = "se";
}; };
} }

View File

@@ -16,10 +16,13 @@
pkgs.git pkgs.git
pkgs.scx pkgs.scx
pkgs.stow pkgs.stow
pkgs.age
]; ];
localBinInPath = true; localBinInPath = true;
}; };
console.useXkbConfig = true;
nix = { nix = {
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs; registry = lib.mapAttrs (_: v: {flake = v;}) inputs;

View File

@@ -1,6 +1,7 @@
{pkgs ? import <nixpkgs> {}, ...}: { {pkgs ? import <nixpkgs> {}, ...}: {
default = pkgs.mkShell { default = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes"; NIX_CONFIG = "extra-experimental-features = nix-command flakes";
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
rust-analyzer rust-analyzer
cargo cargo

View File

@@ -0,0 +1,3 @@
{inputs, ...}: {
environment.systemPackages = [inputs.agenix.packages.x86_64-linux.default];
}

View File

@@ -0,0 +1,3 @@
{inputs, ...}: {
environment.systemPackages = [inputs.microfetch.packages.x86_64-linux.default];
}