From 5eaf0ac0ed4fa91e75f63e0f7251ff9121f9ad8d Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 24 Aug 2020 23:56:31 +0800 Subject: [PATCH] Back again to unstable channels because why not --- Makefile | 3 + .../config/unison/{default.prf => backup.prf} | 15 +++- hosts/zilch/default.nix | 67 ++++++++++-------- modules/desktop/files.nix | 4 +- modules/desktop/multimedia.nix | 2 +- modules/desktop/music.nix | 2 +- modules/dev/android.nix | 4 +- modules/dev/documentation.nix | 2 +- modules/dev/gamedev.nix | 6 +- modules/dev/javascript.nix | 2 +- modules/editors/emacs.nix | 2 +- modules/services/unison.nix | 2 +- modules/themes/default.nix | 2 +- modules/themes/fair-and-square/default.nix | 37 +++++----- packages/default.nix | 2 +- .../README.adoc | 0 .../config/alacritty/alacritty.yml | 0 .../config/bspwm/bspwmrc | 0 .../config/dunst/dunstrc | 0 .../config/polybar/config | 0 .../config/rofi/config.rasi | 0 .../config/rofi/themes/dmenu.rasi | 0 .../config/rofi/themes/fds-center-menu.rasi | 0 .../config/rofi/themes/fds-mini-sidebar.rasi | 0 .../config/wallpaper | Bin .../default.nix | 0 26 files changed, 87 insertions(+), 65 deletions(-) rename hosts/zilch/config/unison/{default.prf => backup.prf} (57%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/README.adoc (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/alacritty/alacritty.yml (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/bspwm/bspwmrc (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/dunst/dunstrc (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/polybar/config (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/rofi/config.rasi (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/rofi/themes/dmenu.rasi (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/rofi/themes/fds-center-menu.rasi (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/rofi/themes/fds-mini-sidebar.rasi (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/config/wallpaper (100%) rename templates/themes/fair-and-square/{{{ cookiecutter.name | slugify }} => {{ cookiecutter.name }}}/default.nix (100%) diff --git a/Makefile b/Makefile index 9f5f47b7..15e3d7a1 100755 --- a/Makefile +++ b/Makefile @@ -35,3 +35,6 @@ install: channels update upgrade: update switch +rollback: + @sudo nix-env --rollback + diff --git a/hosts/zilch/config/unison/default.prf b/hosts/zilch/config/unison/backup.prf similarity index 57% rename from hosts/zilch/config/unison/default.prf rename to hosts/zilch/config/unison/backup.prf index 19e7472d..1f0e891f 100644 --- a/hosts/zilch/config/unison/default.prf +++ b/hosts/zilch/config/unison/backup.prf @@ -1,4 +1,4 @@ -# Paths to synchronize +# Paths to synchronize path = writings path = projects path = library @@ -9,6 +9,9 @@ path = .gnupg # The password store of gopass path = .password-store +# My SSH keys +path = .ssh + # Some regexps specifying names and paths to ignore ignore = Name temp.* ignore = Name *~ @@ -16,8 +19,14 @@ ignore = Name .*~ ignore = Name *.o ignore = Name *.tmp -# Use this command for displaying diffs -diff = diff -y -W 79 --suppress-common-lines +# Node cache +ignore = Name node_modules + +# Rust build caches +ignore = Name target + +# The diff command with the unified style (the same style Git uses for showing diffs) +diff = diff --unified # Log actions to the terminal log = true diff --git a/hosts/zilch/default.nix b/hosts/zilch/default.nix index c0c7723b..8ed36e5a 100755 --- a/hosts/zilch/default.nix +++ b/hosts/zilch/default.nix @@ -13,7 +13,6 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "nixos"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # The global useDHCP flag is deprecated, therefore explicitly set to false here. @@ -31,6 +30,16 @@ XDG_BIN_HOME = "$HOME/.local/bin"; }; + # Moving all of the host-specific configurations into its appropriate place. + my.home.xdg.dataFile = + let insertXDGDataFolder = name: { + source = ./config + "/${name}"; + recursive = true; + }; in { + "recoll" = insertXDGDataFolder "recoll"; + "unison" = insertXDGDataFolder "unison"; + }; + # Install documentations for tools and whatnot. documentation = { enable = true; @@ -75,7 +84,6 @@ base.enable = true; documentation = { enable = true; - jupyter.enable = true; latex.enable = true; }; game-dev = { @@ -102,7 +110,16 @@ services = { recoll.enable = true; - unison.enable = true; + unison = { + enable = true; + flags = + let + homeDirectory = "/home/${config.my.username}"; + backupDrive = "/run/media/${config.my.username}/Seagate Backup Plus Drive"; + in '' + -root ${homeDirectory} -root ${backupDrive} -auto -batch -fat -force ${homeDirectory} -mountpoint ${backupDrive} -ignorearchives + ''; + }; }; shell = { @@ -124,12 +141,12 @@ my.packages = with pkgs; [ # Muh games. - unstable.dwarf-fortress # Losing is fun! - unstable.endless-sky # Losing is meh! - unstable.minetest # Losing?! What's that? - unstable.openmw # Losing is even more meh1 - unstable.wesnoth # Losing is frustrating! - unstable.zeroad # Losing is fun and frustrating! + dwarf-fortress # Losing is fun! + endless-sky # Losing is meh! + minetest # Losing?! What's that? + openmw # Losing is even more meh1 + wesnoth # Losing is frustrating! + zeroad # Losing is fun and frustrating! # Installing some of the dependencies required for my scripts. ffcast @@ -173,29 +190,21 @@ hardware.pulseaudio.enable = true; # Additional host-specific program configurations. - my.home.programs = { - # My personal Git config. - git = { - enable = true; + my.home = { + programs = { + # My personal Git config. + git = { + enable = true; - # Enable Large File Storage. - lfs.enable = true; + # Enable Large File Storage. + lfs.enable = true; - # Use the entire suite. - package = pkgs.gitAndTools.gitFull; + # Use the entire suite. + package = pkgs.gitAndTools.gitFull; - userName = "Gabriel Arazas"; - userEmail = "${config.my.email}"; + userName = "Gabriel Arazas"; + userEmail = "${config.my.email}"; + }; }; }; - - # Moving all of the host-specific configurations into its appropriate place. - my.home.xdg.dataFile = - let insertXDGDataFolder = name: { - source = ./config + "/${name}"; - recursive = true; - }; in { - "recoll" = insertXDGDataFolder "recoll"; - "unison" = insertXDGDataFolder "unison"; - }; } diff --git a/modules/desktop/files.nix b/modules/desktop/files.nix index 330a5bd5..70fae593 100755 --- a/modules/desktop/files.nix +++ b/modules/desktop/files.nix @@ -19,9 +19,7 @@ in { (recoll.override { withGui = false; }) # Bring the search engine to the desktop! - (unison.override { - enableX11 = false; - }) # Bridge the gap between your storage. + unison magic-wormhole # Magically transfer stuff between your wormholes! transmission # One of the components for sailing the high seas. syncthing # A peer-to-peer synchro summoning. diff --git a/modules/desktop/multimedia.nix b/modules/desktop/multimedia.nix index fd477f10..ba46a720 100755 --- a/modules/desktop/multimedia.nix +++ b/modules/desktop/multimedia.nix @@ -13,11 +13,11 @@ with lib; config = mkIf config.modules.desktop.multimedia.enable { my.packages = with pkgs; [ hexchat # The ultimate IRC client for neckbeards. + kdenlive # A decent free and open source video editor. mpv # The ultimate media player for hipsters. newsboat # The ultimate RSS aggregator for some person. obs-studio # Open Broadcasting Studio Studio, the reliable recording workflow. obs-linuxbrowser # OBS plugin for browser source. - openshot-qt # A decent video editor. thunderbird # The ultimate email client for dumbasses like me. zathura # The ultimate PDF viewer for run-of-the-mill ricing. ]; diff --git a/modules/desktop/music.nix b/modules/desktop/music.nix index 0ebe292d..6f22713b 100755 --- a/modules/desktop/music.nix +++ b/modules/desktop/music.nix @@ -31,7 +31,7 @@ in { fluidsynth # Synth for fluid sounds. helm # A great synthesizer plugin. hydrogen # Them drum beats composition will get good. - unstable.polyphone # Edit your fonts for sound. + polyphone # Edit your fonts for sound. zynaddsubfx # Ze most advanced synthesizer I've seen so far (aside from the upcoming Vital syntehsizer). # As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe. diff --git a/modules/dev/android.nix b/modules/dev/android.nix index a93ab8da..a4c80baf 100755 --- a/modules/dev/android.nix +++ b/modules/dev/android.nix @@ -14,8 +14,8 @@ with lib; my.packages = with pkgs; [ android-studio # The apartment for Android development. dart # It's JavaScript except saner and slimmer. - unstable.flutter # It's Electron except saner and slimmer. - unstable.kotlin # It's Java except saner and slimmer. + flutter # It's Electron except saner and slimmer. + kotlin # It's Java except saner and slimmer. ]; # Enable Android Debug Bridge for some device debugging. diff --git a/modules/dev/documentation.nix b/modules/dev/documentation.nix index b68c1d9c..dab0ae3b 100755 --- a/modules/dev/documentation.nix +++ b/modules/dev/documentation.nix @@ -42,7 +42,7 @@ in (if cfg.jupyter.enable then [ jupyter # The interactive notebook. - unstable.iruby # The Ruby kernel for Jupyter. + iruby # The Ruby kernel for Jupyter. ] else []) ++ (if cfg.latex.enable then [ diff --git a/modules/dev/gamedev.nix b/modules/dev/gamedev.nix index 59a2dd73..07ba32f1 100755 --- a/modules/dev/gamedev.nix +++ b/modules/dev/gamedev.nix @@ -20,12 +20,12 @@ in config = { my.packages = with pkgs; (if cfg.godot.enable then [ - unstable.godot # The Godot, not to be confused with a certain prosecutor. + godot # The Godot, not to be confused with a certain prosecutor. ] else []) ++ (if cfg.unity3d.enable then [ - unstable.unity3d # The Unity, not to be confused with a certain ideal. - unstable.unityhub # The ideal hub for your Unity projects. + unity3d # The Unity, not to be confused with a certain ideal. + unityhub # The ideal hub for your Unity projects. ] else []); }; } diff --git a/modules/dev/javascript.nix b/modules/dev/javascript.nix index 22edd4ab..da0388c1 100755 --- a/modules/dev/javascript.nix +++ b/modules/dev/javascript.nix @@ -21,7 +21,7 @@ in config = { my.packages = with pkgs; (if cfg.deno.enable then [ - unstable.deno # The Deltarune of Node. + deno # The Deltarune of Node. ] else []) ++ (if cfg.node.enable then [ diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index ea7a8830..4a925c70 100755 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -15,7 +15,7 @@ with lib; # Just make sure the unstable version of Emacs is available as a package by creating an overlay. pkg = mkOption { type = types.package; - default = pkgs.unstable.emacs; + default = pkgs.emacs; }; }; diff --git a/modules/services/unison.nix b/modules/services/unison.nix index ed4f78aa..67bdb576 100755 --- a/modules/services/unison.nix +++ b/modules/services/unison.nix @@ -30,7 +30,7 @@ in Service = { ExecStart = "${(pkgs.unison.override { enableX11 = false; })}/bin/unison ${cfg.flags}"; Environment = [ "UNISON=\"$XDG_DATA_HOME/unison\"" ]; - RestartSec = "5mins"; + RestartSec = "2h"; }; Install = { diff --git a/modules/themes/default.nix b/modules/themes/default.nix index 74d4a0eb..7381bea0 100755 --- a/modules/themes/default.nix +++ b/modules/themes/default.nix @@ -30,7 +30,7 @@ in type = with types; nullOr path; default = if cfg.path != null then "${cfg.path}/config/wallpaper" - else null; + else null; }; }; diff --git a/modules/themes/fair-and-square/default.nix b/modules/themes/fair-and-square/default.nix index 315a968b..9f06b416 100755 --- a/modules/themes/fair-and-square/default.nix +++ b/modules/themes/fair-and-square/default.nix @@ -38,16 +38,16 @@ with lib; }; }; + # Enable QT configuration to style with the GTK theme. + qt5 = { + style = "gtk2"; + platformTheme = "gtk2"; + }; + + my.env.TERMINAL = "alacritty"; my.home = { - # Enable GTK configuration. - gtk.enable = true; - - # Enable QT configuration. - qt.enable = true; - qt.platformTheme = "gtk"; - # Install all of the configurations in the XDG config home. xdg.configFile = mkMerge [ (let recursiveXdgConfig = name: { @@ -66,9 +66,9 @@ with lib; }; }) - (mkIf config.services.xserver.enable { + { "gtk-3.0/settings.ini".text = '' - [Settings] + [Settings] gtk-theme-name=Arc gtk-icon-theme-name=Arc gtk-fallback-icon-theme=gnome @@ -78,15 +78,18 @@ with lib; gtk-xft-hintstyle=hintfull gtk-xft-rgba=none ''; - - "gtk-2.0/gtkrc".text = '' - gtk-theme-name="Arc" - gtk-icon-theme-name="Arc" - gtk-font-name="Sans 10" - gtk-cursor-theme-name="Adwaita" - ''; - }) + } ]; + + # Except for the GTK2 config which still needs to be in `$HOME/.gtkrc-2.0`. + home.file = { + ".gtkrc-2.0".text = '' + gtk-theme-name="Arc" + gtk-icon-theme-name="Arc" + gtk-font-name="Sans 10" + gtk-cursor-theme-name="Adwaita" + ''; + }; }; my.packages = with pkgs; [ diff --git a/packages/default.nix b/packages/default.nix index 84bd772e..92350ff5 100755 --- a/packages/default.nix +++ b/packages/default.nix @@ -3,7 +3,7 @@ # defold = (callPackage ./defold.nix {}); # Add packages from the unstable channel with `pkgs.unstable.$PKG`. - unstable = import { inherit config; }; + # unstable = import { inherit config; }; }) # The unstable branch of Emacs. diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/README.adoc b/templates/themes/fair-and-square/{{ cookiecutter.name }}/README.adoc similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/README.adoc rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/README.adoc diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/alacritty/alacritty.yml b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/alacritty/alacritty.yml similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/alacritty/alacritty.yml rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/alacritty/alacritty.yml diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/bspwm/bspwmrc b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/bspwm/bspwmrc similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/bspwm/bspwmrc rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/bspwm/bspwmrc diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/dunst/dunstrc b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/dunst/dunstrc similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/dunst/dunstrc rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/dunst/dunstrc diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/polybar/config b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/polybar/config similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/polybar/config rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/polybar/config diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/config.rasi b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/config.rasi similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/config.rasi rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/config.rasi diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/dmenu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/dmenu.rasi similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/dmenu.rasi rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/dmenu.rasi diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/fds-center-menu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/fds-center-menu.rasi similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/fds-center-menu.rasi rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/fds-center-menu.rasi diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/fds-mini-sidebar.rasi b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/fds-mini-sidebar.rasi similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/rofi/themes/fds-mini-sidebar.rasi rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/rofi/themes/fds-mini-sidebar.rasi diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/wallpaper b/templates/themes/fair-and-square/{{ cookiecutter.name }}/config/wallpaper similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/config/wallpaper rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/config/wallpaper diff --git a/templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/default.nix b/templates/themes/fair-and-square/{{ cookiecutter.name }}/default.nix similarity index 100% rename from templates/themes/fair-and-square/{{ cookiecutter.name | slugify }}/default.nix rename to templates/themes/fair-and-square/{{ cookiecutter.name }}/default.nix