feature/restructure-core-profile (#109)

Co-authored-by: Hendrik Sokolowski <hensoko@gssws.de>
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/109
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
Reviewed-by: teutat3s <teutates@mailbox.org>
This commit is contained in:
hensoko 2022-08-13 20:35:43 +00:00
parent 524845a460
commit 18e9b4a009
9 changed files with 66 additions and 154 deletions

View file

@ -120,7 +120,7 @@
suites = with profiles; rec { suites = with profiles; rec {
base = [ core users.pub-solar users.root ]; base = [ core users.pub-solar users.root ];
iso = base ++ [ base-user graphical pub-solar-iso ]; 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 ]; anonymous = [ pubsolaros users.pub-solar ];
}; };
}; };
@ -145,6 +145,5 @@
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
} };
;
} }

View file

@ -28,5 +28,11 @@ in
}; };
boot.loader.systemd-boot.enable = true; 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 = [ imports = [
./boot.nix ./boot.nix
./fonts.nix
./i18n.nix ./i18n.nix
./networking.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.crypto.enable = true;
pub-solar.devops.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 = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
# Core unix utility packages # Core unix utility packages
coreutils-full coreutils-full
@ -75,57 +71,5 @@ in
neofetch 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

@ -1,95 +0,0 @@
[aws]
symbol = " "
[character]
success_symbol = "[](bold purple)"
vicmd_symbol = "[](bold purple)"
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[directory]
style = "cyan"
read_only = " 🔒"
[docker]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[git_branch]
format = "[$symbol$branch]($style) "
symbol = " "
style = "bold dimmed white"
[git_status]
format = '([「$all_status$ahead_behind」]($style) )'
conflicted = "⚠️"
ahead = "⟫${count} "
behind = "⟪${count}"
diverged = "🔀 "
untracked = "📁 "
stashed = "↪ "
modified = "𝚫 "
staged = "✔ "
renamed = "⇆ "
deleted = "✘ "
style = "bold bright-white"
[golang]
symbol = " "
[haskell]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[memory_usage]
symbol = " "
disabled = false
[nim]
symbol = " "
[nix_shell]
format = '[$symbol$state]($style) '
symbol = " "
pure_msg = "λ"
impure_msg = "⎔"
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
[status]
disabled = false

View file

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