chore: lots of changes made to flatpaks and auto upgrading

This commit is contained in:
Ruben 2024-04-20 16:14:04 -05:00
commit 74e9f6985a
No known key found for this signature in database
GPG key ID: A6C94D84D2DA13EE
5 changed files with 91 additions and 38 deletions

View file

@ -1,10 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -37,7 +38,7 @@
system.autoUpgrade = {
enable = true;
persistent = true;
flake = "/etc/nixos#thonkpad";
flake = "/home/ruben/.nixos#thonkpad";
flags = [
"-L"
];

View file

@ -1,10 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -37,7 +38,7 @@
system.autoUpgrade = {
enable = true;
persistent = true;
flake = "/etc/nixos#thunkpad";
flake = "/home/ruben/.nixos#thunkpad";
flags = [
"-L"
];

View file

@ -79,7 +79,7 @@
networking.networkmanager.enable = true;
# we're using/prioritizing dnscrypt!
networking.nameservers = [ "127.0.0.1" "::1" ];
networking.nameservers = ["127.0.0.1" "::1"];
# resolved and others conflicts with setting dns here
networking.resolvconf.enable = pkgs.lib.mkForce false;
networking.dhcpcd.extraConfig = "nohook resolv.conf";
@ -106,7 +106,7 @@
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
# prioritize quad9, then adguard, and cloudflare as last resort
server_names = [ "quad9-dnscrypt-ip4-filter-pri" "quad9-doh-ip4-port443-filter-pri" "quad9-doh-ip6-port443-filter-pri" "adguard-dns-doh" "adguard-dns-ipv6" "cloudflare" "cloudflare-ipv6" ];
server_names = ["quad9-dnscrypt-ip4-filter-pri" "quad9-doh-ip4-port443-filter-pri" "quad9-doh-ip6-port443-filter-pri" "adguard-dns-doh" "adguard-dns-ipv6" "cloudflare" "cloudflare-ipv6"];
};
};
@ -123,7 +123,7 @@
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = with pkgs; [ canon-cups-ufr2 ];
drivers = with pkgs; [canon-cups-ufr2];
};
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
@ -173,11 +173,11 @@
lexend
liberation_ttf
unifont
(nerdfonts.override { fonts = [ "JetBrainsMono" "Iosevka" "FiraCode" "DroidSansMono" ]; })
(nerdfonts.override {fonts = ["JetBrainsMono" "Iosevka" "FiraCode" "DroidSansMono"];})
noto-fonts-color-emoji
];
fontconfig.defaultFonts = {
emoji = [ "Noto Color Emoji" ];
emoji = ["Noto Color Emoji"];
};
};
@ -197,13 +197,15 @@
wireplumber.enable = true;
};
# flatpaks
# TODO: unsure if i should even bother using flatpaks in a configuration/distro like this...
# maybe i can fully embrace flatpaks once i've figured out how to remove default packages
services.flatpak.remotes = lib.mkOptionDefault [{
# we like flatpaks
services.flatpak.enable = true;
services.flatpak.remotes = lib.mkOptionDefault [
{
name = "flathub-system";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}];
}
];
services.flatpak.update.auto.enable = true;
services.flatpak.uninstallUnmanaged = true;
@ -218,22 +220,38 @@
"org.qbittorrent.qBittorrent"
];
services.flatpak.overrides = {
global = {
Environment = {
GTK_THEME = "Catppuccin-Mocha-Compact-Green-Dark";
ICON_THEME = "Papirus-Dark";
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
XCURSOR_SIZE = "24";
XCURSOR_THEME = "Bibata-Modern-Light";
};
};
};
environment.systemPackages = with pkgs; [
git
wget fzf
curl curlHTTP3
wget
fzf
curl
curlHTTP3
virt-manager
pinentry-curses
kitty wezterm
kitty
wezterm
bibata-cursors
papirus-icon-theme
#(catppuccin-papirus-folders.override { flavor = [ "mocha" ]; accent = [ "green" ]; })
(catppuccin-kde.override { flavour = [ "mocha" ]; accents = [ "green" ]; winDecStyles = [ "modern" ]; })
(catppuccin-kde.override {
flavour = ["mocha"];
accents = ["green"];
winDecStyles = ["modern"];
})
];
# we like flatpaks
services.flatpak.enable = true;
# steam
programs.steam.enable = true;

View file

@ -1,20 +1,25 @@
# default config loads everything else
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
home-manager.users.ruben = ./home.nix;
# make home-manager create backup of files to prevent failure when updating system
home-manager.backupFileExtension = "backup";
# myself :D
users.users."ruben" = {
isNormalUser = true;
description = "Ruben";
shell = pkgs.zsh;
extraGroups = [ "wheel" "plugdev" "dialout" "libvirtd" ] ++ (lib.optional config.networking.networkmanager.enable "networkmanager");
extraGroups = ["wheel" "plugdev" "dialout" "libvirtd"] ++ (lib.optional config.networking.networkmanager.enable "networkmanager");
initialHashedPassword = "changeme";
openssh.authorizedKeys.keys = [ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO+V3b6oKMTLEBq8AKjdNF5ZwJGXuWTrS2u9QaEypBYP sneexy@disroot.org'' ];
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO+V3b6oKMTLEBq8AKjdNF5ZwJGXuWTrS2u9QaEypBYP sneexy@disroot.org''];
};
programs.zsh.enable = true;
environment.shells = with pkgs; [ zsh ];
environment.shells = with pkgs; [zsh];
}

View file

@ -38,10 +38,12 @@
# │ |_| │
# │ flatpak │
# ╰─────────────────────────────────╯
services.flatpak.remotes = lib.mkOptionDefault [{
services.flatpak.remotes = lib.mkOptionDefault [
{
name = "flathub-user";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}];
}
];
services.flatpak.update.auto.enable = true;
services.flatpak.uninstallUnmanaged = true;
@ -77,6 +79,28 @@
"io.gitlab.azymohliad.WatchMate"
];
services.flatpak.overrides = {
global = {
Context.filesystems = [
"xdg-config/gtk-4.0:ro"
"xdg-config/gtk-3.0:ro"
"xdg-run/discord-ipc-*"
"xdg-run/.flatpak/dev.vencord.Vesktop:create"
"xdg-config/fontconfig:ro"
"~/.themes:ro"
"~/.local/share/themes:ro"
];
Environment = {
GTK_THEME = "Catppuccin-Mocha-Compact-Green-Dark";
ICON_THEME = "Papirus-Dark";
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
XCURSOR_SIZE = "24";
XCURSOR_THEME = "Bibata-Modern-Light";
};
};
};
# ╭──────────────────────────────────────╮
# │ _ │
# │ _ __ __ _ __| |____ _ __ _ ___ ___ │
@ -219,7 +243,7 @@
theme = {
name = "Catppuccin-Mocha-Compact-Green-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "green" ];
accents = ["green"];
size = "compact";
#tweaks = [ "rimless" "black" ];
variant = "mocha";
@ -227,8 +251,8 @@
};
};
# required for catppuccin's gtk4 theme
xdg.configFile = {
# required for catppuccin's gtk4 theme
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
@ -250,6 +274,10 @@
# Enable home-manager
programs.home-manager.enable = true;
# home-manager should automatically update for me
services.home-manager.autoUpgrade.enable = true;
services.home-manager.autoUpgrade.frequency = "daily";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "23.11";
}