move things out of default.nix
This commit is contained in:
parent
6ab050e11f
commit
88384c52dd
4 changed files with 61 additions and 52 deletions
50
default.nix
50
default.nix
|
|
@ -13,49 +13,6 @@ in {
|
||||||
]
|
]
|
||||||
++ (mapModulesRec' (toString ./modules) import);
|
++ (mapModulesRec' (toString ./modules) import);
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
NIXPKGS_ALLOW_UNFREE = "1";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nixVersions.latest;
|
|
||||||
|
|
||||||
# flake registry and nix path pinning
|
|
||||||
# might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f
|
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
keep-outputs = true;
|
|
||||||
keep-derivations = true;
|
|
||||||
substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://nixpkgs-wayland.cachix.org"
|
|
||||||
"https://wezterm.cachix.org"
|
|
||||||
"https://niri.cachix.org"
|
|
||||||
"https://cache.soopy.moe"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
||||||
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
|
|
||||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
|
||||||
"cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
optimise.automatic = true;
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.nix-ld.enable = mkDefault true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||||
hm.home.stateVersion = config.system.stateVersion;
|
hm.home.stateVersion = config.system.stateVersion;
|
||||||
|
|
@ -96,13 +53,6 @@ in {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
openssh mosh
|
openssh mosh
|
||||||
unrar unzip
|
|
||||||
micro
|
|
||||||
curl wget
|
|
||||||
desktop-file-utils
|
|
||||||
shared-mime-info
|
|
||||||
xdg-user-dirs
|
|
||||||
xdg-utils
|
|
||||||
git
|
git
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
hm.home.packages = with pkgs; [
|
hm.home.packages = with pkgs; [
|
||||||
# archives
|
# archives
|
||||||
zip xz unzip p7zip zstd
|
zip xz unrar unzip p7zip zstd
|
||||||
# utils
|
# utils
|
||||||
ffmpeg ripgrep ripgrep-all jq libqalculate imagemagick pandoc
|
ffmpeg ripgrep ripgrep-all jq libqalculate imagemagick pandoc
|
||||||
# dev
|
# dev
|
||||||
|
|
|
||||||
55
modules/nix.nix
Normal file
55
modules/nix.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{ lib, pkgs, inputs, config, ... }:
|
||||||
|
{
|
||||||
|
environment.variables = {
|
||||||
|
NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.flake.setNixPath = true;
|
||||||
|
nixpkgs.flake.setFlakeRegistry = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
auto-optimise-store = true;
|
||||||
|
|
||||||
|
keep-outputs = true;
|
||||||
|
keep-derivations = true;
|
||||||
|
|
||||||
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nixpkgs-wayland.cachix.org"
|
||||||
|
"https://wezterm.cachix.org"
|
||||||
|
"https://niri.cachix.org"
|
||||||
|
"https://cache.soopy.moe"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||||
|
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
|
||||||
|
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||||
|
"cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.optimise.automatic = true;
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 14d";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
|
# compat w/ non-nix programs
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.appimage = {
|
||||||
|
enable = true;
|
||||||
|
binfmt = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
hm.xdg.enable = true;
|
hm.xdg.enable = true;
|
||||||
|
|
@ -19,5 +19,9 @@
|
||||||
screenshots = "${pictures}/screenshots";
|
screenshots = "${pictures}/screenshots";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xdg-utils
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue