Move common into flake.nix (working this time)
This commit is contained in:
parent
7e397ba226
commit
4852bfe01b
34
common.nix
34
common.nix
|
@ -1,34 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
|
||||||
in {
|
|
||||||
imports = [(import "${home-manager}/nixos")];
|
|
||||||
nix = {
|
|
||||||
settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
extraOptions = ''
|
|
||||||
keep-outputs = true
|
|
||||||
keep-derivations = true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
system.autoUpgrade.enable = lib.mkDefault false;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
};
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
services.power-profiles-daemon.enable = true;
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
programs = {
|
|
||||||
ssh.startAgent = true;
|
|
||||||
dconf.enable = true;
|
|
||||||
fish.enable = true;
|
|
||||||
zsh.enable = true;
|
|
||||||
};
|
|
||||||
fonts.fontconfig.enable = true;
|
|
||||||
environment.localBinInPath = true;
|
|
||||||
}
|
|
35
flake.nix
35
flake.nix
|
@ -14,6 +14,37 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
}: let
|
}: let
|
||||||
|
common = {lib, ...}: {
|
||||||
|
nix = {
|
||||||
|
settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
extraOptions = ''
|
||||||
|
keep-outputs = true
|
||||||
|
keep-derivations = true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
system.autoUpgrade.enable = lib.mkDefault false;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = false;
|
||||||
|
};
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
virtualisation.podman.enable = true;
|
||||||
|
programs = {
|
||||||
|
ssh.startAgent = true;
|
||||||
|
dconf.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
environment.localBinInPath = true;
|
||||||
|
};
|
||||||
hardware-audio = {pkgs, ...}: {
|
hardware-audio = {pkgs, ...}: {
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
@ -39,8 +70,8 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
common
|
||||||
./hosts/Legion/configuration.nix
|
./hosts/Legion/configuration.nix
|
||||||
./common.nix
|
|
||||||
./services/Legion.nix
|
./services/Legion.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -48,10 +79,10 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
common
|
||||||
hardware-audio
|
hardware-audio
|
||||||
hardware-bluetooth
|
hardware-bluetooth
|
||||||
./hosts/N0245/configuration.nix
|
./hosts/N0245/configuration.nix
|
||||||
./common.nix
|
|
||||||
./wm/sway.nix
|
./wm/sway.nix
|
||||||
./services/syncthing/N0245.nix
|
./services/syncthing/N0245.nix
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue