Compare commits
5 commits
39668bdcf4
...
c3c5306746
Author | SHA1 | Date | |
---|---|---|---|
|
c3c5306746 | ||
|
09a572827b | ||
|
0db0aec549 | ||
|
4ed8c99679 | ||
|
ec1d61a902 |
|
@ -1,5 +1,7 @@
|
||||||
# saturnOS
|
# saturnOS
|
||||||
|
|
||||||
|
NOTE: This repository is now a meta-repository to track builds of the OS and meta-issue with the OS and project, not relevant to any part of the system individually, the rest of the README will be updated occordingly soon
|
||||||
|
|
||||||
ok so there's been way too many failed OS concepts that have tried to be convergent, i could list some of them but i'm sure you all know of examples . the biggest problem as i see it is they try to use the same app for all platforms and that's not only too much stress on the dev it's also just gonna always be a worse output, plus this is nearly imossible to scale to vr/ar where the idea of a flat window is an ugly holdover from the 2d ancestors it comes from .
|
ok so there's been way too many failed OS concepts that have tried to be convergent, i could list some of them but i'm sure you all know of examples . the biggest problem as i see it is they try to use the same app for all platforms and that's not only too much stress on the dev it's also just gonna always be a worse output, plus this is nearly imossible to scale to vr/ar where the idea of a flat window is an ugly holdover from the 2d ancestors it comes from .
|
||||||
|
|
||||||
so what's the solution ? breaking apps apart into component pieces, and swapping them out at runtime .
|
so what's the solution ? breaking apps apart into component pieces, and swapping them out at runtime .
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# symlinkg this file to your /etc/nixos/ and make sure the directory is correct !
|
|
||||||
{...}:
|
|
||||||
{
|
|
||||||
imports = [ /home/hive/.saturn ];
|
|
||||||
}
|
|
123
default.nix
123
default.nix
|
@ -1,123 +0,0 @@
|
||||||
# welcome to saturnOS config, run nixos-help if you need it .
|
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
projectRoot = builtins.toString ./.;
|
|
||||||
unstableTarball = builtins.fetchTarball
|
|
||||||
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
|
|
||||||
homeManagerTarball = builtins.fetchTarball
|
|
||||||
"https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
|
||||||
homeManager = import "${homeManagerTarball}/nixos";
|
|
||||||
deviceConf = import "${projectRoot}/hosts/${sysConf.host}/";
|
|
||||||
userDir = "${projectRoot}/users/${sysConf.user}/";
|
|
||||||
userConf = import userDir;
|
|
||||||
unstable = import unstableTarball config.nixpkgs.config;
|
|
||||||
sysConf = import ./saturn/system.nix;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
homeManager
|
|
||||||
deviceConf
|
|
||||||
userConf
|
|
||||||
./modules
|
|
||||||
];
|
|
||||||
|
|
||||||
# import system.nix configuration
|
|
||||||
saturn.hostname = sysConf.host;
|
|
||||||
saturn.prettyHostname = sysConf.prettyHost;
|
|
||||||
|
|
||||||
# nix options
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# cleanup packages older than 30 days from nix store
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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;
|
|
||||||
networking.hosts = {
|
|
||||||
"162.255.119.254" = ["www.librepunk.club"];
|
|
||||||
"129.21.49.69" = ["www.librepunk.club"];
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure locale
|
|
||||||
time.timeZone = "Etc/UTC";
|
|
||||||
i18n.defaultLocale = "en_CA.UTF-8";
|
|
||||||
|
|
||||||
# enable gnome
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
|
|
||||||
# configure x11 keymap
|
|
||||||
services.xserver = {
|
|
||||||
layout = "us";
|
|
||||||
xkbVariant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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;
|
|
||||||
};
|
|
||||||
|
|
||||||
# add and configure users
|
|
||||||
users.users.${sysConf.user} = {
|
|
||||||
initialPassword = "";
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "${sysConf.user}";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# import home-manager config from home.nix
|
|
||||||
home-manager.users.${sysConf.user} = import "${userDir}/home.nix" sysConf;
|
|
||||||
|
|
||||||
# install packages
|
|
||||||
# `nix search` to add more
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
pass
|
|
||||||
git
|
|
||||||
neovim
|
|
||||||
];
|
|
||||||
|
|
||||||
# set fish as default shell for all users
|
|
||||||
users.defaultUserShell = unstable.fish;
|
|
||||||
|
|
||||||
# suid wrapper ( for things which need privelidged acccess, or additional configuration )
|
|
||||||
programs.mtr.enable = true;
|
|
||||||
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
|
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
# an non-existant host for testing purposes
|
|
||||||
{...}:{}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/vda2";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{ device = "/dev/vda1";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
services.spice-vdagentd.enable = true;
|
|
||||||
services.spice-webdavd.enable = true;
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./luks.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.gamemode = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
renice = 10;
|
|
||||||
};
|
|
||||||
# Warning: GPU optimisations have the potential to damage hardware
|
|
||||||
gpu = {
|
|
||||||
apply_gpu_optimisations = "accept-responsibility";
|
|
||||||
gpu_device = 0;
|
|
||||||
amd_performance_level = "high";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.power-profiles-daemon.enable = false;
|
|
||||||
services.tlp = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
START_CHARGE_THRESH_BAT0 = 75;
|
|
||||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/39ab92ec-67bb-49ef-b458-90d43b63d1c6";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-8dd98ede-339f-470d-97f9-92dd2d6687f7".device = "/dev/disk/by-uuid/8dd98ede-339f-470d-97f9-92dd2d6687f7";
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{ device = "/dev/disk/by-uuid/50A2-D8BD";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/825ae105-4f03-44a0-81c6-0da642d0c77d"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
# Setup keyfile
|
|
||||||
boot.initrd.secrets = {
|
|
||||||
"/crypto_keyfile.bin" = null;
|
|
||||||
};
|
|
||||||
# Enable swap on luks
|
|
||||||
boot.initrd.luks.devices."luks-55171762-776c-4297-a762-1a570618a78a".device = "/dev/disk/by-uuid/55171762-776c-4297-a762-1a570618a78a";
|
|
||||||
boot.initrd.luks.devices."luks-55171762-776c-4297-a762-1a570618a78a".keyFile = "/crypto_keyfile.bin";
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.gamemode = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
renice = 10;
|
|
||||||
};
|
|
||||||
# Warning: GPU optimisations have the potential to damage hardware
|
|
||||||
gpu = {
|
|
||||||
apply_gpu_optimisations = "accept-responsibility";
|
|
||||||
gpu_device = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_pci_sdmmc" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" "wl" ];
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/bdad9443-41e0-4a8f-b5b3-a93f51dc3a2a";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-1e816279-2666-41a6-bcb9-f97c2f7b3102".device = "/dev/disk/by-uuid/1e816279-2666-41a6-bcb9-f97c2f7b3102";
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{ device = "/dev/disk/by-uuid/993B-1245";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp0s20u3.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./luks.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/f1a894aa-8e45-426b-b3ab-e4da09f5995f";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-f8bdd267-e062-42e4-813f-4f2acc51b335".device = "/dev/disk/by-uuid/f8bdd267-e062-42e4-813f-4f2acc51b335";
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
|
||||||
{ device = "/dev/disk/by-uuid/BD84-95A7";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/4d479659-d73d-4d60-9258-870d7a16662f"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp0s12f0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
# init keyfile
|
|
||||||
boot.initrd.secrets = {
|
|
||||||
"/crypto_keyfile.bin" = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable swap on luks
|
|
||||||
boot.initrd.luks.devices."luks-4130c26c-7546-42e9-9d61-8f112e244460".device =
|
|
||||||
"/dev/disk/by-uuid/4130c26c-7546-42e9-9d61-8f112e244460";
|
|
||||||
boot.initrd.luks.devices."luks-4130c26c-7546-42e9-9d61-8f112e244460".keyFile =
|
|
||||||
"/crypto_keyfile.bin";
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
# link this into the dependencies/nix-mobile directory :
|
|
||||||
# ln -rs local.nix dependencies/mobile-nixos/local.nix
|
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./default.nix ];
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./saturnConfig.nix
|
|
||||||
./machineInfo.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,119 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }@nixpkgs: with lib; {
|
|
||||||
options.environment.machineInfo = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
Machine metadata, including stylized hostname, computer icon, etc.
|
|
||||||
|
|
||||||
This module controls the options written to `/etc/machine-info`. For more
|
|
||||||
information, see [the freedesktop documentation][1].
|
|
||||||
|
|
||||||
[1]: https://www.freedesktop.org/software/systemd/man/machine-info.html
|
|
||||||
'';
|
|
||||||
default = {};
|
|
||||||
type = types.submodule { options = {
|
|
||||||
|
|
||||||
prettyHostname = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
A pretty, human-readable hostname for this machine, potentially including
|
|
||||||
spaces, unicode, and emoji. If unset, this falls back to the network hostname
|
|
||||||
set in `networking.hostName`.
|
|
||||||
'';
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
defaultText = literalExpression "null";
|
|
||||||
example = literalExpression "\"Jade's Laptop 💎\"";
|
|
||||||
};
|
|
||||||
|
|
||||||
iconName = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
An XDG icon which should be associated with this machine. Some common choices
|
|
||||||
include: `"computer"`, `"phone"`, but a complete list of icons can be found in
|
|
||||||
the [XDG Icon Naming Spec][1].
|
|
||||||
|
|
||||||
If left unset, applications will typically default to `"computer"`.
|
|
||||||
|
|
||||||
[1]: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
|
|
||||||
'';
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
defaultText = literalExpression "null";
|
|
||||||
example = literalExpression "\"computer\"";
|
|
||||||
};
|
|
||||||
|
|
||||||
chassis = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
The type of chassis this machine resides within. This is typically detected
|
|
||||||
automatically, but can be manually overridden here.
|
|
||||||
'';
|
|
||||||
type = with types; nullOr (enum [
|
|
||||||
"desktop"
|
|
||||||
"laptop"
|
|
||||||
"convertible"
|
|
||||||
"server"
|
|
||||||
"tablet"
|
|
||||||
"handset"
|
|
||||||
"watch"
|
|
||||||
"embedded"
|
|
||||||
"vm"
|
|
||||||
"container"
|
|
||||||
]);
|
|
||||||
default = null;
|
|
||||||
defaultText = literalExpression "null";
|
|
||||||
example = literalExpression "\"server\"";
|
|
||||||
};
|
|
||||||
|
|
||||||
deployment = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
If this machine is part of a deployment environment / pipeline, this option can
|
|
||||||
be used to specify what environment/pipeline stage it manages.
|
|
||||||
|
|
||||||
Typically, but not necessarily, set to something like `"development"`,
|
|
||||||
`"integration"`, `"staging"`, or `"production"`.
|
|
||||||
'';
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
defaultText = literalExpression "null";
|
|
||||||
example = literalExpression "\"production\"";
|
|
||||||
};
|
|
||||||
|
|
||||||
location = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
A human-readable short description of the location of this machine.
|
|
||||||
|
|
||||||
This can be set to whatever has the most meaning for you, for example "Living
|
|
||||||
Room", "Left Rack, 2nd Shelf", or "Parishville, NY".
|
|
||||||
'';
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
defaultText = literalExpression "null";
|
|
||||||
example = literalExpression "\"Bedroom\"";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraOptions = mkOption {
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
Extra variables to put in `/etc/machine-info`
|
|
||||||
'';
|
|
||||||
type = with types; attrsOf str;
|
|
||||||
default = {};
|
|
||||||
defaultText = literalExpression "{ }";
|
|
||||||
example = literalExpression "{ HARDWARE_VENDOR = \"Intel Corp.\" }";
|
|
||||||
};
|
|
||||||
|
|
||||||
};};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.environment.etc.machine-info =
|
|
||||||
with config.environment.machineInfo;
|
|
||||||
let
|
|
||||||
rawShellVars = {
|
|
||||||
PRETTY_HOSTNAME = prettyHostname;
|
|
||||||
ICON_NAME = iconName;
|
|
||||||
CHASSIS = chassis;
|
|
||||||
DEPLOYMENT = deployment;
|
|
||||||
LOCATION = location;
|
|
||||||
} // extraOptions;
|
|
||||||
nonNullShellVars = attrsets.filterAttrs (k: v: v != null) rawShellVars;
|
|
||||||
in rec {
|
|
||||||
text = strings.toShellVars nonNullShellVars;
|
|
||||||
enable = builtins.stringLength text > 0;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
{ config, lib, ... }: with lib;
|
|
||||||
{
|
|
||||||
options.saturn = {
|
|
||||||
user = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "saturn";
|
|
||||||
description = mdDoc "The name of the user of the system.";
|
|
||||||
};
|
|
||||||
hostname = mkOption {
|
|
||||||
type = types.strMatching
|
|
||||||
"[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?";
|
|
||||||
default = "saturnOS-device";
|
|
||||||
description = mdDoc "The network hostname of the system, which must only contain letters,
|
|
||||||
numbers, and dashes, and cannot start or end with a dash.";
|
|
||||||
};
|
|
||||||
prettyHostname = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "🪐 saturnOS";
|
|
||||||
description = mdDoc "The pretty hostname is used for things like bluetooth pairing,
|
|
||||||
device sharing, and is fully unicode.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.networking.hostName = config.saturn.hostname;
|
|
||||||
config.environment.machineInfo.prettyHostname = config.saturn.prettyHostname;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
# copy this file to "system.nix" and configure it for your system !
|
|
||||||
{
|
|
||||||
user = "saturn";
|
|
||||||
host = "qemu";
|
|
||||||
prettyHost = "🪐 saturnOS";
|
|
||||||
# packages = {
|
|
||||||
# }
|
|
||||||
# userPackages = {
|
|
||||||
# }
|
|
||||||
}
|
|
|
@ -1,75 +0,0 @@
|
||||||
{ ... } :
|
|
||||||
# . + . . . . . .
|
|
||||||
# . . . *
|
|
||||||
# . * . . . . . . + .
|
|
||||||
# . . + . . .
|
|
||||||
# . . . . . . .
|
|
||||||
# . . . +. + .
|
|
||||||
# . . . .
|
|
||||||
# . . . * . . . . + .
|
|
||||||
# + . . . +
|
|
||||||
# . . + .+. .. *
|
|
||||||
# . 。 • ゚ 。 . +
|
|
||||||
# . . 。 。 . . . . .
|
|
||||||
# . 。 ඞ 。 . • . . + +
|
|
||||||
# ゚ Hive was an Impostor + .
|
|
||||||
# ' 2 Impostors remain + .+. •
|
|
||||||
# ゚ . . , . . , + .
|
|
||||||
# . . . + . . . + .+. .
|
|
||||||
# . . . . . . . . ! /
|
|
||||||
# * . . . + . . - O -
|
|
||||||
# . . . + . . * . . / |
|
|
||||||
# . + . . . .. + .
|
|
||||||
# . . . . * . * . +.. . *
|
|
||||||
# . . . . . . . . + . . +
|
|
||||||
{
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "hive";
|
|
||||||
configDir = "/home/hive/.config/syncthing";
|
|
||||||
overrideDevices = false;
|
|
||||||
overrideFolders = false;
|
|
||||||
devices = { "impostor" = {
|
|
||||||
id = "XBG44HU-OVOC6RN-4DHMDRH-WPL7OPW-XBYYOMK-DV5GGGA-LEP6HCJ-QVPMSAI";
|
|
||||||
introducer = true;
|
|
||||||
}; };
|
|
||||||
folders = {
|
|
||||||
"ssh" = {
|
|
||||||
id = "mkkgo-chqwk";
|
|
||||||
path = "~/.ssh";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
ignorePerms = false;
|
|
||||||
};
|
|
||||||
"decsync" = {
|
|
||||||
id = "20lk1-ims07";
|
|
||||||
path = "~/.local/share/decsync";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
"scripts" = {
|
|
||||||
id = "6nunu-quun5";
|
|
||||||
path = "~/.local/bin/scripts";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
"dotfiles" = {
|
|
||||||
id = "sjgew-vdpfl";
|
|
||||||
path = "~/.dotfiles";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
"password-store" = {
|
|
||||||
id = "tadwa-1va0d";
|
|
||||||
path = "~/.local/share/pass";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
"notes" = {
|
|
||||||
id = "y0a00-2ha8l";
|
|
||||||
path = "~/Notes";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
"documents" = {
|
|
||||||
id = "y7ecb-v9ds7";
|
|
||||||
path = "~/Documents";
|
|
||||||
devices = [ "impostor" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
# all my home stuff :3
|
|
||||||
sysConf: { config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
home.sessionVariables = {
|
|
||||||
# system configuration
|
|
||||||
EDITOR = "nvim";
|
|
||||||
|
|
||||||
# cleanup homedir
|
|
||||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
|
||||||
|
|
||||||
# fish config
|
|
||||||
fish_greeting = "✨️ heya ${sysConf.user}, welcome to ${sysConf.prettyHost} ~";
|
|
||||||
};
|
|
||||||
# installing my packages uvu
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
bat
|
|
||||||
diceware
|
|
||||||
pwgen
|
|
||||||
kitty
|
|
||||||
schildichat-desktop
|
|
||||||
dino
|
|
||||||
mangohud
|
|
||||||
termpdfpy
|
|
||||||
lollypop
|
|
||||||
skim
|
|
||||||
syncthing
|
|
||||||
armcord
|
|
||||||
ripgrep
|
|
||||||
tmate
|
|
||||||
btop
|
|
||||||
firefox
|
|
||||||
apostrophe
|
|
||||||
warp
|
|
||||||
syncplay
|
|
||||||
mpv
|
|
||||||
wl-clipboard
|
|
||||||
adw-gtk3
|
|
||||||
# some bullshit to get gnome apps to install withotu a prefix
|
|
||||||
] ++ (with pkgs.gnome; with pkgs.gnomeExtensions; [
|
|
||||||
gnome-tweaks
|
|
||||||
dconf-editor
|
|
||||||
night-theme-switcher
|
|
||||||
rounded-window-corners
|
|
||||||
appindicator
|
|
||||||
]);
|
|
||||||
|
|
||||||
# configure programs
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellAbbrs = {
|
|
||||||
nxs = "nix search nixpkgs";
|
|
||||||
nxr = "nix run nixpkgs#";
|
|
||||||
nxsh = "nix shell nixpkgs#";
|
|
||||||
e = "edit";
|
|
||||||
nxb = "sudo nixos-rebuild switch";
|
|
||||||
nxu = "sudo nixos-rebuild boot --upgrade";
|
|
||||||
nxc = "sudo nix-collect-garbage -d";
|
|
||||||
};
|
|
||||||
interactiveShellInit = ''
|
|
||||||
fish_add_path ~/.local/bin
|
|
||||||
fish_add_path ~/.local/bin/scripts
|
|
||||||
fish_add_path ~/.local/share/cargo/bin
|
|
||||||
fish_add_path /var/lib/flatpak/exports/bin
|
|
||||||
fish_vi_key_bindings
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
programs.password-store = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
|
||||||
settings = {
|
|
||||||
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/pass";
|
|
||||||
PASSWORD_STORE_CLIP_TIME = "60";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.browserpass.enable = true;
|
|
||||||
programs.gpg.enable = true;
|
|
||||||
|
|
||||||
# don't uh, change this or something might break lol idk
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
{ ... }: { }
|
|
|
@ -1,2 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{ }
|
|
Loading…
Reference in a new issue