Refactor to remove system variable

This commit is contained in:
Oliver Davies 2024-03-12 17:15:10 +00:00
parent 9eac93c95f
commit d14f0a8883
4 changed files with 5 additions and 9 deletions

View file

@ -13,11 +13,10 @@
self,
...
}: let
system = "x86_64-linux";
username = "opdavies";
mkNixos = import ./lib/nixos {inherit inputs self system username;};
mkWsl = import ./lib/wsl2 {inherit inputs self system username;};
mkNixos = import ./lib/nixos {inherit inputs self username;};
mkWsl = import ./lib/wsl2 {inherit inputs self username;};
in
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];

View file

@ -1,7 +1,6 @@
{
inputs,
desktop ? false,
system,
}: {pkgs, ...}: let
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";

View file

@ -1,12 +1,11 @@
{
inputs,
self,
system,
username,
}: {
desktop ? false,
}: let
configuration = import ./configuration.nix {inherit desktop inputs system;};
configuration = import ./configuration.nix {inherit desktop inputs;};
hardwareConfiguration = import ./hardware-configuration.nix;
in
inputs.nixpkgs.lib.nixosSystem {
@ -14,7 +13,7 @@ in
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {inherit inputs desktop self system username;};
extraSpecialArgs = {inherit inputs desktop self username;};
useGlobalPkgs = true;
useUserPackages = true;
users."${username}" = import ./home-manager;

View file

@ -4,7 +4,6 @@
inputs,
pkgs,
self,
system,
username,
...
}: let
@ -12,7 +11,7 @@
shared-config = import ../../shared/home-manager.nix {inherit inputs pkgs self username;};
shared-packages = import ../../shared/home-manager-packages.nix {inherit inputs pkgs;};
pkgs-2311 = inputs.nixpkgs-2311.legacyPackages.${system};
pkgs-2311 = inputs.nixpkgs-2311.legacyPackages.${pkgs.system};
in {
imports =
if desktop