re-factored the code to be easier to auto-generate ( haven't tested )

This commit is contained in:
Bit Borealis 2023-07-02 02:04:47 +00:00
parent ec1d61a902
commit 4ed8c99679
3 changed files with 106 additions and 0 deletions

59
saturnOS/default.nix Normal file
View File

@ -0,0 +1,59 @@
# welcome to saturnOS config, run nixos-help if you need it .
{ config, pkgs, lib, ... }:
let
~ = builtins.toString ./.;
in
{
imports = [
./modules
./system
];
# nix options
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
# enable gnome
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# enable dconf configuration for gnome and other supported applications
programs.dconf.enable = true;
# configure pipewire
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# install packages
# `nix search` to add more
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
];
# set fish as default shell for all users
users.defaultUserShell = pkgs.fish;
# suid wrapper ( for things which need privelidged acccess, or additional configuration )
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
programs.fish.enable = true;
# enable configure services
services.printing.enable = true; # printing
services.openssh.enable = true; # remote shell
services.flatpak.enable = true; #flatpak lol
}

View File

@ -0,0 +1,2 @@
# this is for options not managed bysaturnConfig, added by the user
# again this is an example template not meant to be used

View File

@ -0,0 +1,45 @@
#this is a template, but would be auto-generated by saturnConfig, when the system is first created and on later modification to the system options
# it is not reccomended to use this file, as it should be generated by the script only
{ config, pkgs, lib, ... }:
{
# importing custom user config
imports = [ custom.nix ];
# settings hostname
saturn.hostname = "saturnOS";
saturn.prettyHostname = "🪐 saturnOS";
# efi bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.initrd.systemd.enable = true;
boot.plymouth.enable = true;
boot.kernelParams = ["quiet"];
# configure networking
networking.networkmanager.enable = true;
# configure locale
time.timeZone = "Etc/UTC";
i18n.defaultLocale = "en_CA.UTF-8";
# configure x11 keymap
services.xserver = {
layout = "us";
xkbVariant = "";
};
# add and configure users
users.users.saturn = {
initialPassword = "";
isNormalUser = true;
description = "Saturn User";
extraGroups = [ "networkmanager" "wheel" ];
};
# import home-manager config from home.nix ( kept for legacy reasons )
# home-manager.users.${sysConf.user} = import "${userDir}/home.nix" sysConf;
system.stateVersion = "23.05";
}