mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
Update the config to use the stable versions of nixpkgs separated with the unstable branch
This commit is contained in:
parent
e67a74485a
commit
75a04804a6
10
Makefile
10
Makefile
@ -13,9 +13,12 @@ FLAGS := -I "config=$$(pwd)/config" \
|
||||
config: $(NIXOS_PREFIX)/configuration.nix
|
||||
home: $(HOME)/dotfiles
|
||||
|
||||
# The channels will be used on certain modules like in `packages/default.nix` where it will be referred to install certain packages from the unstable channel.
|
||||
channels:
|
||||
@sudo nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos
|
||||
@sudo nix-channel --add "https://github.com/rycee/home-manager/archive/master.tar.gz" home-manager
|
||||
@sudo nix-channel --add "https://nixos.org/channels/nixos-${NIXOS_VERSION}" nixos
|
||||
@sudo nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos-unstable
|
||||
@sudo nix-channel --add "https://github.com/rycee/home-manager/archive/release-${NIXOS_VERSION}.tar.gz" home-manager
|
||||
@sudo nix-channel --add "https://nixos.org/channels/nixpkgs-unstable" nixpkgs-unstable
|
||||
|
||||
update:
|
||||
@sudo nix-channel --update
|
||||
@ -24,7 +27,8 @@ switch:
|
||||
@sudo nixos-rebuild $(FLAGS) switch
|
||||
|
||||
install: channels update
|
||||
@echo "import "$(DOTS)" \"$${HOST:-$$(hostname)}\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/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"
|
||||
@sudo nixos-install --root "$(PREFIX)" $(FLAGS)
|
||||
@sudo rm -r "$(PREFIX)/etc/dotfiles" && sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles"
|
||||
@sudo nixos-enter --root "$(PREFIX)" -c chown $(USER):users $(DOTS)
|
||||
|
10
README.adoc
10
README.adoc
@ -30,9 +30,10 @@ For more information, simply inspect the Makefile.
|
||||
|
||||
Assuming you did install, your project will have the following stuff.
|
||||
|
||||
- Uses the nixpkgs unstable channel as `nixos` (i.e., `nix-channels --update https://nixos.org/channels/nixos-unstable`).
|
||||
- Have the https://github.com/rycee/home-manager[home-manager] installed with the unstable release.
|
||||
- Add the nixpkgs unstable channel as `nixpkgs-unstable` (i.e., `nix-channels --update https://nixos.org/channels/nixos-unstable`).
|
||||
- Have the https://github.com/rycee/home-manager[home-manager] installed with the stable release.
|
||||
- You start with the TTY and nothing else is installed (i.e., bare installation similar in spirit to Arch Linux).
|
||||
To setup your graphical installation, see the <<Themes>> section.
|
||||
|
||||
|
||||
=== Precautions
|
||||
@ -80,7 +81,7 @@ Each folder inside of this directory represents one machine.
|
||||
It is also used on the installation phase (from `make install`) by setting the `HOST` variable (i.e., `HOST=zilch make -C /etc/install`) with the folder name as the argument.
|
||||
|
||||
* The `packages/` folder is my custom packages either the new ones that haven't made into nixpkgs yet or packages with overrides.
|
||||
Also contains third-party package repositories and overlays such as the NUR or the unstable branch of Emacs.
|
||||
Also contains third-party package repositories and overlays such as the https://github.com/nix-community/NUR[NUR], https://github.com/nix-community/emacs-overlay[unstable branch of Emacs], or the unstable branch of https://github.com/NixOS/nixpkgs/[nixpkgs].
|
||||
|
||||
|
||||
|
||||
@ -126,5 +127,6 @@ A wallpaper can be placed at `config/wallpaper` for convenience.
|
||||
This is where you can add certain packages, enable certain settings, setup your files to the home directory, and pass the theme metadata.
|
||||
|
||||
* For convenience, you should make the NixOS theme module as a https://github.com/cookiecutter/cookiecutter[Cookiecutter template] to easily replace the color schemes, fonts, and what-have-you.
|
||||
I have my theme templates stored in link:./templates[`./templates`].
|
||||
Then, edit `modules/themes/default.nix` to add the theme to the selection.
|
||||
I have my theme templates stored in link:./templates[`./templates`] as an example.
|
||||
|
||||
|
14
default.nix
14
default.nix
@ -8,6 +8,7 @@
|
||||
|
||||
device: username:
|
||||
{ pkgs, options, lib, config, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = lib.mkDefault device;
|
||||
my.username = username;
|
||||
@ -21,7 +22,12 @@ device: username:
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
] else []);
|
||||
|
||||
### NixOS
|
||||
# GARBAGE DAY!
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 3d";
|
||||
};
|
||||
nix.autoOptimiseStore = true;
|
||||
nix.nixPath = options.nix.nixPath.default ++ [
|
||||
# So we can use absolute import paths
|
||||
@ -33,7 +39,7 @@ device: username:
|
||||
nixpkgs.overlays = import ./packages;
|
||||
nixpkgs.config.allowUnfree = true; # forgive me Stallman senpai
|
||||
|
||||
# These are the things I want installed on all my systems
|
||||
# These are the things I want installed on all my systems.
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Just the bear necessities~
|
||||
coreutils
|
||||
@ -52,8 +58,8 @@ device: username:
|
||||
cachix # less time buildin' mo time nixin'
|
||||
];
|
||||
|
||||
# Default settings for primary user account. `my` is defined in
|
||||
# modules/default.nix
|
||||
# Default settings for primary user account.
|
||||
# `my` is defined in 'modules/default.nix'.
|
||||
my.user = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
|
15
hosts/zilch/README.adoc
Normal file
15
hosts/zilch/README.adoc
Normal file
@ -0,0 +1,15 @@
|
||||
= Zilch, the main workstation
|
||||
|
||||
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.
|
||||
|
||||
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://wesnoth.org/[Battle for Wesnoth]
|
||||
- http://www.bay12games.com/dwarves/[Dwarf Fortress]
|
||||
- https://endless-sky.github.io/[Endless Sky]
|
||||
- https://www.minetest.net/[Minetest]
|
||||
- https://openmw.org/en/[OpenMW]
|
||||
- https://veloren.net/[Veloren]
|
||||
|
@ -1,12 +1,12 @@
|
||||
# My desktop search settings.
|
||||
|
||||
# The main directories to create an index.
|
||||
topdirs = ~/writings # My writings on stuff.
|
||||
~/projects # My projects on stuff.
|
||||
~/library # Personal library which contains my references, documents, and movies.
|
||||
~/Documents # The ol' hangout for gamesaves.
|
||||
~/Videos # XDG Video directory.
|
||||
~/Pictures # Muh screenshots.
|
||||
topdirs = ~/writings
|
||||
~/projects
|
||||
~/library
|
||||
~/Documents
|
||||
~/Videos
|
||||
~/Pictures
|
||||
|
||||
# A list of wildcards to be ignored during index scanning.
|
||||
skippedNames = #* CVS Cache cache* .cache caughtspam tmp \
|
||||
|
@ -71,8 +71,13 @@
|
||||
base.enable = true;
|
||||
documentation = {
|
||||
enable = true;
|
||||
jupyter.enable = true;
|
||||
latex.enable = true;
|
||||
};
|
||||
gamedev = {
|
||||
godot.enable = true;
|
||||
unity3d.enable = true;
|
||||
};
|
||||
java.enable = true;
|
||||
javascript = {
|
||||
deno.enable = true;
|
||||
@ -98,7 +103,6 @@
|
||||
|
||||
shell = {
|
||||
base.enable = true;
|
||||
git.enable = true;
|
||||
lf.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
@ -112,10 +116,16 @@
|
||||
# defold
|
||||
nim # Jack the nimble, jack jumped over the nightstick, and got over not being the best pick.
|
||||
python # *insert Monty Python quote here*
|
||||
];
|
||||
|
||||
my.packages = with pkgs; [
|
||||
# Muh games.
|
||||
zeroad
|
||||
wesnoth
|
||||
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!
|
||||
];
|
||||
|
||||
my.env = {
|
||||
@ -130,25 +140,27 @@
|
||||
time.timeZone = "Asia/Manila";
|
||||
services.openssh.enable = true;
|
||||
services.lorri.enable = true;
|
||||
|
||||
# Setup GnuPG.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
# Install a proprietary Nvidia graphics driver.
|
||||
services.xserver.videoDrivers = [ "nvidiaLegacy390" ];
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Additional host-specific program configurations.
|
||||
my.home.programs = {
|
||||
# My personal Git config.
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
# Enable the syntax highlighter with Delta.
|
||||
# https://github.com/dandavison/delta
|
||||
delta.enable = true;
|
||||
|
||||
# Enable Large File Storage.
|
||||
lfs.enable = true;
|
||||
|
||||
@ -160,29 +172,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
my.home.services = {
|
||||
# Unison backup strat.
|
||||
unison = {
|
||||
enable = true;
|
||||
|
||||
pairs.mainbackup =
|
||||
let
|
||||
homeDirectory = "/home/${config.my.username}";
|
||||
backupDrive = "/run/media/${config.my.username}/Seagate Backup Plus Drive";
|
||||
in {
|
||||
roots = [
|
||||
homeDirectory
|
||||
backupDrive
|
||||
];
|
||||
commandOptions = {
|
||||
# Unison may delete the entire stuff so indicate that the other is a mount point.
|
||||
mountpoint = backupDrive;
|
||||
force = homeDirectory;
|
||||
|
||||
# My GnuPG keys.
|
||||
path = ".gnupg .password-store";
|
||||
};
|
||||
};
|
||||
};
|
||||
# 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";
|
||||
};
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ in {
|
||||
config = {
|
||||
# Convenience aliases
|
||||
home-manager.users.${config.my.username} = mkAliasDefinitions options.my.home;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
users.users.${config.my.username} = mkAliasDefinitions options.my.user;
|
||||
my.user.packages = config.my.packages;
|
||||
|
||||
@ -80,14 +81,14 @@ in {
|
||||
'';
|
||||
|
||||
my.home.xdg.configFile = {
|
||||
"zsh/extra.zshrc".text =
|
||||
"zsh/.zshrc".text =
|
||||
let aliasLines = mapAttrsToList (key: value: "alias ${key}=\"${value}\"") config.my.alias;
|
||||
in ''
|
||||
# This file is autogenerated, do not edit it!
|
||||
${concatStringsSep "\n" aliasLines}
|
||||
${config.my.zsh.rc}
|
||||
'';
|
||||
"zsh/extra.zshenv".text = ''
|
||||
"zsh/.zshenv".text = ''
|
||||
# This file is autogenerated, please do not edit it!
|
||||
${config.my.zsh.env}
|
||||
'';
|
||||
|
@ -15,6 +15,8 @@ with lib;
|
||||
hexchat # The ultimate IRC client for neckbeards.
|
||||
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.
|
||||
|
@ -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,8 +14,8 @@ 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.
|
||||
kotlin # It's Java except saner and slimmer.
|
||||
unstable.flutter # It's Electron except saner and slimmer.
|
||||
unstable.kotlin # It's Java except saner and slimmer.
|
||||
];
|
||||
|
||||
# Enable Android Debug Bridge for some device debugging.
|
||||
|
@ -14,10 +14,16 @@ with lib;
|
||||
my.packages = with pkgs; [
|
||||
caddy2 # THE ULTIMATE HTTPS/2 SERVER FOR 'YER GOLFIN' SESSIONS!!!
|
||||
cookiecutter # A project scaffolding tool.
|
||||
direnv # Augment your shell with automatic environment variables loading and unloading.
|
||||
gnumake # Make your life easier with GNU Make.
|
||||
tldr # What manuals should include.
|
||||
stow # Build your symlink farm.
|
||||
tldr # What manuals should include.
|
||||
universal-ctags # Enable fast traveling to your code (assuming written in a supported language).
|
||||
];
|
||||
|
||||
# Augment your shell with automatic environment variables loading and unloading.
|
||||
my.home.programs = {
|
||||
direnv.enable = true;
|
||||
fish.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
./javascript.nix
|
||||
./lisp.nix
|
||||
./math.nix
|
||||
./perl.nix
|
||||
./rust.nix
|
||||
];
|
||||
}
|
||||
|
@ -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 [
|
||||
|
@ -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.emacsUnstable;
|
||||
default = pkgs.emacs;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ with lib;
|
||||
my.packages = with pkgs; [
|
||||
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.
|
||||
# buku # A developer-oriented browser-independent bookmark manager.
|
||||
exa # ls(1) after an exodus.
|
||||
fd # find(1) after a cognitive behavioral therapy.
|
||||
fzf # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
|
||||
|
@ -5,7 +5,6 @@ with lib;
|
||||
{
|
||||
imports = [
|
||||
./base.nix
|
||||
./git.nix
|
||||
./lf.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
@ -1,22 +0,0 @@
|
||||
# modules/shell/git.nix
|
||||
# Git is great, Git is good, and it is not made out of wood.
|
||||
# A version control system with the description of the closet furry behind the Linux kernel as the name.
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options.modules.shell.git = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = types.submodule;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.modules.shell.git.enable {
|
||||
modules.shell.git.config = mkAliasDefinitions options.programs.git;
|
||||
};
|
||||
}
|
@ -17,9 +17,6 @@ with lib;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
histFile = "\$XDG_DATA_HOME/zsh/history";
|
||||
loginShellInit = "
|
||||
export ZDOTDIR=\"\$XDG_CONFIG_HOME/zsh\"
|
||||
";
|
||||
|
||||
# Adding basic version control support to the zsh prompt.
|
||||
# https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh
|
||||
@ -36,5 +33,11 @@ with lib;
|
||||
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
|
||||
my.home.home.file = {
|
||||
".zshenv".text = ''
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
[
|
||||
(self: super: with super; {
|
||||
# defold = (callPackage ./defold.nix {});
|
||||
|
||||
# Add packages from the unstable channel with `pkgs.unstable.$PKG`.
|
||||
unstable = import <nixpkgs-unstable> { inherit config; };
|
||||
})
|
||||
|
||||
(import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz))
|
||||
# The unstable branch of Emacs.
|
||||
# (import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz))
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user