mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add flakes to all systems
This commit is contained in:
parent
485c8f899a
commit
3a08df0cc7
6 changed files with 10 additions and 35 deletions
|
@ -5,7 +5,6 @@
|
|||
./modules/backports.nix
|
||||
./modules/baseline.nix
|
||||
./modules/cli.nix
|
||||
./modules/flakes.nix
|
||||
./modules/gnome.nix
|
||||
./modules/phpipam.nix
|
||||
./modules/plasma.nix
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
outputs = { self, unstable, stable2009 }: {
|
||||
nixosModule = { ... }: {
|
||||
imports = [ ./. ];
|
||||
config = { sconfig.flakes.enable = true; };
|
||||
};
|
||||
nixosConfigurations = import ./hosts { modules = [ ./. ]; inherit unstable stable2009; };
|
||||
};
|
||||
|
|
|
@ -28,11 +28,7 @@ builtins.mapAttrs
|
|||
modules = modules ++ [
|
||||
(./. + "/${n}/configuration.nix")
|
||||
(hardwareModule v.hardware)
|
||||
({ ... }: {
|
||||
networking.hostName = n;
|
||||
sconfig.flakes.enable = true;
|
||||
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
|
||||
})
|
||||
({ ... }: { networking.hostName = n; })
|
||||
];
|
||||
}
|
||||
)
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
nix = {
|
||||
daemonNiceLevel = 19;
|
||||
daemonIONiceLevel = 7;
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
hardware = {
|
||||
|
|
|
@ -8,6 +8,10 @@ let
|
|||
"-git-assume-unchanged-size 0"
|
||||
];
|
||||
|
||||
update-cmds = map
|
||||
(x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake github:buckley310/nixos-config"))
|
||||
[ "switch" "build" "boot" ];
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -65,7 +69,7 @@ in
|
|||
echo "$(curl --silent -L ${config.system.defaultChannel}/git-revision) latest available"
|
||||
echo
|
||||
'')
|
||||
];
|
||||
] ++ update-cmds;
|
||||
|
||||
environment.etc."pip.conf".text = ''
|
||||
[install]
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.sconfig.flakes;
|
||||
in
|
||||
{
|
||||
options.sconfig.flakes = {
|
||||
enable = lib.mkEnableOption "Enable Flakes";
|
||||
rebuildPath = lib.mkOption {
|
||||
default = "/etc/nixos";
|
||||
type = lib.types.str;
|
||||
description = "Flake to use when running nixos-rebuild helper scripts";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nix.package = pkgs.nixFlakes;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
environment.systemPackages = map
|
||||
(x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake ${cfg.rebuildPath}"))
|
||||
[ "switch" "build" "boot" ];
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue