clean up nix config
This commit is contained in:
parent
fe0b5710e6
commit
90b549f5a9
6 changed files with 37 additions and 37 deletions
|
@ -8,27 +8,6 @@
|
|||
, scripts
|
||||
}:
|
||||
let adapterModule = system: {
|
||||
nix.nixPath = [
|
||||
"home-manager=${home-manager}"
|
||||
"nixpkgs=${nixpkgs}"
|
||||
"dadada=${self}"
|
||||
];
|
||||
nix.registry = {
|
||||
home-manager.flake = home-manager;
|
||||
nixpkgs.flake = nixpkgs;
|
||||
dadada.flake = self;
|
||||
};
|
||||
nix.binaryCaches = [
|
||||
https://cache.nixos.org/
|
||||
https://nix-community.cachix.org/
|
||||
];
|
||||
nix.binaryCachePublicKeys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"gorgon:eEE/PToceRh34UnnoFENERhk89dGw5yXOpJ2CUbfL/Q="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
nix.requireSignedBinaryCaches = true;
|
||||
nix.useSandbox = true;
|
||||
nixpkgs.overlays = (nixpkgs.lib.attrValues self.overlays) ++ [
|
||||
(final: prev: { homePage = homePage.defaultPackage.${system}; })
|
||||
(final: prev: { s = scripts; })
|
||||
|
@ -68,12 +47,6 @@ in
|
|||
(adapterModule system)
|
||||
./modules/profiles/server.nix
|
||||
./surgat/configuration.nix
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = (nixpkgs.lib.attrValues self.hmModules);
|
||||
home-manager.users.dadada = import ../home/work;
|
||||
}
|
||||
];
|
||||
};
|
||||
pruflas = nixosSystem rec {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{ homePage
|
||||
, ...
|
||||
}@inputs:
|
||||
{ ... }@inputs:
|
||||
{
|
||||
admin = import ./admin.nix;
|
||||
backup = import ./backup.nix;
|
||||
|
@ -11,6 +9,7 @@
|
|||
headphones = import ./headphones.nix;
|
||||
homepage = import ./homepage.nix;
|
||||
networking = import ./networking.nix;
|
||||
nix = import ./nix.nix inputs;
|
||||
share = import ./share.nix;
|
||||
steam = import ./steam.nix;
|
||||
update = import ./update.nix;
|
||||
|
|
30
nixos/modules/nix.nix
Normal file
30
nixos/modules/nix.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ self
|
||||
, home-manager
|
||||
, nixpkgs
|
||||
, ...
|
||||
}:
|
||||
{ config, pkgs, lib, ... }:
|
||||
# Global settings for nix daemon
|
||||
{
|
||||
nix.nixPath = [
|
||||
"home-manager=${home-manager}"
|
||||
"nixpkgs=${nixpkgs}"
|
||||
"dadada=${self}"
|
||||
];
|
||||
nix.registry = {
|
||||
home-manager.flake = home-manager;
|
||||
nixpkgs.flake = nixpkgs;
|
||||
dadada.flake = self;
|
||||
};
|
||||
nix.binaryCaches = [
|
||||
https://cache.nixos.org/
|
||||
https://nix-community.cachix.org/
|
||||
];
|
||||
nix.binaryCachePublicKeys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"gorgon:eEE/PToceRh34UnnoFENERhk89dGw5yXOpJ2CUbfL/Q="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
nix.requireSignedBinaryCaches = true;
|
||||
nix.useSandbox = true;
|
||||
}
|
|
@ -7,7 +7,7 @@ with lib;
|
|||
"dadada" = [ "${pkgs.keys}/dadada.pub" ];
|
||||
};
|
||||
|
||||
dadada.autoUpgrade.enable = mkDefault false;
|
||||
dadada.autoUpgrade.enable = mkDefault true;
|
||||
|
||||
environment.noXlibs = mkDefault true;
|
||||
documentation.enable = mkDefault false;
|
||||
|
|
|
@ -11,18 +11,18 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
nix = {
|
||||
autoOptimiseStore = false;
|
||||
useSandbox = true;
|
||||
autoOptimiseStore = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 3d";
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
flake = "github:dadada/nix-config#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -120,7 +120,5 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
system.autoUpgrade.flake = "github:dadada/nix-config#${hostName}";
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue