mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-25 02:03:51 -08:00
Compare commits
10 commits
21f836924c
...
13182e0246
Author | SHA1 | Date | |
---|---|---|---|
13182e0246 | |||
607967a6b4 | |||
e05d1462c1 | |||
fbd3fe76a3 | |||
b6edefdbfe | |||
47a2603989 | |||
31fef6ddc3 | |||
2a87f4d35d | |||
052afed2ec | |||
f387a80bdc |
8 changed files with 109 additions and 43 deletions
2
.prettierrc.toml
Normal file
2
.prettierrc.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
lineWidth = 72
|
||||||
|
proseWrap = "always"
|
100
README.md
100
README.md
|
@ -1,60 +1,104 @@
|
||||||
# liminalOS
|
# liminalOS
|
||||||
|
|
||||||
This is a repository that implements liminalOS, my personal Linux distribution based on [NixOS](https://nixos.org/).
|
This is a repository that implements liminalOS, my personal Linux distribution
|
||||||
|
based on [NixOS](https://nixos.org/).
|
||||||
|
|
||||||
Traditionally, we expect to configure each of our computers separately. We have a general idea of the programs, settings, and minor tweaks that we like
|
<!-- prettier-ignore -->
|
||||||
to make on every computer, but we have to manually set all of these up. Many Unix hackers have therefore created sprawling installation scripts to manage
|
> **lim·i·nal**
|
||||||
their various systems so they can be deployed in a predictable manner each time. Of course, scripts are still heavily dependent on environment and prone to breakage.
|
|
||||||
When they inevitably break, the system is left in a malformed state, where some setup actions have been taken and others have not, and it is up to the system
|
|
||||||
administrator to fix the failing script and ensure the system is set up properly.
|
|
||||||
|
|
||||||
In essence, the primary failure of setup scripts is that they are _imperative_ - they must specify precisely _how_ to set up the system, down to minute details, whereas in a _declarative_ approach, the user can simply specify what the system _should look like_, and abstractions take care of the _how_.
|
|
||||||
|
|
||||||
NixOS provides the key tools for reliably deploying systems - namely, a _purely functional_ package manager that's reproducible by default and
|
|
||||||
the necessary abstractions needed for a declarative system configuration. liminalOS is my set of opinionated NixOS and `home-manager` modules that aim to
|
|
||||||
set up a computing environment _independent of the host_. This makes it possible for me to share common configuration between a multitude of entirely distinct machines,
|
|
||||||
including an `x86_64` desktop, an `x86_64` laptop, an Apple Silicon Macbook running NixOS `aarch64` using [Asahi Linux](https://asahilinux.org/), and the same Macbook running macOS with `nix-darwin`, sharing `home-manager` configuration with NixOS. Specific configuration necessary to adjust hardware-specific details
|
|
||||||
between each machines are isolated to the [hosts](./hosts) directory.
|
|
||||||
|
|
||||||
> **lim·i·nal**
|
|
||||||
>
|
|
||||||
> 1. between or belonging to two different places, states, etc.
|
> 1. between or belonging to two different places, states, etc.
|
||||||
|
|
||||||
The goal of liminalOS is to allow my computing environment to exist in different places at the same time, without the twiddling and settings syncing
|
The goal of liminalOS is to allow my computing environment to exist in different
|
||||||
and minor disparities that arise from traditional approaches. This works exceptionally well, demonstrated by the fact that I have the exact same environment across
|
places (computers) at the same time, without the minor disparities, issues, and
|
||||||
three separate machines, spanning two completely different CPU architectures.
|
inconsistencies that arise from traditional approaches such as scripting. This
|
||||||
|
works exceptionally well, demonstrated by the fact that I have the exact same
|
||||||
|
environment across three separate machines, spanning two completely different
|
||||||
|
CPU architectures.
|
||||||
|
|
||||||
|
Traditionally, we expect to configure each of our computers separately. We have
|
||||||
|
a general idea of the programs, settings, and minor tweaks that we like to make
|
||||||
|
on every computer, but we have to manually set all of these up. Many Unix
|
||||||
|
hackers have thus created sprawling installation scripts to manage their various
|
||||||
|
systems so they can be deployed in a predictable manner each time. Of course,
|
||||||
|
scripts are still heavily dependent on environment and prone to breakage. When
|
||||||
|
they inevitably break, the system is left in a malformed state, where some setup
|
||||||
|
actions have been taken and others have not, and it is up to the system
|
||||||
|
administrator to fix the failing script and ensure the system is set up
|
||||||
|
properly. Also, updating existing machines and rolling back to previous states
|
||||||
|
is a separate, even more difficult issue to solve with this approach.
|
||||||
|
|
||||||
|
In essence, the primary failure of setup scripts is that they are _imperative_ -
|
||||||
|
they must specify precisely _how_ to set up the system, down to minute details,
|
||||||
|
whereas in a _declarative_ approach, the user can simply specify what the system
|
||||||
|
_should look like_, and abstractions take care of the _how_. This is what NixOS
|
||||||
|
does, and it gives you remote syncing, versioning (via `git`), and rollbacks
|
||||||
|
_for free_.
|
||||||
|
|
||||||
|
NixOS provides the key tools for reliably deploying systems - namely, a _purely
|
||||||
|
functional_ package manager that's reproducible by default and the necessary
|
||||||
|
abstractions needed for a declarative system configuration. liminalOS is my set
|
||||||
|
of opinionated NixOS and `home-manager` modules that aim to set up a computing
|
||||||
|
environment _independent of the host_. This makes it possible for me to share
|
||||||
|
common configuration between a multitude of entirely distinct machines,
|
||||||
|
including an `x86_64` desktop, an `x86_64` laptop, an Apple Silicon Macbook
|
||||||
|
running NixOS `aarch64` using [Asahi Linux](https://asahilinux.org/), and the
|
||||||
|
same Macbook running macOS with `nix-darwin`, sharing `home-manager`
|
||||||
|
configuration with NixOS. Specific configuration necessary to adjust
|
||||||
|
hardware-specific details between each machines are isolated to the
|
||||||
|
[hosts](./hosts) directory.
|
||||||
|
|
||||||
## Installation guide
|
## Installation guide
|
||||||
|
|
||||||
TBD. May use `deploy-rs` or the in-house [dartgun](https://github.com/youwen5/dartgun) tool for easy deployment.
|
TBD. May use `deploy-rs` or the in-house
|
||||||
|
[dartgun](https://github.com/youwen5/dartgun) tool for easy deployment.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### This looks like a collection of NixOS configuration files and modules. What makes it a distinct distribution?
|
### This looks like a collection of NixOS configuration files and modules. What makes it a distinct distribution?
|
||||||
|
|
||||||
Most Linux[^1] users will agree that any self-respecting distribution must include at least the following: installer, package manager, and some set of default packages. Therefore, anything that implements the aforementioned items must also be a Linux distribution.
|
Most Linux[^1] users will agree that any self-respecting distribution must
|
||||||
|
include at least the following: installer, package manager, and some set of
|
||||||
|
default packages. Therefore, anything that implements the aforementioned items
|
||||||
|
must also be a Linux distribution.
|
||||||
|
|
||||||
liminalOS comes with the Nix package manager (nobody said you need a _unique_ package manager - Ubuntu and Debian are distinct distributions yet both use `apt`), a custom desktop environment composed of Waybar, Hyprland, rofi, as well as various applications installed by default, and [the means to generate an installer](https://nixos.wiki/wiki/Creating_a_NixOS_live_CD). Therefore, liminalOS is a Linux distribution. QED.[^2]
|
liminalOS comes with the Nix package manager (nobody said you need a _unique_
|
||||||
|
package manager - Ubuntu and Debian are distinct distributions yet both use
|
||||||
|
`apt`), a custom desktop environment comprised of Waybar, Hyprland, rofi, as
|
||||||
|
well as various applications installed by default, and
|
||||||
|
[the means to generate an installer](https://nixos.wiki/wiki/Creating_a_NixOS_live_CD).
|
||||||
|
Therefore, liminalOS is a Linux distribution. QED.[^2]
|
||||||
|
|
||||||
### Should I actually install this?
|
### Should I actually install this?
|
||||||
|
|
||||||
No. You should instead use the modules as configuration examples if you need them as they are heavily customized for my needs, which are not the same as yours.
|
No. You should instead use the modules as configuration examples if you need
|
||||||
|
them as they are heavily customized for my needs, which are not the same as
|
||||||
|
yours.
|
||||||
|
|
||||||
## Hosts
|
## Hosts
|
||||||
|
|
||||||
The modules in liminalOS are designed to be utilized by a wide variety of machine configurations, including via nix-darwin on macOS. To that end, modules are organized by operating system (darwin vs. linux), architecture (x86_64 vs. aarch-64), and form factor (desktop vs laptop). Anything that is agnostic of these distinctions is considered a "common module" and allows configuration to be shared between the various host types. This generally includes core programs like CLI tools, the window manager, etc.
|
The modules in liminalOS are designed to be utilized by a wide variety of
|
||||||
|
machine configurations, including via nix-darwin on macOS. To that end, modules
|
||||||
|
are organized by operating system (darwin vs. linux), architecture (x86_64 vs.
|
||||||
|
aarch-64), and form factor (desktop vs laptop). Anything that is agnostic of
|
||||||
|
these distinctions is considered a "common module" and allows configuration to
|
||||||
|
be shared between the various host types. This generally includes core programs
|
||||||
|
like CLI tools, the window manager, etc.
|
||||||
|
|
||||||
The [flake.nix](/flake.nix) currently contains configuration for three hosts:
|
The [flake.nix](/flake.nix) currently contains my configuration for four hosts:
|
||||||
|
|
||||||
| Hostname | Description |
|
| Hostname | Description |
|
||||||
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| "callisto" | a Macbook Pro M1 (2021) running under Asahi Linux. Imports the laptop module sets as well as the core NixOS module sets. |
|
| "callisto" | a Macbook Pro M1 (2021) running under Asahi Linux. Imports the laptop module sets as well as the core NixOS module sets. |
|
||||||
| "demeter" | a custom desktop with an i7-13700KF and RTX 4080. Imports the desktop module, the core NixOS modules, and additionally the gaming module. |
|
| "demeter" | a custom desktop with an i7-13700KF and RTX 4080. Imports the desktop module, the core NixOS modules, and additionally the gaming module. |
|
||||||
| "phobos" | Macbook Pro M1 (2021) running macOS with nix-darwin. Imports the core home-manager module as well as some darwin-specific modules for window managers and the like. |
|
| "phobos" | Macbook Pro M1 (2021) running macOS with nix-darwin. Imports the core home-manager module as well as some darwin-specific modules for window managers and the like. |
|
||||||
|
| "adrastea" | Razer Blade 14 (2021) with RTX 3070. Imports the laptop module, the core NixOS modules, and the gaming module. |
|
||||||
|
|
||||||
[^1]: also known as GNU/Linux, GNU+Linux, Freedesktop/systemd/musl/busybox Linux, Linux+friends, etc
|
[^1]:
|
||||||
|
also known as GNU/Linux, GNU+Linux, Freedesktop/systemd/musl/busybox Linux,
|
||||||
|
Linux+friends, etc
|
||||||
|
|
||||||
[^2]: although this is not actually how the converse works, the rigor-hungry mathematicians reading can cry about it.
|
[^2]:
|
||||||
|
although this is not actually how the converse works, the rigor-hungry
|
||||||
|
mathematicians reading can cry about it.
|
||||||
|
|
||||||
## Keybinds
|
## Keybinds
|
||||||
|
|
||||||
|
|
30
flake.lock
30
flake.lock
|
@ -24,11 +24,11 @@
|
||||||
},
|
},
|
||||||
"bleedingpkgs": {
|
"bleedingpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723402691,
|
"lastModified": 1723688039,
|
||||||
"narHash": "sha256-XZFMIWgGzdnHzTVxJ+suHRro+2boj3yBPNAVS3xQRRk=",
|
"narHash": "sha256-/QVv3/9gnukdsUZRR5eJQLhcuXBCLe0rGrF5O6w6jA0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "df09a0b48e08dff76d8847406884ef84c9d9b4c5",
|
"rev": "1ad352fd9ea96cebc7862782fa8d0d295c68ff15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -257,11 +257,11 @@
|
||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723398597,
|
"lastModified": 1723687108,
|
||||||
"narHash": "sha256-7hWKUGb0l8N3xHMiuiukTNdf9D7aj7UM4EAYCrtSpP0=",
|
"narHash": "sha256-yS7kiSJyJzd+mpzAQ1ntrfejGICEhScev6NA0F5rsDE=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "672769ef7a4aee91ed12248345785998d4169ace",
|
"rev": "5feec29994320afeeb5a1a74860a57d9f845bc30",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -273,11 +273,11 @@
|
||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723402347,
|
"lastModified": 1723681288,
|
||||||
"narHash": "sha256-2oTBjifhBSIF9KCyeth6yUTdf3Yuv4JtxojXOV4s9I4=",
|
"narHash": "sha256-uU0etusCLcip1KNB2FA8/Zpi+hGwAzKX9X32fdFnTNw=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "2f5175a2c8dd4249955d8df4b2b74332e646bb75",
|
"rev": "5bf3c1c505315f0adff00ce8921169fbf7df217c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -454,11 +454,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723175592,
|
"lastModified": 1723362943,
|
||||||
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
|
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -554,11 +554,11 @@
|
||||||
},
|
},
|
||||||
"stablepkgs": {
|
"stablepkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723282977,
|
"lastModified": 1723556749,
|
||||||
"narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
|
"narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
"rev": "4a92571f9207810b559c9eac203d1f4d79830073",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -80,6 +80,13 @@
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
|
oh-my-posh disable notice
|
||||||
'';
|
'';
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -208,6 +208,10 @@
|
||||||
disable_splash_rendering = true;
|
disable_splash_rendering = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
hide_on_key_press = true;
|
||||||
|
};
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
rounding = "10";
|
rounding = "10";
|
||||||
drop_shadow = "false";
|
drop_shadow = "false";
|
||||||
|
|
|
@ -8,5 +8,6 @@ in {
|
||||||
lutris
|
lutris
|
||||||
wine
|
wine
|
||||||
sbctl
|
sbctl
|
||||||
|
r2modman
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
shell_integration = "enabled";
|
shell_integration = "enabled";
|
||||||
enable_audio_bell = "no";
|
enable_audio_bell = "no";
|
||||||
background_opacity = "0.8";
|
background_opacity = "0.8";
|
||||||
|
allow_remote_control = "socket-only";
|
||||||
|
listen_on = "unix:/tmp/kitty";
|
||||||
|
action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||||
|
};
|
||||||
|
keybindings = {
|
||||||
|
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||||
|
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue