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, self,
... ...
}: let }: let
system = "x86_64-linux";
username = "opdavies"; username = "opdavies";
mkNixos = import ./lib/nixos {inherit inputs self system username;}; mkNixos = import ./lib/nixos {inherit inputs self username;};
mkWsl = import ./lib/wsl2 {inherit inputs self system username;}; mkWsl = import ./lib/wsl2 {inherit inputs self username;};
in in
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"]; systems = ["x86_64-linux"];

View file

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

View file

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

View file

@ -4,7 +4,6 @@
inputs, inputs,
pkgs, pkgs,
self, self,
system,
username, username,
... ...
}: let }: let
@ -12,7 +11,7 @@
shared-config = import ../../shared/home-manager.nix {inherit inputs pkgs self username;}; shared-config = import ../../shared/home-manager.nix {inherit inputs pkgs self username;};
shared-packages = import ../../shared/home-manager-packages.nix {inherit inputs pkgs;}; 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 { in {
imports = imports =
if desktop if desktop