Compare commits

...

3 commits

7 changed files with 50 additions and 44 deletions

View file

@ -25,7 +25,10 @@
}); });
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
nixosModules = import ./modules; nixosModules = import ./modules;
nixosConfigurations = import ./hosts {inherit self inputs;}; nixosConfigurations = let
lib' = import ./lib {inherit inputs lib';};
in
import ./hosts {inherit inputs lib';};
packages = eachSystem (pkgs: import ./pkgs pkgs); packages = eachSystem (pkgs: import ./pkgs pkgs);
deploy.nodes = import ./nodes {inherit self inputs;}; deploy.nodes = import ./nodes {inherit self inputs;};
}; };

View file

@ -1,37 +1,31 @@
{ {
self,
inputs, inputs,
lib',
... ...
}: let }: let
inherit (inputs.nixpkgs.lib) nixosSystem; inherit (lib') mkSystem;
specialArgs = {
inherit inputs self;
};
in { in {
vamos = nixosSystem { vamos = mkSystem {
system = "x86_64-linux"; system = "x86_64-linux";
inherit specialArgs;
modules = [ modules = [
./vamos ./vamos
self.nixosModules.theme inputs.self.nixosModules.theme
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
}; };
solaire = nixosSystem { solaire = mkSystem {
system = "x86_64-linux"; system = "x86_64-linux";
inherit specialArgs;
modules = [ modules = [
./solaire ./solaire
self.nixosModules.theme inputs.self.nixosModules.theme
]; ];
}; };
anastacia = nixosSystem { anastacia = mkSystem {
system = "x86_64-linux"; system = "x86_64-linux";
inherit specialArgs;
modules = [ modules = [
./anastacia ./anastacia
]; ];

View file

@ -1,28 +1,25 @@
{ {specialArgs, ...}: let
self, system = ../../system;
specialArgs, home = ../../home;
...
}: let
mod = "${self}/system";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules ./modules
"${mod}" system
"${mod}/hardware/uni-sync.nix" "${system}/hardware/uni-sync.nix"
"${mod}/programs/gnome.nix" "${system}/programs/gnome.nix"
"${mod}/programs/games.nix" "${system}/programs/games.nix"
"${mod}/hardware/nvidia.nix" "${system}/hardware/nvidia.nix"
]; ];
home-manager = { home-manager = {
users.nezia.imports = [ users.nezia.imports = [
"${self}/home" home
"${self}/home/programs/games" "${home}/programs/games"
"${self}/home/terminal/emulators/foot.nix" "${home}/terminal/emulators/foot.nix"
]; ];
extraSpecialArgs = specialArgs; extraSpecialArgs = specialArgs;
}; };

View file

@ -1,8 +1,9 @@
{ {
pkgs, inputs,
lib, lib',
... ...
}: let }: let
inherit (inputs.nixpkgs) lib;
# convert rrggbb hex to rgba(r, g, b, a) # convert rrggbb hex to rgba(r, g, b, a)
rgba = c: let rgba = c: let
r = toString (hexToDec (builtins.substring 0 2 c)); r = toString (hexToDec (builtins.substring 0 2 c));
@ -86,8 +87,25 @@
]; ];
# Create a KDE konsole color scheme from base16 colors # Create a KDE konsole color scheme from base16 colors
mkKonsoleColorScheme = scheme: mkKonsoleColorScheme = pkgs: scheme:
pkgs.writeText "${scheme.name}.colorscheme" (schemeToKonsole scheme); pkgs.writeText "${scheme.name}.colorscheme" (schemeToKonsole scheme);
# https://github.com/diniamo/niqs/blob/caf396bb470619fa06936a379eec6e283c3c3d95/lib/default.nix#L13-L35C7
mkSystem = {system, ...} @ args:
lib.nixosSystem {
system = null;
specialArgs = {inherit inputs;};
modules =
[
{
_module.args = {
inherit system lib';
};
nixpkgs = {inherit system;};
}
]
++ args.modules or [];
};
in { in {
inherit mkKonsoleColorScheme rgba; inherit mkKonsoleColorScheme rgba mkSystem;
} }

View file

@ -4,7 +4,6 @@
./users.nix ./users.nix
./security.nix ./security.nix
./networking.nix ./networking.nix
../nix
]; ];
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./core ./core
./nix
./hardware/printing.nix ./hardware/printing.nix
./hardware/fwupd.nix ./hardware/fwupd.nix

View file

@ -1,18 +1,12 @@
_: { _: {
nixpkgs = { nixpkgs = {
overlays = [
(_: prev: {
lib =
prev.lib
// import ../../lib {
inherit (prev) lib pkgs;
};
})
];
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = ["cinny-4.2.2" "cinny-unwrapped-4.2.2" "segger-jlink-qt4-796s" "openssl-1.1.1w"]; permittedInsecurePackages = [
"cinny-4.2.2"
"cinny-unwrapped-4.2.2"
"segger-jlink-qt4-796s"
];
segger-jlink.acceptLicense = true; segger-jlink.acceptLicense = true;
}; };
}; };