started modifing configuration structure
This commit is contained in:
31
flake.nix
31
flake.nix
@@ -8,12 +8,12 @@
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, ... }:
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
systemSettings = {
|
||||
system = "x86_64-linux";
|
||||
hostname = "kenryu-nixos";
|
||||
machine = "workstation";
|
||||
host = "syushiki";
|
||||
timezone = "Asia/Tokyo";
|
||||
locale = "ja_JP.UTF-8";
|
||||
bootConf = {
|
||||
@@ -35,32 +35,37 @@
|
||||
|
||||
pkgs = import inputs.nixpkgs {
|
||||
system = systemSettings.system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true );
|
||||
};
|
||||
};
|
||||
|
||||
lib = inputs.nixpkgs.lib;
|
||||
home-manager = inputs.home-manager;
|
||||
in {
|
||||
nixosConfigurations.system = lib.nixosSystem {
|
||||
#nixosModules = {
|
||||
# home-mngr = home-manager.nixosModules.home-manager {
|
||||
# home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useUserPackages = true;
|
||||
# home-manager.users.${userSettings.username} = import (./. + "/hosts/${systemSettings.host}/home.nix");
|
||||
# home-manager.extraSpecialArgs = {
|
||||
# inherit userSettings;
|
||||
# };
|
||||
# };
|
||||
#};
|
||||
|
||||
#nixosConfigurations = import ./hosts inputs { inherit systemSettings; inherit userSettings; };
|
||||
nixosConfigurations.syushiki = lib.nixosSystem {
|
||||
system = systemSettings.system;
|
||||
modules = [
|
||||
(./. + "/machines" + ("/" + systemSettings.machine) + "/configuration.nix")
|
||||
./hosts/syushiki
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${userSettings.username} = import (./. + "/machines" + ("/" + systemSettings.machine) + "/home.nix");
|
||||
home-manager.users.${userSettings.username} = import (./. + "/hosts/${systemSettings.host}/home.nix");
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit userSettings;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
inherit inputs;
|
||||
inherit inputs systemSettings userSettings;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user