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

View file

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

View file

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

View file

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

View file

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

View file

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