mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
Back to stable AGAIN and update the docs
This commit is contained in:
parent
5eaf0ac0ed
commit
6ef087a067
11
Makefile
11
Makefile
@ -6,9 +6,9 @@ DOTS := /etc/dotfiles
|
||||
NIXOS_VERSION := 20.03
|
||||
NIXOS_PREFIX := $(PREFIX)/etc/nixos
|
||||
FLAGS := -I "config=$$(pwd)/config" \
|
||||
-I "modules=$$(pwd)/modules" \
|
||||
-I "bin=$$(pwd)/bin" \
|
||||
$(FLAGS)
|
||||
-I "modules=$$(pwd)/modules" \
|
||||
-I "bin=$$(pwd)/bin" \
|
||||
$(FLAGS)
|
||||
|
||||
config: $(NIXOS_PREFIX)/configuration.nix
|
||||
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"
|
||||
@echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix"
|
||||
@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)
|
||||
|
||||
clean:
|
||||
@sudo nix-collect-garbage -d
|
||||
|
||||
upgrade: update switch
|
||||
|
||||
rollback:
|
||||
|
13
README.adoc
13
README.adoc
@ -19,15 +19,17 @@ To install, you have to do the following first:
|
||||
- Install GNU Make.
|
||||
|
||||
Then simply run `make install`.
|
||||
The default behavior of the installation installs my default setup.
|
||||
It is equivalent to the following command:
|
||||
|
||||
[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.
|
||||
|
||||
@ -68,6 +70,11 @@ nixos-config
|
||||
└── 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.
|
||||
|
||||
** Another folder worthy of attention is the `modules/themes` which sets up a complete desktop environment for you so you don't have to.
|
||||
|
@ -63,7 +63,7 @@ device: username:
|
||||
my.user = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "video" "networkmanager" "libvirtd" ];
|
||||
extraGroups = [ "wheel" "video" "libvirtd" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
|
4
hosts/zilch/README.adoc
Normal file → Executable file
4
hosts/zilch/README.adoc
Normal file → Executable file
@ -3,6 +3,10 @@
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
- https://play0ad.com/[0 A.D.]
|
||||
|
0
hosts/zilch/config/unison/backup.prf
Normal file → Executable file
0
hosts/zilch/config/unison/backup.prf
Normal file → Executable file
@ -141,12 +141,12 @@
|
||||
|
||||
my.packages = with pkgs; [
|
||||
# Muh games.
|
||||
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!
|
||||
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!
|
||||
|
||||
# Installing some of the dependencies required for my scripts.
|
||||
ffcast
|
||||
|
@ -8,23 +8,23 @@
|
||||
[ <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.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5a99c954-92ae-4368-af6d-3e4b1d464474";
|
||||
{ device = "/dev/disk/by-uuid/8479243e-fce0-44aa-8b1c-66b6915992d5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/F3B1-E4AC";
|
||||
{ device = "/dev/disk/by-uuid/F4BC-C230";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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;
|
||||
|
0
hosts/zilch/modules/overlays.nix
Normal file → Executable file
0
hosts/zilch/modules/overlays.nix
Normal file → Executable file
@ -31,7 +31,7 @@ in {
|
||||
fluidsynth # Synth for fluid sounds.
|
||||
helm # A great synthesizer plugin.
|
||||
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).
|
||||
|
||||
# As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe.
|
||||
|
@ -14,7 +14,7 @@ with lib;
|
||||
my.packages = with pkgs; [
|
||||
android-studio # The apartment for Android development.
|
||||
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.
|
||||
];
|
||||
|
||||
|
@ -24,8 +24,8 @@ in
|
||||
] else []) ++
|
||||
|
||||
(if cfg.unity3d.enable then [
|
||||
unity3d # The Unity, not to be confused with a certain ideal.
|
||||
unityhub # The ideal hub for your Unity projects.
|
||||
unstable.unity3d # The Unity, not to be confused with a certain ideal.
|
||||
unstable.unityhub # The ideal hub for your Unity projects.
|
||||
] else []);
|
||||
};
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ in
|
||||
config = {
|
||||
my.packages = with pkgs;
|
||||
(if cfg.deno.enable then [
|
||||
deno # The Deltarune of Node.
|
||||
unstable.deno # The Deltarune of Node.
|
||||
] else []) ++
|
||||
|
||||
(if cfg.node.enable then [
|
||||
|
0
modules/dev/perl.nix
Normal file → Executable file
0
modules/dev/perl.nix
Normal file → Executable file
@ -12,6 +12,7 @@ with lib;
|
||||
|
||||
config = mkIf config.modules.shell.base.enable {
|
||||
my.packages = with pkgs; [
|
||||
aria2 # The sequel to aria(1).
|
||||
aspell # Hunt down a spelling bee champion to come to your shell.
|
||||
bat # cat(1) with wings.
|
||||
# buku # A developer-oriented browser-independent bookmark manager.
|
||||
|
0
modules/themes/fair-and-square/config/wallpaper
Normal file → Executable file
0
modules/themes/fair-and-square/config/wallpaper
Normal file → Executable file
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
@ -3,7 +3,7 @@
|
||||
# defold = (callPackage ./defold.nix {});
|
||||
|
||||
# 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.
|
||||
|
@ -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].
|
||||
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.
|
||||
|
||||
|
0
templates/themes/fair-and-square/{{ cookiecutter.name }}/config/wallpaper
Normal file → Executable file
0
templates/themes/fair-and-square/{{ cookiecutter.name }}/config/wallpaper
Normal file → Executable file
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
Loading…
Reference in New Issue
Block a user