rename config.{colinsane -> sane}
This commit is contained in:
parent
9dea707eea
commit
451816f623
|
@ -4,18 +4,18 @@
|
|||
./fs.nix
|
||||
];
|
||||
|
||||
colinsane.gui.sway.enable = true;
|
||||
colinsane.services.duplicity.enable = true;
|
||||
colinsane.impermanence.enable = true;
|
||||
sane.gui.sway.enable = true;
|
||||
sane.services.duplicity.enable = true;
|
||||
sane.impermanence.enable = true;
|
||||
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
# needed to use libimobiledevice/ifuse, for iphone sync
|
||||
services.usbmuxd.enable = true;
|
||||
users.users.usbmux.uid = config.colinsane.allocations.usbmux-uid;
|
||||
users.groups.usbmux.gid = config.colinsane.allocations.usbmux-gid;
|
||||
users.users.usbmux.uid = config.sane.allocations.usbmux-uid;
|
||||
users.groups.usbmux.gid = config.sane.allocations.usbmux-gid;
|
||||
|
||||
# default config: https://man.archlinux.org/man/snapper-configs.5
|
||||
# defaults to something like:
|
||||
|
@ -41,7 +41,7 @@
|
|||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
colinsane.impermanence.home-dirs = [
|
||||
sane.impermanence.home-dirs = [
|
||||
".steam"
|
||||
".local/share/Steam"
|
||||
];
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
./fs.nix
|
||||
];
|
||||
|
||||
colinsane.users.guest.enable = true;
|
||||
colinsane.gui.sway.enable = true;
|
||||
colinsane.impermanence.enable = true;
|
||||
sane.users.guest.enable = true;
|
||||
sane.gui.sway.enable = true;
|
||||
sane.impermanence.enable = true;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
# default config: https://man.archlinux.org/man/snapper-configs.5
|
||||
# defaults to something like:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# XXX colin: phosh doesn't work well with passwordless login
|
||||
users.users.colin.initialPassword = "147147";
|
||||
|
||||
colinsane.home-manager.extraPackages = [
|
||||
sane.home-manager.extraPackages = [
|
||||
# for web browsers see: https://forum.pine64.org/showthread.php?tid=13669
|
||||
pkgs.angelfish # plasma mobile web browser; broken on phosh (poor wayland support)
|
||||
# pkgs.plasma5Packages.index # file browser
|
||||
|
@ -32,8 +32,8 @@
|
|||
# pkgs.alacritty # terminal; crashes phosh
|
||||
];
|
||||
|
||||
colinsane.nixcache.enable = true;
|
||||
colinsane.gui.phosh.enable = true;
|
||||
sane.nixcache.enable = true;
|
||||
sane.gui.phosh.enable = true;
|
||||
boot.loader.grub.enable = false;
|
||||
mobile.bootloader.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
@ -56,13 +56,13 @@
|
|||
hardware.sensor.iio.enable = true;
|
||||
|
||||
# TODO: this probably lives in the wrong spot (are these groups created by phosh?)
|
||||
users.users.avahi.uid = config.colinsane.allocations.avahi-uid;
|
||||
users.users.colord.uid = config.colinsane.allocations.colord-uid;
|
||||
users.users.geoclue.uid = config.colinsane.allocations.geoclue-uid;
|
||||
users.users.rtkit.uid = config.colinsane.allocations.rtkit-uid;
|
||||
users.groups.avahi.gid = config.colinsane.allocations.avahi-gid;
|
||||
users.groups.colord.gid = config.colinsane.allocations.colord-gid;
|
||||
users.groups.geoclue.gid = config.colinsane.allocations.geoclue-gid;
|
||||
users.groups.rtkit.gid = config.colinsane.allocations.rtkit-gid;
|
||||
users.groups.feedbackd.gid = config.colinsane.allocations.feedbackd-gid;
|
||||
users.users.avahi.uid = config.sane.allocations.avahi-uid;
|
||||
users.users.colord.uid = config.sane.allocations.colord-uid;
|
||||
users.users.geoclue.uid = config.sane.allocations.geoclue-uid;
|
||||
users.users.rtkit.uid = config.sane.allocations.rtkit-uid;
|
||||
users.groups.avahi.gid = config.sane.allocations.avahi-gid;
|
||||
users.groups.colord.gid = config.sane.allocations.colord-gid;
|
||||
users.groups.geoclue.gid = config.sane.allocations.geoclue-gid;
|
||||
users.groups.rtkit.gid = config.sane.allocations.rtkit-gid;
|
||||
users.groups.feedbackd.gid = config.sane.allocations.feedbackd-gid;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{
|
||||
# we need space in the GPT header to place tow-boot.
|
||||
# only actually need 1 MB, but better to over-allocate than under-allocate
|
||||
colinsane.image.extraGPTPadding = 16 * 1024 * 1024;
|
||||
colinsane.image.firstPartGap = 0;
|
||||
sane.image.extraGPTPadding = 16 * 1024 * 1024;
|
||||
sane.image.firstPartGap = 0;
|
||||
system.build.img = pkgs.runCommandNoCC "nixos_full-disk-image.img" {} ''
|
||||
cp -v ${config.system.build.img-without-firmware}/nixos.img $out
|
||||
chmod +w $out
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
users.users.dhcpcd.uid = config.colinsane.allocations.dhcpcd-uid;
|
||||
users.groups.dhcpcd.gid = config.colinsane.allocations.dhcpcd-gid;
|
||||
users.users.dhcpcd.uid = config.sane.allocations.dhcpcd-uid;
|
||||
users.groups.dhcpcd.gid = config.sane.allocations.dhcpcd-gid;
|
||||
|
||||
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
|
||||
system.stateVersion = "21.05";
|
||||
|
|
|
@ -20,18 +20,18 @@
|
|||
./services/transmission.nix
|
||||
];
|
||||
|
||||
colinsane.home-manager.enable = true;
|
||||
colinsane.home-manager.extraPackages = [
|
||||
sane.home-manager.enable = true;
|
||||
sane.home-manager.extraPackages = [
|
||||
pkgs.matrix-synapse
|
||||
];
|
||||
colinsane.impermanence.enable = true;
|
||||
colinsane.services.duplicity.enable = true;
|
||||
sane.impermanence.enable = true;
|
||||
sane.services.duplicity.enable = true;
|
||||
|
||||
# TODO: validate this
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
colinsane.image.extraBootFiles = [ pkgs.bootpart-u-boot-rpi-aarch64 ];
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-u-boot-rpi-aarch64 ];
|
||||
|
||||
sops.secrets.duplicity_passphrase = {
|
||||
sopsFile = ../../secrets/servo.yaml;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? could be more granular
|
||||
{ user = "git"; group = "gitea"; directory = "/var/lib/gitea"; }
|
||||
];
|
||||
users.groups.gitea.gid = config.colinsane.allocations.gitea-gid;
|
||||
users.groups.gitea.gid = config.sane.allocations.gitea-gid;
|
||||
services.gitea.enable = true;
|
||||
services.gitea.user = "git"; # default is 'gitea'
|
||||
services.gitea.database.type = "postgres";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? could be more granular
|
||||
{ user = "261"; group = "261"; directory = "/var/lib/ipfs"; }
|
||||
];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? we only need this to save Indexer creds ==> migrate to config?
|
||||
{ user = "root"; group = "root"; directory = "/var/lib/jackett"; }
|
||||
];
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? could be more granular
|
||||
{ user = "jellyfin"; group = "jellyfin"; directory = "/var/lib/jellyfin"; }
|
||||
];
|
||||
users.users.jellyfin.uid = config.colinsane.allocations.jellyfin-uid;
|
||||
users.groups.jellyfin.gid = config.colinsane.allocations.jellyfin-gid;
|
||||
users.users.jellyfin.uid = config.sane.allocations.jellyfin-uid;
|
||||
users.groups.jellyfin.gid = config.sane.allocations.jellyfin-gid;
|
||||
services.jellyfin.enable = true;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode?
|
||||
# user and group are both "matrix-appservice-irc"
|
||||
{ user = "993"; group = "992"; directory = "/var/lib/matrix-appservice-irc"; }
|
||||
|
|
|
@ -255,9 +255,9 @@
|
|||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "admin.acme@uninsane.org";
|
||||
|
||||
users.users.acme.uid = config.colinsane.allocations.acme-uid;
|
||||
users.groups.acme.gid = config.colinsane.allocations.acme-gid;
|
||||
colinsane.impermanence.service-dirs = [
|
||||
users.users.acme.uid = config.sane.allocations.acme-uid;
|
||||
users.groups.acme.gid = config.sane.allocations.acme-gid;
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode?
|
||||
{ user = "acme"; group = "acme"; directory = "/var/lib/acme"; }
|
||||
{ user = "colin"; group = "users"; directory = "/var/lib/uninsane"; }
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? could be more granular
|
||||
{ user = "pleroma"; group = "pleroma"; directory = "/var/lib/pleroma"; }
|
||||
];
|
||||
users.users.pleroma.uid = config.colinsane.allocations.pleroma-uid;
|
||||
users.groups.pleroma.gid = config.colinsane.allocations.pleroma-gid;
|
||||
users.users.pleroma.uid = config.sane.allocations.pleroma-uid;
|
||||
users.groups.pleroma.gid = config.sane.allocations.pleroma-gid;
|
||||
services.pleroma.enable = true;
|
||||
services.pleroma.secretConfigFile = config.sops.secrets.pleroma_secrets.path;
|
||||
services.pleroma.configs = [
|
||||
|
|
|
@ -16,7 +16,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? could be more granular
|
||||
{ user = "221"; group = "221"; directory = "/var/lib/opendkim"; }
|
||||
{ user = "root"; group = "root"; directory = "/var/lib/postfix"; }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode?
|
||||
{ user = "71"; group = "71"; directory = "/var/lib/postgresql"; }
|
||||
];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
colinsane.impermanence.service-dirs = [
|
||||
sane.impermanence.service-dirs = [
|
||||
# TODO: mode? we need this specifically for the stats tracking in .config/
|
||||
{ user = "70"; group = "70"; directory = "/var/lib/transmission"; }
|
||||
];
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
home = "/var/lib/gitea";
|
||||
useDefaultShell = true;
|
||||
group = "gitea";
|
||||
uid = config.colinsane.allocations.git-uid;
|
||||
uid = config.sane.allocations.git-uid;
|
||||
isSystemUser = true;
|
||||
# sendmail access (not 100% sure if this is necessary)
|
||||
extraGroups = [ "postdrop" ];
|
||||
|
@ -22,6 +22,6 @@
|
|||
# raw `sendmail` works, but i think pleroma's passing it some funny flags or something, idk.
|
||||
# hack to fix that.
|
||||
users.users.pleroma.extraGroups = [ "postdrop" ];
|
||||
users.users.dhcpcd.uid = config.colinsane.allocations.dhcpcd-uid;
|
||||
users.groups.dhcpcd.gid = config.colinsane.allocations.dhcpcd-gid;
|
||||
users.users.dhcpcd.uid = config.sane.allocations.dhcpcd-uid;
|
||||
users.groups.dhcpcd.gid = config.sane.allocations.dhcpcd-gid;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.gui;
|
||||
cfg = config.sane.gui;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -14,15 +14,15 @@ in
|
|||
|
||||
options = {
|
||||
# doesn't directly create outputs. consumed by e.g. home-manager.nix module
|
||||
colinsane.gui.enable = mkOption {
|
||||
sane.gui.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
colinsane.home-manager.enable = true;
|
||||
sane.home-manager.enable = true;
|
||||
# all GUIs use network manager?
|
||||
users.users.nm-iodine.uid = config.colinsane.allocations.nm-iodine-uid;
|
||||
users.users.nm-iodine.uid = config.sane.allocations.nm-iodine-uid;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.gui.gnome;
|
||||
cfg = config.sane.gui.gnome;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.gui.gnome.enable = mkOption {
|
||||
sane.gui.gnome.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
colinsane.gui.enable = true;
|
||||
sane.gui.enable = true;
|
||||
# start gnome/gdm on boot
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.gui.phosh;
|
||||
cfg = config.sane.gui.phosh;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.gui.phosh.enable = mkOption {
|
||||
sane.gui.phosh.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
colinsane.gui.enable = true;
|
||||
sane.gui.enable = true;
|
||||
# docs: https://github.com/NixOS/nixpkgs/blob/nixos-22.05/nixos/modules/services/x11/desktop-managers/phosh.nix
|
||||
services.xserver.desktopManager.phosh = {
|
||||
enable = true;
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.gui.plasma-mobile;
|
||||
cfg = config.sane.gui.plasma-mobile;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.gui.plasma-mobile.enable = mkOption {
|
||||
sane.gui.plasma-mobile.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
colinsane.gui.enable = true;
|
||||
sane.gui.enable = true;
|
||||
# start plasma-mobile on boot
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.plasma5.mobile.enable = true;
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
# docs: https://nixos.wiki/wiki/Sway
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.gui.sway;
|
||||
cfg = config.sane.gui.sway;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.gui.sway.enable = mkOption {
|
||||
sane.gui.sway.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
colinsane.gui.enable = true;
|
||||
users.users.greeter.uid = config.colinsane.allocations.greeter-uid;
|
||||
users.groups.greeter.gid = config.colinsane.allocations.greeter-gid;
|
||||
sane.gui.enable = true;
|
||||
users.users.greeter.uid = config.sane.allocations.greeter-uid;
|
||||
users.groups.greeter.gid = config.sane.allocations.greeter-gid;
|
||||
programs.sway = {
|
||||
# we configure sway with home-manager, but this enable gets us e.g. opengl and fonts
|
||||
enable = true;
|
||||
|
@ -49,7 +49,7 @@ in
|
|||
networking.networkmanager.enable = true;
|
||||
networking.wireless.enable = lib.mkForce false;
|
||||
|
||||
colinsane.home-manager.windowManager.sway = {
|
||||
sane.home-manager.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = rec {
|
||||
|
@ -208,7 +208,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
colinsane.home-manager.programs.waybar = {
|
||||
sane.home-manager.programs.waybar = {
|
||||
enable = true;
|
||||
# docs: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||
settings = {
|
||||
|
@ -545,7 +545,7 @@ in
|
|||
# }
|
||||
# '';
|
||||
};
|
||||
colinsane.home-manager.extraPackages = with pkgs; [
|
||||
sane.home-manager.extraPackages = with pkgs; [
|
||||
swaylock
|
||||
swayidle
|
||||
wl-clipboard
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.image;
|
||||
cfg = config.sane.image;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.image.extraBootFiles = mkOption {
|
||||
sane.image.extraBootFiles = mkOption {
|
||||
default = [];
|
||||
type = types.listOf types.package;
|
||||
};
|
||||
colinsane.image.extraGPTPadding = mkOption {
|
||||
sane.image.extraGPTPadding = mkOption {
|
||||
default = 0;
|
||||
# NB: rpi doesn't like non-zero values for this.
|
||||
# at the same time, spinning disks REALLY need partitions to be aligned to 4KiB boundaries.
|
||||
|
@ -18,7 +18,7 @@ in
|
|||
# default = 2014 * 512; # standard is to start part0 at sector 2048 (versus 34 if no padding)
|
||||
type = types.int;
|
||||
};
|
||||
colinsane.image.firstPartGap = mkOption {
|
||||
sane.image.firstPartGap = mkOption {
|
||||
# align the first part to 16 MiB.
|
||||
# do this by inserting a gap of 16 MiB - gptHeaderSize
|
||||
# and then multiply by 1MiB and subtract 1 because mobile-nixos
|
||||
|
@ -26,7 +26,7 @@ in
|
|||
default = (16 * 1024 * 1024 - 34 * 512) * 1024 * 1024 - 1;
|
||||
type = types.nullOr types.int;
|
||||
};
|
||||
colinsane.image.bootPartSize = mkOption {
|
||||
sane.image.bootPartSize = mkOption {
|
||||
default = 512 * 1024 * 1024;
|
||||
type = types.int;
|
||||
};
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.impermanence;
|
||||
cfg = config.sane.impermanence;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.impermanence.enable = mkOption {
|
||||
sane.impermanence.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
colinsane.impermanence.home-dirs = mkOption {
|
||||
sane.impermanence.home-dirs = mkOption {
|
||||
default = [];
|
||||
type = types.listOf (types.either types.str (types.attrsOf types.str));
|
||||
};
|
||||
colinsane.impermanence.service-dirs = mkOption {
|
||||
sane.impermanence.service-dirs = mkOption {
|
||||
default = [];
|
||||
type = types.listOf (types.either types.str (types.attrsOf types.str));
|
||||
};
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.nixcache;
|
||||
cfg = config.sane.nixcache;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.nixcache.enable = mkOption {
|
||||
sane.nixcache.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.services.duplicity;
|
||||
cfg = config.sane.services.duplicity;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.services.duplicity.enable = mkOption {
|
||||
sane.services.duplicity.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
# we need this mostly because of the size of duplicity's cache
|
||||
colinsane.impermanence.service-dirs = [ "/var/lib/duplicity" ];
|
||||
sane.impermanence.service-dirs = [ "/var/lib/duplicity" ];
|
||||
|
||||
services.duplicity.enable = true;
|
||||
services.duplicity.targetUrl = ''"$DUPLICITY_URL"'';
|
||||
|
|
|
@ -10,45 +10,45 @@ in
|
|||
{
|
||||
options = {
|
||||
# legacy servo users, some are inconvenient to migrate
|
||||
colinsane.allocations.dhcpcd-gid = mkId 991;
|
||||
colinsane.allocations.dhcpcd-uid = mkId 992;
|
||||
colinsane.allocations.gitea-gid = mkId 993;
|
||||
colinsane.allocations.git-uid = mkId 994;
|
||||
colinsane.allocations.jellyfin-gid = mkId 994;
|
||||
colinsane.allocations.pleroma-gid = mkId 995;
|
||||
colinsane.allocations.jellyfin-uid = mkId 996;
|
||||
colinsane.allocations.acme-gid = mkId 996;
|
||||
colinsane.allocations.pleroma-uid = mkId 997;
|
||||
colinsane.allocations.acme-uid = mkId 998;
|
||||
colinsane.allocations.greeter-uid = mkId 999;
|
||||
colinsane.allocations.greeter-gid = mkId 999;
|
||||
sane.allocations.dhcpcd-gid = mkId 991;
|
||||
sane.allocations.dhcpcd-uid = mkId 992;
|
||||
sane.allocations.gitea-gid = mkId 993;
|
||||
sane.allocations.git-uid = mkId 994;
|
||||
sane.allocations.jellyfin-gid = mkId 994;
|
||||
sane.allocations.pleroma-gid = mkId 995;
|
||||
sane.allocations.jellyfin-uid = mkId 996;
|
||||
sane.allocations.acme-gid = mkId 996;
|
||||
sane.allocations.pleroma-uid = mkId 997;
|
||||
sane.allocations.acme-uid = mkId 998;
|
||||
sane.allocations.greeter-uid = mkId 999;
|
||||
sane.allocations.greeter-gid = mkId 999;
|
||||
|
||||
colinsane.allocations.colin-uid = mkId 1000;
|
||||
colinsane.allocations.guest-uid = mkId 1100;
|
||||
sane.allocations.colin-uid = mkId 1000;
|
||||
sane.allocations.guest-uid = mkId 1100;
|
||||
|
||||
# found on all machines
|
||||
colinsane.allocations.sshd-uid = mkId 2001; # 997
|
||||
colinsane.allocations.sshd-gid = mkId 2001; # 997
|
||||
colinsane.allocations.polkituser-gid = mkId 2002; # 998
|
||||
colinsane.allocations.systemd-coredump-gid = mkId 2003; # 996
|
||||
sane.allocations.sshd-uid = mkId 2001; # 997
|
||||
sane.allocations.sshd-gid = mkId 2001; # 997
|
||||
sane.allocations.polkituser-gid = mkId 2002; # 998
|
||||
sane.allocations.systemd-coredump-gid = mkId 2003; # 996
|
||||
|
||||
# found on graphical machines
|
||||
colinsane.allocations.nm-iodine-uid = mkId 2101; # desko/moby/lappy
|
||||
sane.allocations.nm-iodine-uid = mkId 2101; # desko/moby/lappy
|
||||
|
||||
# found on desko machine
|
||||
colinsane.allocations.usbmux-uid = mkId 2204;
|
||||
colinsane.allocations.usbmux-gid = mkId 2204;
|
||||
sane.allocations.usbmux-uid = mkId 2204;
|
||||
sane.allocations.usbmux-gid = mkId 2204;
|
||||
|
||||
|
||||
# originally found on moby machine
|
||||
colinsane.allocations.avahi-uid = mkId 2304;
|
||||
colinsane.allocations.avahi-gid = mkId 2304;
|
||||
colinsane.allocations.colord-uid = mkId 2305;
|
||||
colinsane.allocations.colord-gid = mkId 2305;
|
||||
colinsane.allocations.geoclue-uid = mkId 2306;
|
||||
colinsane.allocations.geoclue-gid = mkId 2306;
|
||||
colinsane.allocations.rtkit-uid = mkId 2307;
|
||||
colinsane.allocations.rtkit-gid = mkId 2307;
|
||||
colinsane.allocations.feedbackd-gid = mkId 2308;
|
||||
sane.allocations.avahi-uid = mkId 2304;
|
||||
sane.allocations.avahi-gid = mkId 2304;
|
||||
sane.allocations.colord-uid = mkId 2305;
|
||||
sane.allocations.colord-gid = mkId 2305;
|
||||
sane.allocations.geoclue-uid = mkId 2306;
|
||||
sane.allocations.geoclue-gid = mkId 2306;
|
||||
sane.allocations.rtkit-uid = mkId 2307;
|
||||
sane.allocations.rtkit-gid = mkId 2307;
|
||||
sane.allocations.feedbackd-gid = mkId 2308;
|
||||
};
|
||||
}
|
||||
|
|
14
modules/universal/env/home-manager.nix
vendored
14
modules/universal/env/home-manager.nix
vendored
|
@ -8,24 +8,24 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.home-manager;
|
||||
cfg = config.sane.home-manager;
|
||||
vim-swap-dir = ".cache/vim-swap";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.home-manager.enable = mkOption {
|
||||
sane.home-manager.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
colinsane.home-manager.extraPackages = mkOption {
|
||||
sane.home-manager.extraPackages = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf types.package;
|
||||
};
|
||||
colinsane.home-manager.windowManager = mkOption {
|
||||
sane.home-manager.windowManager = mkOption {
|
||||
default = {};
|
||||
type = types.attrs;
|
||||
};
|
||||
colinsane.home-manager.programs = mkOption {
|
||||
sane.home-manager.programs = mkOption {
|
||||
default = {};
|
||||
type = types.attrs;
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ in
|
|||
format = "binary";
|
||||
};
|
||||
|
||||
colinsane.impermanence.home-dirs = [
|
||||
sane.impermanence.home-dirs = [
|
||||
"archive"
|
||||
"dev"
|
||||
"records"
|
||||
|
@ -214,7 +214,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
firefox = lib.mkIf (sysconfig.colinsane.gui.enable) {
|
||||
firefox = lib.mkIf (sysconfig.sane.gui.enable) {
|
||||
enable = true;
|
||||
package = import ./web-browser.nix pkgs;
|
||||
};
|
||||
|
|
8
modules/universal/env/home-packages.nix
vendored
8
modules/universal/env/home-packages.nix
vendored
|
@ -31,7 +31,7 @@ let
|
|||
wireguard-tools
|
||||
youtube-dl
|
||||
]
|
||||
++ (if config.colinsane.gui.enable then
|
||||
++ (if config.sane.gui.enable then
|
||||
[
|
||||
# GUI only
|
||||
aerc # email client
|
||||
|
@ -72,7 +72,7 @@ let
|
|||
whalebird # pleroma client. input is broken on phosh
|
||||
xterm # broken on phosh
|
||||
] else [])
|
||||
++ (if config.colinsane.gui.enable && pkgs.system == "x86_64-linux" then
|
||||
++ (if config.sane.gui.enable && pkgs.system == "x86_64-linux" then
|
||||
[
|
||||
# x86_64 only
|
||||
|
||||
|
@ -117,7 +117,7 @@ in
|
|||
# mix2nix
|
||||
# rustup
|
||||
# swig
|
||||
colinsane.home-manager.extraPackages = pkglist;
|
||||
sane.home-manager.extraPackages = pkglist;
|
||||
# TODO: this should be gated behind home-manager being enabled...
|
||||
colinsane.impermanence.home-dirs = dirlist;
|
||||
sane.impermanence.home-dirs = dirlist;
|
||||
}
|
||||
|
|
18
modules/universal/env/users.nix
vendored
18
modules/universal/env/users.nix
vendored
|
@ -3,11 +3,11 @@
|
|||
# installer docs: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/installation-device.nix
|
||||
with lib;
|
||||
let
|
||||
cfg = config.colinsane.users;
|
||||
cfg = config.sane.users;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
colinsane.users.guest.enable = mkOption {
|
||||
sane.users.guest.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ in
|
|||
# sets group to "users" (?)
|
||||
isNormalUser = true;
|
||||
home = "/home/colin";
|
||||
uid = config.colinsane.allocations.colin-uid;
|
||||
uid = config.sane.allocations.colin-uid;
|
||||
# i don't get exactly what this is, but nixos defaults to this non-deterministically
|
||||
# in /var/lib/nixos/auto-subuid-map and i don't want that.
|
||||
subUidRanges = [
|
||||
|
@ -53,13 +53,13 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
colinsane.impermanence.service-dirs = mkIf cfg.guest.enable [
|
||||
sane.impermanence.service-dirs = mkIf cfg.guest.enable [
|
||||
{ user = "guest"; group = "users"; directory = "/home/guest"; }
|
||||
];
|
||||
users.users.guest = mkIf cfg.guest.enable {
|
||||
isNormalUser = true;
|
||||
home = "/home/guest";
|
||||
uid = config.colinsane.allocations.guest-uid;
|
||||
uid = config.sane.allocations.guest-uid;
|
||||
subUidRanges = [
|
||||
{ startUid=200000; count=1; }
|
||||
];
|
||||
|
@ -83,10 +83,10 @@ in
|
|||
};
|
||||
|
||||
# affix some UIDs which were historically auto-generated
|
||||
users.users.sshd.uid = config.colinsane.allocations.sshd-uid;
|
||||
users.groups.polkituser.gid = config.colinsane.allocations.polkituser-gid;
|
||||
users.groups.sshd.gid = config.colinsane.allocations.sshd-gid;
|
||||
users.groups.systemd-coredump.gid = config.colinsane.allocations.systemd-coredump-gid;
|
||||
users.users.sshd.uid = config.sane.allocations.sshd-uid;
|
||||
users.groups.polkituser.gid = config.sane.allocations.polkituser-gid;
|
||||
users.groups.sshd.gid = config.sane.allocations.sshd-gid;
|
||||
users.groups.systemd-coredump.gid = config.sane.allocations.systemd-coredump-gid;
|
||||
|
||||
# guarantee determinism in uid/gid generation for users:
|
||||
assertions = let
|
||||
|
|
Loading…
Reference in New Issue
Block a user