Compare commits

...

19 Commits

Author SHA1 Message Date
5a10805287 hardware.opengl.extraPackages: move to machine-specific files 2022-07-02 23:53:55 -07:00
e73829d2e3 x86_64: add amdvlk and make this code cleaner 2022-07-02 23:45:42 -07:00
670063d998 update nixpkgs, nurpkgs
(we might not need nurpkgs anymore)

nixpkgs: 2022-06-30 -> 2022-07-01
nurpkgs: 2022-06-30 -> 2022-07-02
2022-07-02 15:23:49 -07:00
868325828d browser plugins: fix metamask ref 2022-07-02 14:45:55 -07:00
09700adba2 desko: replace 'electron' package with 'electrum' -- as it was meant to be 2022-07-02 14:45:21 -07:00
a85a0c54c2 bookmarks: add Home Manager config 2022-07-01 04:36:52 -07:00
b7000c6d48 home: set librewolf as the default html handler 2022-07-01 04:36:32 -07:00
f210b22494 switch to librewolf
this is partial: we probably want to persist ~/.librewolf so that
we aren't prompted with the extension notify pages on every start
(or maybe there's a better solution).
2022-07-01 04:25:41 -07:00
25e3c8e2f6 persist the Element session keys 2022-07-01 01:05:46 -07:00
ce5431591c patch Firefox so that we can properly set the default search engine
i'll probably (partially) revert this and switch to librewolf instead.
Firefox takes about 1hr to build.
2022-07-01 01:05:40 -07:00
1e33b1acb8 reminder to configure default XDG apps (e.g. web browser) 2022-06-30 20:45:58 -07:00
d404f279de partial rustup support 2022-06-30 20:45:40 -07:00
9b89b6d1af update nixpkgs, nurpkgs, sops-nix
nixpkgs: 2022-06-26 -> 2022-06-30
nurpkgs: 2022-06-27 -> 2022-06-30
sops-nix: 2022-06-26 -> 2022-06-28
2022-06-30 15:30:35 -07:00
e0dda018ae impermanence: persist more dirs which were eating space on servo 2022-06-30 14:20:38 -07:00
4225315732 home: install screen
this is useful particularly for servo: start screen, launch a
long-running command, and then safely close the tty and the long running
command will persist.
2022-06-30 13:58:28 -07:00
2863dba1e3 home: only install obsidian onto GUI systems
it's not usable in any form without a gui
2022-06-30 13:57:46 -07:00
3cee86298e impermanence: persist the home/records folder 2022-06-30 13:49:54 -07:00
9123c98595 sops: decrypt secrets AFTER /nix/ssh has been mounted 2022-06-30 01:32:03 -07:00
1098c66e8d kitty: disable the terminal bell 2022-06-30 00:43:08 -07:00
10 changed files with 160 additions and 49 deletions

View File

@@ -1,5 +1,4 @@
# features/tweaks # features/tweaks
- set firefox default search engine
- iron out video drivers - iron out video drivers
- emoji picker application - emoji picker application
- find a Masto/Pleroma app which works on mobile - find a Masto/Pleroma app which works on mobile

18
flake.lock generated
View File

@@ -54,11 +54,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1656265786, "lastModified": 1656679828,
"narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", "narHash": "sha256-akGA97pR1BAQew1FrVTCME3p8qvYxJXB2X3a13aBphs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cd90e773eae83ba7733d2377b6cdf84d45558780", "rev": "915f5a5b3cc4f8ba206afd0b70e52ba4c6a2796b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -117,11 +117,11 @@
}, },
"nurpkgs": { "nurpkgs": {
"locked": { "locked": {
"lastModified": 1656313781, "lastModified": 1656786319,
"narHash": "sha256-T3acwGi/9SnIV/giHCvN+3BqcIDo4GBBW+TBX15EaSg=", "narHash": "sha256-MpdBL2+csFfnMu+2eUNkkACkrPt7UhUdpvXnhrLim0E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "b3b8539bbfd02b4543d6723c547cae6edaece8b7", "rev": "433704dc83b1491725e616bbb898ccd17fbe3d0e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -147,11 +147,11 @@
"nixpkgs-22_05": "nixpkgs-22_05" "nixpkgs-22_05": "nixpkgs-22_05"
}, },
"locked": { "locked": {
"lastModified": 1656215886, "lastModified": 1656399028,
"narHash": "sha256-67fkBb4GUbuMZTHs08mNycg0hBzboy+5boMD76wLpj4=", "narHash": "sha256-re66+rVHGR3y+0QsaDAwoAHCfoi3BlGV24t2EqRZsAE=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "aff5d8542c9eb566a000302b22fcc10715bc2feb", "rev": "d26947f2d6252e2aae5ffddfe9b38b7c4b94e8f9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -5,7 +5,7 @@
]; ];
colinsane.home-manager.extraPackages = [ colinsane.home-manager.extraPackages = [
pkgs.electron pkgs.electrum
]; ];
colinsane.gui.sway.enable = true; colinsane.gui.sway.enable = true;
colinsane.services.duplicity.enable = true; colinsane.services.duplicity.enable = true;
@@ -15,6 +15,12 @@
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
];
# needed to use libimobiledevice/ifuse, for iphone sync # needed to use libimobiledevice/ifuse, for iphone sync
services.usbmuxd.enable = true; services.usbmuxd.enable = true;

View File

@@ -10,6 +10,13 @@
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
hardware.opengl.extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver # new
libvdpau-va-gl # new
vaapiIntel
];
# default config: https://man.archlinux.org/man/snapper-configs.5 # default config: https://man.archlinux.org/man/snapper-configs.5
# defaults to something like: # defaults to something like:
# - hourly snapshots # - hourly snapshots

View File

@@ -40,16 +40,6 @@ with lib;
# powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS # powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS
powerManagement.powertop.enable = false; powerManagement.powertop.enable = false;
hardware.opengl.extraPackages = [
# laptop
pkgs.intel-compute-runtime
pkgs.intel-media-driver # new
pkgs.libvdpau-va-gl # new
pkgs.vaapiIntel
# desktop
pkgs.rocm-opencl-icd
pkgs.rocm-opencl-runtime
];
hardware.opengl.driSupport = true; hardware.opengl.driSupport = true;
# For 32 bit applications # For 32 bit applications
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;

View File

@@ -25,6 +25,7 @@ in
directories = [ directories = [
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/archive"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/archive"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/dev"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/dev"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/records"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/ref"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/ref"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/tmp"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/tmp"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/use"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/use"; }
@@ -35,6 +36,8 @@ in
# cache is probably too big to fit on the tmpfs # cache is probably too big to fit on the tmpfs
# TODO: we could bind-mount it to something which gets cleared per boot, though. # TODO: we could bind-mount it to something which gets cleared per boot, though.
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.cache"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.cache"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.cargo"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.rustup"; }
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.ssh"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.ssh"; }
# intentionally omitted: # intentionally omitted:
# "/home/colin/.config" # managed by home-manager # "/home/colin/.config" # managed by home-manager
@@ -44,6 +47,8 @@ in
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.config/spotify"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.config/spotify"; }
# creds, but also 200 MB of node modules, etc # creds, but also 200 MB of node modules, etc
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.config/discord"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.config/discord"; }
# creds/session keys, etc
{ user = "colin"; group = "users"; mode = "0755"; directory = "/home/colin/.config/Element"; }
{ user = "root"; group = "root"; mode = "0700"; directory = "/etc/NetworkManager/system-connections"; } { user = "root"; group = "root"; mode = "0700"; directory = "/etc/NetworkManager/system-connections"; }
# "/etc/nixos" # "/etc/nixos"
@@ -53,6 +58,7 @@ in
# "/var/lib/blueman" # files aren't human readable # "/var/lib/blueman" # files aren't human readable
{ user = "root"; group = "root"; mode = "0755"; directory = "/var/lib/bluetooth"; } # preserve bluetooth handshakes { user = "root"; group = "root"; mode = "0755"; directory = "/var/lib/bluetooth"; } # preserve bluetooth handshakes
{ user = "root"; group = "root"; mode = "0755"; directory = "/var/lib/colord"; } # preserve color calibrations (?) { user = "root"; group = "root"; mode = "0755"; directory = "/var/lib/colord"; } # preserve color calibrations (?)
{ user = "root"; group = "root"; mode = "0755"; directory = "/var/lib/duplicity"; } # we need this mostly because of the size of duplicity's cache
# "/var/lib/dhclient" # empty on lappy; dunno about desko # "/var/lib/dhclient" # empty on lappy; dunno about desko
# "/var/lib/fwupd" # not sure why this would need persistent state # "/var/lib/fwupd" # not sure why this would need persistent state
# "/var/lib/geoclue" # empty on lappy # "/var/lib/geoclue" # empty on lappy
@@ -88,6 +94,7 @@ in
{ user = "70"; group = "70"; mode = "0755"; directory = "/var/lib/transmission"; } # TODO: mode? we need this specifically for the stats tracking in .config/ { user = "70"; group = "70"; mode = "0755"; directory = "/var/lib/transmission"; } # TODO: mode? we need this specifically for the stats tracking in .config/
{ user = "colin"; group = "users"; mode = "0755"; directory = "/var/lib/uninsane"; } { user = "colin"; group = "users"; mode = "0755"; directory = "/var/lib/uninsane"; }
{ user = "root"; group = "root"; mode = "0755"; directory = "/var/log"; } { user = "root"; group = "root"; mode = "0755"; directory = "/var/log"; }
{ user = "root"; group = "root"; mode = "0755"; directory = "/var/backup"; } # for e.g. postgres dumps
# TODO: what even GOES in /srv? # TODO: what even GOES in /srv?
{ user = "root"; group = "root"; mode = "0755"; directory = "/srv"; } { user = "root"; group = "root"; mode = "0755"; directory = "/srv"; }
]; ];
@@ -102,6 +109,13 @@ in
# { file = "/home/test2"; persistentStoragePath = "/nix/persist"; } # { file = "/home/test2"; persistentStoragePath = "/nix/persist"; }
]; ];
}; };
systemd.services.sane-sops = {
description = "sops relies on /etc/ssh being available, so re-run its activation AFTER fs-local";
script = config.system.activationScripts.setupSecrets.text;
after = [ "fs-local.target" ];
wantedBy = [ "multi-user.target" ];
};
}; };
} }

View File

@@ -65,6 +65,14 @@ in
templates = "$HOME/.xdg/Templates"; templates = "$HOME/.xdg/Templates";
videos = "$HOME/Videos"; videos = "$HOME/Videos";
}; };
xdg.mimeApps.enable = true;
xdg.mimeApps.defaultApplications = {
"text/html" = [ "librewolf.desktop" ];
"x-scheme-handler/http" = [ "librewolf.desktop" ];
"x-scheme-handler/https" = [ "librewolf.desktop" ];
"x-scheme-handler/about" = [ "librewolf.desktop" ];
"x-scheme-handler/unknown" = [ "librewolf.desktop" ];
};
# convenience # convenience
home.file."knowledge".source = config.lib.file.mkOutOfStoreSymlink "/home/colin/dev/knowledge"; home.file."knowledge".source = config.lib.file.mkOutOfStoreSymlink "/home/colin/dev/knowledge";
@@ -109,7 +117,10 @@ in
}; };
}; };
}; };
kitty.enable = true; kitty = {
enable = true;
settings.enable_audio_bell = false;
};
git = { git = {
enable = true; enable = true;
userName = "colin"; userName = "colin";
@@ -141,35 +152,91 @@ in
}; };
firefox = lib.mkIf (sysconfig.colinsane.gui.enable) { firefox = lib.mkIf (sysconfig.colinsane.gui.enable) {
# common settings to toggle (at runtime, in about:config):
# > security.ssl.require_safe_negotiation
enable = true; enable = true;
# librewolf is a forked firefox which patches firefox to allow more things
profiles.default = { # (like default search engines) to be configurable at runtime.
bookmarks = { # many of the settings below won't have effect without those patches.
fed_uninsane.url = "https://fed.uninsane.org/"; # see: https://gitlab.com/librewolf-community/settings/-/blob/master/distribution/policies.json
delightful.url = "https://delightful.club/"; package = pkgs.wrapFirefox pkgs.librewolf-unwrapped {
crowdsupply.url = "https://www.crowdsupply.com/"; # inherit the default librewolf.cfg
linux_phone_apps.url = "https://linuxphoneapps.org/mobile-compatibility/5/"; # it can be further customized via ~/.librewolf/librewolf.overrides.cfg
mempool.url = "https://jochen-hoenicke.de/queue"; inherit (pkgs.librewolf-unwrapped) extraPrefsFiles;
libName = "librewolf";
extraPolicies = {
NoDefaultBookmarks = true;
SearchEngines = {
Default = "DuckDuckGo";
}; };
}; AppUpdateURL = "https://localhost";
DisableAppUpdate = true;
# firefox profile support seems to be broken :shrug: OverrideFirstRunPage = "";
# profiles.other = { OverridePostUpdatePage = "";
# id = 2; DisableSystemAddonUpdate = true;
# }; DisableFirefoxStudies = true;
DisableTelemetry = true;
# NB: these must be manually enabled in the Firefox settings on first start DisableFeedbackCommands = true;
# extensions can be found here: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/addons.json DisablePocket = true;
extensions = let DisableSetDesktopBackground = false;
addons = pkgs.nur.repos.rycee.firefox-addons; Extensions = {
in [ Install = [
addons.bypass-paywalls-clean "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"
addons.metamask "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi"
addons.i-dont-care-about-cookies "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"
addons.sidebery "https://addons.mozilla.org/firefox/downloads/latest/bypass-paywalls-clean/latest.xpi"
addons.sponsorblock "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"
addons.ublock-origin "https://addons.mozilla.org/firefox/downloads/latest/ether-metamask/latest.xpi"
]; ];
# remove many default search providers
Uninstall = [
"google@search.mozilla.org"
"bing@search.mozilla.org"
"amazondotcom@search.mozilla.org"
"ebay@search.mozilla.org"
"twitter@search.mozilla.org"
];
};
# XXX doesn't seem to have any effect...
# docs: https://github.com/mozilla/policy-templates#homepage
# Homepage = {
# HomepageURL = "https://uninsane.org/";
# StartPage = "homepage";
# };
# NewTabPage = true;
# docs: https://chromeenterprise.google/policies/?policy=ManagedBookmarks
# docs: https://github.com/mozilla/policy-templates#managedbookmarks
ManagedBookmarks = [
{
toplevel_name = "bookmarks";
}
{
name = "Pleroma";
url = "https://fed.uninsane.org/";
}
{
name = "Home Manager Config";
url = "https://nix-community.github.io/home-manager/options.html";
}
{
name = "Delightful Apps";
url = "https://delightful.club/";
}
{
name = "Linux Phone Apps";
url = "https://linuxphoneapps.org/mobile-compatibility/5/";
}
{
name = "Crowdsupply";
url = "https://www.crowdsupply.com/";
}
{
name = "Mempool";
url = "https://jochen-hoenicke.de/queue";
}
];
};
};
}; };
# "command not found" will cause the command to be searched in nixpkgs # "command not found" will cause the command to be searched in nixpkgs
@@ -203,6 +270,7 @@ in
fatresize fatresize
fd fd
file file
gcc
gnumake gnumake
gptfdisk gptfdisk
hdparm hdparm
@@ -227,7 +295,6 @@ in
# nettools # nettools
nmap nmap
oathToolkit # for oathtool oathToolkit # for oathtool
obsidian
openssl openssl
parted parted
pciutils pciutils
@@ -237,7 +304,9 @@ in
python3 python3
ripgrep ripgrep
rmlint rmlint
rustup
sane-scripts sane-scripts
screen
smartmontools smartmontools
snapper snapper
socat socat
@@ -273,6 +342,7 @@ in
libreoffice-fresh # XXX colin: maybe don't want this on mobile libreoffice-fresh # XXX colin: maybe don't want this on mobile
mesa-demos mesa-demos
networkmanagerapplet networkmanagerapplet
obsidian
playerctl playerctl
tdesktop # broken on phosh tdesktop # broken on phosh
vlc # works on phosh vlc # works on phosh

View File

@@ -0,0 +1,13 @@
diff --git a/browser/components/enterprisepolicies/schemas/policies-schema.json b/browser/components/enterprisepolicies/schemas/policies-schema.json
index d436cf1ca1..ecd6e53b9e 100644
--- a/browser/components/enterprisepolicies/schemas/policies-schema.json
+++ b/browser/components/enterprisepolicies/schemas/policies-schema.json
@@ -1074,7 +1074,7 @@
},
"SearchEngines": {
- "enterprise_only": true,
+ "enterprise_only": false,
"type": "object",
"properties": {

View File

@@ -0,0 +1,10 @@
{ pkgs }:
(pkgs.firefox-unwrapped.overrideAttrs (upstream: {
# NB: firefox takes about 1hr to build on my 24-thread ryzen desktop
patches = (upstream.patches or []) ++ [
# see https://gitlab.com/librewolf-community/browser/source/-/blob/main/patches/sed-patches/allow-searchengines-non-esr.patch
./allow-searchengines-non-esr.patch
];
}))

View File

@@ -18,6 +18,8 @@
pleroma = prev.callPackage ./pleroma { }; pleroma = prev.callPackage ./pleroma { };
# jackett doesn't allow customization of the bind address: this will probably always be here. # jackett doesn't allow customization of the bind address: this will probably always be here.
jackett = prev.callPackage ./jackett { pkgs = prev; }; jackett = prev.callPackage ./jackett { pkgs = prev; };
# mozilla keeps nerfing itself and removing configuration options
firefox-unwrapped = prev.callPackage ./firefox-unwrapped { pkgs = prev; };
# fix abrupt HDD poweroffs as during reboot. patching systemd requires rebuilding nearly every package. # fix abrupt HDD poweroffs as during reboot. patching systemd requires rebuilding nearly every package.
# systemd = import ./pkgs/systemd { pkgs = prev; }; # systemd = import ./pkgs/systemd { pkgs = prev; };