more flake changes and added module impot helpers

This commit is contained in:
ISnortPennies 2023-01-25 13:13:51 -05:00
parent fea6f8b961
commit 0a10e29581
6 changed files with 96 additions and 51 deletions

View file

@ -1,11 +1,19 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
spicetify-nix.url = "github:the-argus/spicetify-nix";
suckless.url = "github:ISnortPennies/suckless";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
suckless = {
url = "github:ISnortPennies/suckless";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
@ -51,17 +59,23 @@
./systems/desktop.nix
{
environment.etc = {
"nix/inputs/nixpkgs".source = inputs.nixpkgs.outPath;
"nix/inputs/home-manager".source = inputs.home-manager.outPath;
"nix/flake-channels/system".source = inputs.self;
"nix/flake-channels/nixpkgs".source = inputs.nixpkgs.outPath;
"nix/flake-channels/home-manager".source = inputs.home-manager.outPath;
};
nix = {
nixPath = [
"nixpkgs=/etc/nix/inputs/nixpkgs"
"home-manager=/etc/nix/inputs/home-manager"
"repl=/etc/nix/flake-channels/system/repl.nix"
"nixpkgs=/etc/nix/flake-channels/nixpkgs"
"home-manager=/etc/nix/flake-channels/home-manager"
];
#automatically get registry from input flakes
registry =
lib.attrsets.mapAttrs (
{
system.flake = self;
default.flake = nixpkgs;
}
// lib.attrsets.mapAttrs (
_: source: {
flake = source;
}

View file

@ -1,16 +1,25 @@
{
pkgs,
settings,
lib,
...
}: {
imports = [
./librewolf.nix
./sxhkd.nix
./theme.nix
./picom.nix
./spicetify.nix
./neovim
];
imports = let
modules = [
"librewolf"
"sxhkd"
"theme"
"picom"
"spicetify"
];
in
lib.lists.forEach modules (
m:
./. + ("/" + m + ".nix")
)
++ [
./neovim
];
xsession.numlock.enable = true;
home = {
homeDirectory = "/home/${settings.username}";

View file

@ -5,8 +5,8 @@
src = pkgs.fetchFromGitHub {
owner = "bluz71";
repo = "vim-moonfly-colors";
rev = "065c99b95355b33dfaa05bde11ad758e519b04a3";
sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI=";
rev = "ae3db6fe9a6d8ee6b22e28a19754a721d777df44";
sha256 = "sha256-2EUkTrPVERGmyWfq1a41xYCNHjFVUSrPUsYkWY9Igyc=";
};
};
in {

View file

@ -1,8 +1,20 @@
{settings, ...}: {
imports = [
./theme.nix
./neovim
];
{
settings,
lib,
...
}: {
imports = let
modules = [
"theme"
];
in
lib.lists.forEach modules (
m:
./. + ("/" + m + ".nix")
)
++ [
./neovim
];
home = {
username = "root";
homeDirectory = "/root";

View file

@ -1,26 +1,31 @@
{
pkgs,
settings,
lib,
...
}: {
#important stuff first
imports = [
../modules/packages.nix
../modules/boot.nix
../modules/fonts.nix
../modules/scripts.nix
../modules/vfio.nix
../modules/refreshrate.nix
../modules/xserver.nix
../modules/zsh.nix
../modules/git.nix
#../modules/mining.nix
../modules/parrot.nix
];
imports = let
modules = [
"boot"
"fonts"
"git"
#"mining"
"packages"
"parrot"
"refreshrate"
"scripts"
"vfio"
"xserver"
"zsh"
];
in
lib.lists.forEach modules (
m:
../modules + ("/" + m + ".nix")
);
networking.hostName = "gerg-desktop";
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.cpu.amd.updateMicrocode = true;
#end important stuff
environment.systemPackages = with pkgs; [
vscodium
gimp

View file

@ -1,24 +1,29 @@
{
pkgs,
settings,
lib,
...
}: {
#important stuff first
imports = [
../modules/boot.nix
../modules/fonts.nix
../modules/git.nix
../modules/packages.nix
../modules/prime.nix
../modules/scripts.nix
../modules/xserver.nix
../modules/zsh.nix
];
imports = let
modules = [
"boot"
"fonts"
"git"
"packages"
"prime"
"scripts"
"xserver"
"zsh"
];
in
lib.lists.forEach modules (
m:
../modules + ("/" + m + ".nix")
);
networking.hostName = "gerg-laptop";
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.cpu.amd.updateMicrocode = true;
# end important stuff
#environment.systemPackages = with pkgs; [
# xorg.xf86videoamdgpu
#];