feature/restructure-core-profile #109

Merged
hensoko merged 2 commits from refs/pull/109/head into main 2022-08-13 20:35:47 +00:00
8 changed files with 66 additions and 59 deletions
Showing only changes of commit 4c7557497f - Show all commits

View file

@ -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 { };
}
;
};
}

View file

@ -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" ];
};
}

View file

@ -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
View 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
View 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
View 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;
}

View file

@ -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" ];
};
}

View file

@ -0,0 +1,5 @@
{ self, config, lib, pkgs, inputs, ... }:
{
nix.package = inputs.nix-dram.packages.${pkgs.system}.nix-dram;
}