mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-28 10:04:20 -05:00
pass inputs by name instead of passing the entire inputs
This commit is contained in:
Generated
+9
-9
@@ -53,11 +53,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1633210102,
|
||||
"narHash": "sha256-TIGST5kvhV6xI6yyrdQHyzshcy534HqVEOMao4iJSxc=",
|
||||
"lastModified": 1633256200,
|
||||
"narHash": "sha256-dYV982LAA2IKuzpw/+EGuBWcymyKFWviJWzueqxwEiA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0f3dfc94ef9f70cdb800e0cf8e22ec9d3a0a3c70",
|
||||
"rev": "e0a87d75e9083569f73efc47b58c0e3fa4f99382",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -83,11 +83,11 @@
|
||||
},
|
||||
"nix-colors": {
|
||||
"locked": {
|
||||
"lastModified": 1633227652,
|
||||
"narHash": "sha256-4nZs9TwbMDSTwSeTnTnLgA9rfPNz5RF3iZ/lpGsFBHU=",
|
||||
"lastModified": 1633229592,
|
||||
"narHash": "sha256-Fa1At21gl82MpmbRyqjSVI89bpVPQzTTG0sGcQR8Ya8=",
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"rev": "e0262e7949933d62431a912cdd3f46f79691c25b",
|
||||
"rev": "b34ac11267620e57d020ad8a818c09d7ede441a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -114,11 +114,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1633226981,
|
||||
"narHash": "sha256-aygSCXzd1X9Exk++gz6jK1NvyLzoVpEVpEJs7wvzGWk=",
|
||||
"lastModified": 1633268918,
|
||||
"narHash": "sha256-hjeu/sZl4VSm3UkJvayOeK96ng+8anfaq0hQ0kLUxo4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ddfc44de7293faadd101442fb17fbc4929be5aed",
|
||||
"rev": "d7a9c294134d308f8a1ab4df691d20489331299c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
nur.url = "github:nix-community/NUR";
|
||||
};
|
||||
|
||||
outputs = {... }@inputs:
|
||||
outputs = { nixpkgs, home-manager, nix-colors, hardware, impermanence, nur, flake-utils, ... }:
|
||||
let
|
||||
# Make system configuration, given hostname and system type
|
||||
mkSystem = { hostname, system }:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = { inherit nixpkgs nix-colors hardware impermanence nur; };
|
||||
modules = [
|
||||
./hosts/${hostname}
|
||||
./modules/nixos
|
||||
@@ -32,9 +32,9 @@
|
||||
};
|
||||
# Make home configuration, given username, hostname, and system type
|
||||
mkHome = { username, hostname, system }:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit username system;
|
||||
extraSpecialArgs = { inherit inputs hostname; };
|
||||
extraSpecialArgs = { inherit hostname impermanence nix-colors nur; };
|
||||
configuration = ./users/${username};
|
||||
extraModules = [
|
||||
./modules/home-manager
|
||||
@@ -70,10 +70,10 @@
|
||||
};
|
||||
}
|
||||
# Devshell for bootstrapping
|
||||
// inputs.flake-utils.lib.eachDefaultSystem (system:
|
||||
// flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
home-manager = inputs.home-manager.defaultPackage.${system};
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
hm = home-manager.defaultPackage.${system};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
@@ -81,7 +81,7 @@
|
||||
neovim
|
||||
nixFlakes
|
||||
nixos-rebuild
|
||||
home-manager
|
||||
hm
|
||||
nixfmt
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
# System configuration for my main desktop PC
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, hardware, impermanence, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-gpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
hardware.nixosModules.common-cpu-amd
|
||||
hardware.nixosModules.common-gpu-amd
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
impermanence.nixosModules.impermanence
|
||||
./hardware-configuration.nix
|
||||
../common.nix
|
||||
];
|
||||
|
||||
networking.hostName = "atlas";
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
overlays = [ inputs.nur.overlay ];
|
||||
};
|
||||
|
||||
fileSystems."/data/var".neededForBoot = true;
|
||||
fileSystems."/data/home".neededForBoot = true;
|
||||
|
||||
+9
-3
@@ -1,5 +1,5 @@
|
||||
# This file holds config that i use on all hosts
|
||||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, nixpkgs, nix-colors, nur, ... }:
|
||||
|
||||
{
|
||||
system.stateVersion = "21.11";
|
||||
@@ -16,10 +16,16 @@
|
||||
homeBinInPath = true;
|
||||
localBinInPath = true;
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
overlays = [ nur.overlay ];
|
||||
};
|
||||
|
||||
nix = {
|
||||
registry = {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
nix-colors.flake = inputs.nix-colors;
|
||||
nixpkgs.flake = nixpkgs;
|
||||
nix-colors.flake = nix-colors;
|
||||
};
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
package = pkgs.nixUnstable;
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
# System configuration for my Raspberry Pi 4
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, hardware, impermanence, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.raspberry-pi-4
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
hardware.nixosModules.raspberry-pi-4
|
||||
impermanence.nixosModules.impermanence
|
||||
./hardware-configuration.nix
|
||||
./minecraft.nix
|
||||
../common.nix
|
||||
];
|
||||
|
||||
networking.hostName = "merope";
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
overlays = [ inputs.nur.overlay ];
|
||||
};
|
||||
|
||||
# Opt-in persistence on /data
|
||||
environment.persistence."/data" = {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ pkgs, hostname, inputs, ... }:
|
||||
{ pkgs, hostname, impermanence, nix-colors, nur, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
inputs.nix-colors.homeManagerModule
|
||||
impermanence.nixosModules.home-manager.impermanence
|
||||
nix-colors.homeManagerModule
|
||||
|
||||
./scheme.nix
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
overlays = [ inputs.nur.overlay ];
|
||||
overlays = [ nur.overlay ];
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, nix-colors, ... }:
|
||||
|
||||
let
|
||||
colorschemeFromPicture = picture: kind:
|
||||
@@ -40,6 +40,8 @@ let
|
||||
installPhase = "mkdir -p $out && cp default.nix $out";
|
||||
});
|
||||
in {
|
||||
wallpaper.path = ../../wallpapers/mountain-pink-purple.jpg;
|
||||
colorscheme = colorschemeFromPicture config.wallpaper.path "dark";
|
||||
# wallpaper.path = ../../wallpapers/mountain-pink-purple.jpg;
|
||||
# colorscheme = colorschemeFromPicture config.wallpaper.path "dark";
|
||||
colorscheme = nix-colors.colorSchemes.paraiso;
|
||||
wallpaper.generate = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user