Move most settings from core profile to x-os module
This commit is contained in:
parent
856f0452cf
commit
4c7557497f
|
@ -120,7 +120,7 @@
|
|||
suites = with profiles; rec {
|
||||
base = [ core users.pub-solar users.root ];
|
||||
iso = base ++ [ base-user graphical pub-solar-iso ];
|
||||
pubsolaros = [ core full-install base-user users.root ];
|
||||
pubsolaros = [ core dram full-install base-user users.root ];
|
||||
anonymous = [ pubsolaros users.pub-solar ];
|
||||
};
|
||||
};
|
||||
|
@ -145,6 +145,5 @@
|
|||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||
|
||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
||||
}
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -28,5 +28,11 @@ in
|
|||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# Use latest LTS linux kernel by default
|
||||
boot.kernelPackages = pkgs.linuxPackages_5_15;
|
||||
|
||||
# Support ntfs drives
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./i18n.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
||||
|
|
12
modules/x-os/fonts.nix
Normal file
12
modules/x-os/fonts.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
fonts = {
|
||||
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
|
||||
fontconfig.defaultFonts = {
|
||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||
sansSerif = [ "DejaVu Sans" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
25
modules/x-os/nix.nix
Normal file
25
modules/x-os/nix.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
# Improve nix store disk usage
|
||||
autoOptimiseStore = true;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
# Prevents impurities in builds
|
||||
useSandbox = true;
|
||||
# give root and @wheel special privileges with nix
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
# This is just a representation of the nix default
|
||||
systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
# Generally useful nix option defaults
|
||||
extraOptions = ''
|
||||
min-free = 536870912
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
fallback = true
|
||||
# used by nix-dram
|
||||
default-flake = flake:nixpkgs
|
||||
'';
|
||||
};
|
||||
}
|
13
modules/x-os/services.nix
Normal file
13
modules/x-os/services.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
# For rage encryption, all hosts need a ssh key pair
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = lib.mkDefault false;
|
||||
};
|
||||
|
||||
# Service that makes Out of Memory Killer more effective
|
||||
services.earlyoom.enable = true;
|
||||
}
|
|
@ -11,11 +11,7 @@ in
|
|||
pub-solar.crypto.enable = true;
|
||||
pub-solar.devops.enable = true;
|
||||
|
||||
# This is just a representation of the nix default
|
||||
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
|
||||
environment = {
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
# Core unix utility packages
|
||||
coreutils-full
|
||||
|
@ -75,57 +71,5 @@ in
|
|||
neofetch
|
||||
];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
|
||||
|
||||
fontconfig.defaultFonts = {
|
||||
|
||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||
|
||||
sansSerif = [ "DejaVu Sans" ];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
# use nix-dram, a patched nix command, see: https://github.com/dramforever/nix-dram
|
||||
package = inputs.nix-dram.packages.${pkgs.system}.nix-dram;
|
||||
|
||||
# Improve nix store disk usage
|
||||
autoOptimiseStore = true;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
|
||||
# Prevents impurities in builds
|
||||
useSandbox = true;
|
||||
|
||||
# give root and @wheel special privileges with nix
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
|
||||
# Generally useful nix option defaults
|
||||
extraOptions = ''
|
||||
min-free = 536870912
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
fallback = true
|
||||
# used by nix-dram
|
||||
default-flake = flake:nixpkgs
|
||||
'';
|
||||
};
|
||||
|
||||
# For rage encryption, all hosts need a ssh key pair
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = lib.mkDefault false;
|
||||
};
|
||||
|
||||
# Service that makes Out of Memory Killer more effective
|
||||
services.earlyoom.enable = true;
|
||||
|
||||
# Use latest LTS linux kernel by default
|
||||
boot.kernelPackages = pkgs.linuxPackages_5_15;
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
};
|
||||
}
|
||||
|
|
5
profiles/dram/default.nix
Normal file
5
profiles/dram/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ self, config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
nix.package = inputs.nix-dram.packages.${pkgs.system}.nix-dram;
|
||||
}
|
Loading…
Reference in a new issue