Back to stable AGAIN and update the docs

This commit is contained in:
Gabriel Arazas 2020-08-28 15:58:17 +08:00
parent 5eaf0ac0ed
commit 6ef087a067
18 changed files with 39 additions and 28 deletions

View File

@ -6,9 +6,9 @@ DOTS := /etc/dotfiles
NIXOS_VERSION := 20.03 NIXOS_VERSION := 20.03
NIXOS_PREFIX := $(PREFIX)/etc/nixos NIXOS_PREFIX := $(PREFIX)/etc/nixos
FLAGS := -I "config=$$(pwd)/config" \ FLAGS := -I "config=$$(pwd)/config" \
-I "modules=$$(pwd)/modules" \ -I "modules=$$(pwd)/modules" \
-I "bin=$$(pwd)/bin" \ -I "bin=$$(pwd)/bin" \
$(FLAGS) $(FLAGS)
config: $(NIXOS_PREFIX)/configuration.nix config: $(NIXOS_PREFIX)/configuration.nix
home: $(HOME)/dotfiles home: $(HOME)/dotfiles
@ -30,9 +30,12 @@ install: channels update
@sudo nixos-generate-config --root "$(PREFIX)" && sudo cp --update "$(NIXOS_PREFIX)/hardware-configuration.nix" "$$(pwd)/hosts/$(HOST)/hardware-configuration.nix" @sudo nixos-generate-config --root "$(PREFIX)" && sudo cp --update "$(NIXOS_PREFIX)/hardware-configuration.nix" "$$(pwd)/hosts/$(HOST)/hardware-configuration.nix"
@echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix" @echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix"
@sudo nixos-install --root "$(PREFIX)" $(FLAGS) @sudo nixos-install --root "$(PREFIX)" $(FLAGS)
@sudo rm -r "$(PREFIX)/etc/dotfiles" && sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles" @sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles"
@sudo nixos-enter --root "$(PREFIX)" -c chown $(USER):users $(DOTS) @sudo nixos-enter --root "$(PREFIX)" -c chown $(USER):users $(DOTS)
clean:
@sudo nix-collect-garbage -d
upgrade: update switch upgrade: update switch
rollback: rollback:

View File

@ -19,15 +19,17 @@ To install, you have to do the following first:
- Install GNU Make. - Install GNU Make.
Then simply run `make install`. Then simply run `make install`.
The default behavior of the installation installs my default setup.
It is equivalent to the following command: It is equivalent to the following command:
[source, shell] [source, shell]
---- ----
PREFIX=/mnt USER=foo-dogsquared HOST=zilch make --directory /etc/dotfiles install USER=foo-dogsquared HOST=zilch make --directory /etc/dotfiles install
---- ----
For more information, simply inspect the Makefile. As of 2020-08-28, it wouldn't work since it assumes the installation root is at `/` rather than `/mnt`.
To correct this behavior, simply configure the `PREFIX` variable (e.g., `PREFIX=/mnt make install`).
For more information, simply inspect the link:./Makefile[`./Makefile`].
Assuming you did install, your project will have the following stuff. Assuming you did install, your project will have the following stuff.
@ -68,6 +70,11 @@ nixos-config
└── README.adoc* └── README.adoc*
---- ----
* The entrypoint of this setup is link:./default.nix[`./default.nix`] (which is like `index.html` for webpages).
It contains a function that accepts two arguments: the name of the host and the username of the main user.
The host should exist at `./hosts/$HOST/` (see <<Hosts>> for more info).
Meanwhile, the main user is primarily referred with the `my` attribute defined at link:./modules/default.nix[`./modules/default.nix`].
* The directory paid with the most attention would most likely be the `modules/` folder which contains cluster-wide footnote:[Whenever I say 'cluster-wide', I really mean my laptop (which I have none at the moment) and desktop (which I have only one at the moment).] modules intended to be used in each device. * The directory paid with the most attention would most likely be the `modules/` folder which contains cluster-wide footnote:[Whenever I say 'cluster-wide', I really mean my laptop (which I have none at the moment) and desktop (which I have only one at the moment).] modules intended to be used in each device.
** Another folder worthy of attention is the `modules/themes` which sets up a complete desktop environment for you so you don't have to. ** Another folder worthy of attention is the `modules/themes` which sets up a complete desktop environment for you so you don't have to.

View File

@ -63,7 +63,7 @@ device: username:
my.user = { my.user = {
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
extraGroups = [ "wheel" "video" "networkmanager" "libvirtd" ]; extraGroups = [ "wheel" "video" "libvirtd" ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };

4
hosts/zilch/README.adoc Normal file → Executable file
View File

@ -3,6 +3,10 @@
This is Zilch, the main machine (and only desktop as of 2020-08-16). This is Zilch, the main machine (and only desktop as of 2020-08-16).
As such, it contains muh games and other stuff I attempt to bring over to Linux such as my music production workflow (I'm also learning how to compose music __properly__) and computer-aided designing with computers. As such, it contains muh games and other stuff I attempt to bring over to Linux such as my music production workflow (I'm also learning how to compose music __properly__) and computer-aided designing with computers.
One of the main points to keep in mind is the `dots` alias attached to the main user.
It provides a convenient way to upgrade the whole system in one fell swoop.
You can use https://nixos.org/nix/manual/#sec-profiles[user profiles] and run local upgrades (e.g., `nix-env -i all`, `home-manager switch upgrade`) for your other accounts.
Just to make this note seem more important, I'll just list the games I'm currently into: Just to make this note seem more important, I'll just list the games I'm currently into:
- https://play0ad.com/[0 A.D.] - https://play0ad.com/[0 A.D.]

0
hosts/zilch/config/unison/backup.prf Normal file → Executable file
View File

View File

@ -141,12 +141,12 @@
my.packages = with pkgs; [ my.packages = with pkgs; [
# Muh games. # Muh games.
dwarf-fortress # Losing is fun! unstable.dwarf-fortress # Losing is fun!
endless-sky # Losing is meh! unstable.endless-sky # Losing is meh!
minetest # Losing?! What's that? unstable.minetest # Losing?! What's that?
openmw # Losing is even more meh1 unstable.openmw # Losing is even more meh1
wesnoth # Losing is frustrating! unstable.wesnoth # Losing is frustrating!
zeroad # Losing is fun and frustrating! unstable.zeroad # Losing is fun and frustrating!
# Installing some of the dependencies required for my scripts. # Installing some of the dependencies required for my scripts.
ffcast ffcast

View File

@ -8,23 +8,23 @@
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "uas" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/5a99c954-92ae-4368-af6d-3e4b1d464474"; { device = "/dev/disk/by-uuid/8479243e-fce0-44aa-8b1c-66b6915992d5";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F3B1-E4AC"; { device = "/dev/disk/by-uuid/F4BC-C230";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/4b2a4a00-f705-45b9-a014-e60acce2ae2a"; } [ { device = "/dev/disk/by-uuid/df977c05-495e-4bd4-b99a-919cf3caaaa1"; }
]; ];
nix.maxJobs = lib.mkDefault 2; nix.maxJobs = lib.mkDefault 2;

0
hosts/zilch/modules/overlays.nix Normal file → Executable file
View File

View File

@ -31,7 +31,7 @@ in {
fluidsynth # Synth for fluid sounds. fluidsynth # Synth for fluid sounds.
helm # A great synthesizer plugin. helm # A great synthesizer plugin.
hydrogen # Them drum beats composition will get good. hydrogen # Them drum beats composition will get good.
polyphone # Edit your fonts for sound. unstable.polyphone # Edit your fonts for sound.
zynaddsubfx # Ze most advanced synthesizer I've seen so far (aside from the upcoming Vital syntehsizer). 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. # As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe.

View File

@ -14,7 +14,7 @@ with lib;
my.packages = with pkgs; [ my.packages = with pkgs; [
android-studio # The apartment for Android development. android-studio # The apartment for Android development.
dart # It's JavaScript except saner and slimmer. dart # It's JavaScript except saner and slimmer.
flutter # It's Electron except saner and slimmer. unstable.flutter # It's Electron except saner and slimmer.
kotlin # It's Java except saner and slimmer. kotlin # It's Java except saner and slimmer.
]; ];

View File

@ -24,8 +24,8 @@ in
] else []) ++ ] else []) ++
(if cfg.unity3d.enable then [ (if cfg.unity3d.enable then [
unity3d # The Unity, not to be confused with a certain ideal. unstable.unity3d # The Unity, not to be confused with a certain ideal.
unityhub # The ideal hub for your Unity projects. unstable.unityhub # The ideal hub for your Unity projects.
] else []); ] else []);
}; };
} }

View File

@ -21,7 +21,7 @@ in
config = { config = {
my.packages = with pkgs; my.packages = with pkgs;
(if cfg.deno.enable then [ (if cfg.deno.enable then [
deno # The Deltarune of Node. unstable.deno # The Deltarune of Node.
] else []) ++ ] else []) ++
(if cfg.node.enable then [ (if cfg.node.enable then [

0
modules/dev/perl.nix Normal file → Executable file
View File

View File

@ -12,6 +12,7 @@ with lib;
config = mkIf config.modules.shell.base.enable { config = mkIf config.modules.shell.base.enable {
my.packages = with pkgs; [ my.packages = with pkgs; [
aria2 # The sequel to aria(1).
aspell # Hunt down a spelling bee champion to come to your shell. aspell # Hunt down a spelling bee champion to come to your shell.
bat # cat(1) with wings. bat # cat(1) with wings.
# buku # A developer-oriented browser-independent bookmark manager. # buku # A developer-oriented browser-independent bookmark manager.

0
modules/themes/fair-and-square/config/wallpaper Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

View File

@ -3,7 +3,7 @@
# defold = (callPackage ./defold.nix {}); # defold = (callPackage ./defold.nix {});
# Add packages from the unstable channel with `pkgs.unstable.$PKG`. # Add packages from the unstable channel with `pkgs.unstable.$PKG`.
# unstable = import <nixpkgs-unstable> { inherit config; }; unstable = import <nixpkgs-unstable> { inherit config; };
}) })
# The unstable branch of Emacs. # The unstable branch of Emacs.

View File

@ -3,7 +3,3 @@
These are some of my themes om NixOS as a module ala-link:https://github.com/hlissner/dotfiles[hlissner NixOS modules] as a https://github.com/cookiecutter/cookiecutter[Cookiecutter template]. These are some of my themes om NixOS as a module ala-link:https://github.com/hlissner/dotfiles[hlissner NixOS modules] as a https://github.com/cookiecutter/cookiecutter[Cookiecutter template].
Most of them just need a Pywal JSON scheme in the appropriate config file and generate the module with the given color scheme as a result. Most of them just need a Pywal JSON scheme in the appropriate config file and generate the module with the given color scheme as a result.
Also, to make them working, you need to have home-manager installed (or do the hardwork of converting them to be suitable for system configuration yourself, your choice).
Furthermore, be careful when using the themes as they may override some of the current configuration.
The modules assume you don't have much installed and/or enabled (e.g., display servers, window managers) and handle installing those packages for you.

View File

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB