1
Fork 0

Reorganize devshells

This commit is contained in:
Matei Adriel 2023-12-10 23:48:46 +01:00
parent e250b595e3
commit 1dd0a5e0ca
No known key found for this signature in database
44 changed files with 269 additions and 327 deletions

View file

@ -22,21 +22,20 @@ This repo's structure is based on the concept of hosts - individual machines con
## File structure
| Location | Description |
| ---------------------------- | --------------------------------------------------- |
| [common](./common) | Configuration loaded on both nixos and home-manager |
| [devshells](./devshells) | Nix shells |
| [docs](./docs) | Additional documentation regarding my setup |
| [home](./home) | Home manager configurations |
| [hosts/nixos](./hosts/nixos) | Nixos configurations |
| [modules](./modules) | Custom generic/nixos/home-manager modules |
| [overlays](./overlays) | Nix overlays |
| [pkgs](./pkgs) | Nix packages |
| [flake.nix](./flake.nix) | Nix flake entrypoint! |
| [nixpkgs.nix](./nixpkgs.nix) | Pinned nixpkgs for bootstrapping |
| [secrets.nix](./secrets.nix) | Agenix entrypoint |
| [shell.nix](./shell.nix) | Bootstrapping nix shell |
| [stylua.toml](./stylua.toml) | Lua formatter config for the repo |
| Location | Description |
| ---------------------------- | ---------------------------------------------------- |
| [common](./common) | Configuration loaded on both nixos and home-manager |
| [devshells](./devshells) | Nix shells |
| [docs](./docs) | Additional documentation regarding my setup |
| [home](./home) | Home manager configurations |
| [hosts/nixos](./hosts/nixos) | Nixos configurations |
| [modules](./modules) | Custom generic/nixos/home-manager modules |
| [overlays](./overlays) | Nix overlays |
| [pkgs](./pkgs) | Nix packages |
| [flake.nix](./flake.nix) | Nix flake entrypoint! |
| [secrets.nix](./secrets.nix) | Agenix entrypoint |
| [bootstrap](./bootstrap) | Shell for bootstrapping on non flake-enabled systems |
| [stylua.toml](./stylua.toml) | Lua formatter config for the repo |
## Points of interest

View file

@ -1,4 +1,8 @@
# This directory contains modules which can be loaded on both nixos and home-manager!
{
imports = [ ./fonts.nix ./themes ];
# {{{ ad-hoc toggles
satellite.toggles.neovim-nightly.enable = false;
# }}}
}

View file

@ -16,8 +16,8 @@
};
sizes = {
desktop = 14;
applications = 17;
desktop = 13;
applications = 15;
};
};
}

14
devshells/README.md Normal file
View file

@ -0,0 +1,14 @@
# Devshells
Nix shells accessible via `nix develop` (or the legacy `nix-shell`). My projects provide their own shells, but having a few generic ones is still useful for making quick contributions to external projects and the like.
## File structure
| Location | Description |
| ------------------------------ | ----------------------------------------------------------------------------- |
| [bootstrap](./bootstrap) | Shell for bootstrapping on non flake-enabled systems |
| [haskell](./haskell.nix) | Common haskell tooling |
| [purescript](./purescript.nix) | Common purescript tooling |
| [purescript](./lua.nix) | Common lua tooling |
| [purescript](./typst.nix) | Common lua typst |
| [rwtw](./rwtw.nix) | A few randomly cobbled together tools for working on the rain world tech wiki |

View file

@ -1,6 +1,6 @@
# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
# This is useful to avoid using channels when using legacy nix commands
let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
let lock = (builtins.fromJSON (builtins.readFile ../../flake.lock)).nodes.nixpkgs.locked;
in
import (fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";

View file

@ -1,6 +1,5 @@
# Shell for bootstrapping flake-enabled nix and home-manager
# You can enter it through 'nix develop' or (legacy) 'nix-shell'
{ pkgs ? (import ./nixpkgs.nix) { } }:
{ pkgs ? (import ./nixpkgs.nix) { }, ... }:
pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";

View file

@ -4,5 +4,6 @@ args: {
rwtw = import ./rwtw.nix args;
typst = import ./typst.nix args;
lua = import ./lua.nix args;
bootstrap = import ./bootstrap/shell.nix args;
}

View file

@ -456,28 +456,6 @@
"type": "github"
}
},
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1695052866,
"narHash": "sha256-agn7F9Oww4oU6nPiw+YiYI9Xb4vOOE73w8PAoBRP4AA=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "e3f41832680801d0ee9e2ed33eb63af398b090e9",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"dirforest": {
"flake": false,
"locked": {
@ -602,22 +580,6 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@ -633,7 +595,7 @@
"type": "github"
}
},
"flake-compat_3": {
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -649,7 +611,7 @@
"type": "github"
}
},
"flake-compat_4": {
"flake-compat_3": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
@ -664,6 +626,22 @@
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
@ -728,22 +706,6 @@
"type": "github"
}
},
"flake-compat_9": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -1849,7 +1811,7 @@
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake",
@ -1914,6 +1876,26 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1702177733,
"narHash": "sha256-lr3hkmmuqDFPj3i41cHpaALF3Txo3kxsJ3L6jZLujJ8=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "58ecd98e27e27fcbb27a51a588555c828b1ec56e",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-index-database",
"type": "github"
}
},
"nixd": {
"inputs": {
"flake-parts": "flake-parts_5",
@ -1933,26 +1915,6 @@
"type": "github"
}
},
"nixinate": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1688141737,
"narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=",
"owner": "matthewcroughan",
"repo": "nixinate",
"rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9",
"type": "github"
},
"original": {
"owner": "matthewcroughan",
"repo": "nixinate",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1701656485,
@ -2150,7 +2112,7 @@
},
"nixpkgs-wayland": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_3",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": [
@ -2474,7 +2436,7 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_3",
@ -2496,7 +2458,7 @@
},
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_7",
"gitignore": "gitignore_2",
"nixpkgs": "nixpkgs_11",
@ -2518,7 +2480,7 @@
},
"pre-commit-hooks_3": {
"inputs": {
"flake-compat": "flake-compat_6",
"flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_8",
"gitignore": "gitignore_3",
"nixpkgs": "nixpkgs_12",
@ -2540,7 +2502,7 @@
},
"pre-commit-hooks_4": {
"inputs": {
"flake-compat": "flake-compat_8",
"flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_10",
"gitignore": "gitignore_4",
"nixpkgs": "nixpkgs_14",
@ -2562,7 +2524,7 @@
},
"pre-commit-hooks_5": {
"inputs": {
"flake-compat": "flake-compat_9",
"flake-compat": "flake-compat_8",
"flake-utils": "flake-utils_11",
"gitignore": "gitignore_5",
"nixpkgs": "nixpkgs_15",
@ -2604,7 +2566,6 @@
"anyrun": "anyrun",
"anyrun-nixos-options": "anyrun-nixos-options",
"catppuccin-base16": "catppuccin-base16",
"deploy-rs": "deploy-rs",
"disko": "disko",
"firefox-addons": "firefox-addons",
"grub2-themes": "grub2-themes",
@ -2616,8 +2577,8 @@
"intray": "intray",
"matui": "matui",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database",
"nixd": "nixd",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2",
@ -2936,7 +2897,7 @@
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat_7",
"flake-compat": "flake-compat_6",
"home-manager": [
"home-manager"
],
@ -3313,21 +3274,6 @@
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"validity": {
"flake": false,
"locked": {

208
flake.nix
View file

@ -3,111 +3,66 @@
# {{{ Inputs
inputs = {
# Nixpkgs
# {{{ Nixpkgs instances
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# NUR
# }}}
# {{{ Additional package repositories
nur.url = "github:nix-community/NUR";
# Firefox addons
firefox-addons.url = "git+https://gitlab.com/rycee/nur-expressions?dir=pkgs/firefox-addons";
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
# Agenix
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
# Homeage
homeage.url = "github:jordanisaacs/homeage";
homeage.inputs.nixpkgs.follows = "nixpkgs";
# Grub2 themes
grub2-themes.url = "github:vinceliuice/grub2-themes";
grub2-themes.inputs.nixpkgs.follows = "nixpkgs";
# Stylix
stylix.url = "github:danth/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
stylix.inputs.home-manager.follows = "home-manager";
# Catpuccin base16 color schemes
catppuccin-base16.url = "github:catppuccin/base16";
catppuccin-base16.flake = false;
# Rosepine base16 color schemes
rosepine-base16.url = "github:edunfelt/base16-rose-pine-scheme";
rosepine-base16.flake = false;
# Impermanence
impermanence.url = "github:nix-community/impermanence";
# Slambda
slambda.url = "github:Mateiadrielrafael/slambda";
slambda.inputs.nixpkgs.follows = "nixpkgs";
# Neovim nightly
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland (available in nix unstable only atm)
hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland-contrib
hyprland-contrib.url = "github:hyprwm/contrib";
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Contains a bunch of wayland stuff not on nixpkgs
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs";
# Firefox addons
firefox-addons.url = "git+https://gitlab.com/rycee/nur-expressions?dir=pkgs/firefox-addons";
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
# }}}
# {{{ Nix-related tooling
# {{{ Secret management
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
homeage.url = "github:jordanisaacs/homeage";
homeage.inputs.nixpkgs.follows = "nixpkgs";
# }}}
# {{{ Storage
impermanence.url = "github:nix-community/impermanence";
# Declarative partitioning
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# }}}
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
# Nix language server
# [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation)
# tell me not to override the nixpkgs input.
nixd.url = "github:nix-community/nixd";
# }}}
# {{{ Standalone software
# {{{ Nightly versions of things
hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
# Spotify client
spicetify-nix.url = "github:the-argus/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
# Disko
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# Deploy-rs
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
# Nixinate
nixinate.url = "github:matthewcroughan/nixinate";
nixinate.inputs.nixpkgs.follows = "nixpkgs";
# Anyrun
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
# Anyrun nixos options
anyrun-nixos-options.url = "github:n3oney/anyrun-nixos-options";
anyrun-nixos-options.inputs.nixpkgs.follows = "nixpkgs";
# Nixos hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Matrix TUi
matui.url = "github:pkulak/matui";
matui.inputs.nixpkgs.follows = "nixpkgs";
# Wezterm nightly
# https://github.com/happenslol/wezterm/blob/add-nix-flake/nix/flake.nix
wezterm.url = "github:happenslol/wezterm/add-nix-flake?dir=nix";
wezterm.inputs.nixpkgs.follows = "nixpkgs";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs";
# }}}
# {{{ Self management
# Smos
smos.url = "github:NorfairKing/smos";
@ -125,6 +80,43 @@
tickler.inputs.nixpkgs.follows = "nixpkgs";
tickler.inputs.intray.follows = "intray";
# }}}
# {{{ Anyrun
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
anyrun-nixos-options.url = "github:n3oney/anyrun-nixos-options";
anyrun-nixos-options.inputs.nixpkgs.follows = "nixpkgs";
# }}}
matui.url = "github:pkulak/matui";
matui.inputs.nixpkgs.follows = "nixpkgs";
# Spotify client with theming support
spicetify-nix.url = "github:the-argus/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
# Keyboard configuration (to be replaced by kanata at some point)
slambda.url = "github:Mateiadrielrafael/slambda";
slambda.inputs.nixpkgs.follows = "nixpkgs";
# }}}
# {{{ Theming
# Grub2 themes
grub2-themes.url = "github:vinceliuice/grub2-themes";
grub2-themes.inputs.nixpkgs.follows = "nixpkgs";
# Stylix
stylix.url = "github:danth/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
stylix.inputs.home-manager.follows = "home-manager";
# Catpuccin base16 color schemes
catppuccin-base16.url = "github:catppuccin/base16";
catppuccin-base16.flake = false;
# Rosepine base16 color schemes
rosepine-base16.url = "github:edunfelt/base16-rose-pine-scheme";
rosepine-base16.flake = false;
# }}}
};
# }}}
@ -152,22 +144,7 @@
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; } // {
nix-tree = (pkgs.nix-tree.overrideAttrs (oldAttrs: {
patches =
(oldAttrs.patches or [])
++ [
(pkgs.fetchpatch {
url = "https://github.com/utdemir/nix-tree/pull/68.patch";
hash = "sha256-70Xo88ZWzWUYM0qxbW64kYaVwHaYkS2dQWmBGCkL0oA=";
})
(pkgs.fetchpatch {
url = "https://github.com/utdemir/nix-tree/pull/69.patch";
hash = "sha256-8LdOKU2pc0tojmquCEqjnovkG3hD7YdTQoC4WSawdAQ=";
})
];
}));
}
in import ./pkgs { inherit pkgs; }
);
# }}}
# {{{ Bootstrapping and other pinned devshells
@ -176,11 +153,9 @@
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
default = import ./shell.nix { inherit pkgs; };
args = { inherit pkgs; } // specialArgs system;
devshells = import ./devshells args;
in
devshells // { inherit default; });
./devshells args);
# }}}
# {{{ Overlays and modules
# Custom packages and modifications, exported as overlays
@ -209,12 +184,6 @@
stylix.homeManagerIntegration.followSystem = false;
stylix.homeManagerIntegration.autoImport = false;
_module.args.nixinate = {
host = hostname;
sshUser = "adrielus";
buildOn = "remote";
};
}
./hosts/nixos/${hostname}
@ -284,27 +253,6 @@
};
};
# }}}
# {{{ Deploy-rs nodes
deploy.nodes =
let deployNixos = hostname: {
user = "root";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname};
};
in
{
lapetus.hostname = "lapetus";
lapetus.sshOpts = [ "-t" ];
lapetus.profiles.system = deployNixos "lapetus";
};
# }}}
# {{{ Checks
# This is highly advised, and will prevent many possible mistakes
# Taken from [the deploy-rs docs](https://github.com/serokell/deploy-rs).
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
# }}}
# # {{{ Apps
# apps.x86_64-linux = (inputs.nixinate.nixinate.x86_64-linux self);
# # }}}
};
# {{{ Caching and whatnot

View file

@ -34,7 +34,6 @@
# }}}
# {{{ Misc
ranger # Terminal file explorer
comma # Intstall and run programs by sticking a , before them
bc # Calculator
ouch # Unified compression / decompression tool
mkpasswd # Hash passwords

View file

@ -4,8 +4,7 @@ in
{
home.packages = [ package ];
# TODO: generalize alias creation to all shells
programs.fish.shellAliases =
home.shellAliases =
let eza = lib.getExe package;
in
rec {

View file

@ -1,4 +1,6 @@
{ pkgs, ... }: {
# TODO: use `delta` as a pager, as highlighted here
# https://github.com/lilyinstarlight/foosteros/blob/main/config/base.nix#L163
programs.git = {
enable = true;
package = pkgs.gitFull;
@ -6,6 +8,7 @@
userName = "Matei Adriel";
userEmail = "rafaeladriel11@gmail.com";
# {{{ Globally ignored files
ignores = [
# Syncthing
".stfolder"
@ -22,7 +25,8 @@
# it have it commited).
"hie.yaml"
];
# }}}
# {{{ Aliases
aliases = {
# Print history nicely
graph = "log --decorate --oneline --graph";
@ -30,6 +34,7 @@
# Print last commit's hash
hash = "log -1 --format='%H'";
};
# }}}
extraConfig = {
github.user = "Mateiadrielrafael";
@ -38,6 +43,7 @@
init.defaultBranch = "main";
rebase.autoStash = true;
# {{{ Signing
# Sign commits using ssh
gpg.format = "ssh";
user.signingkey = "~/.ssh/id_ed25519.pub";
@ -45,12 +51,14 @@
# Sign everything by default
commit.gpgsign = true;
tag.gpgsign = true;
# }}}
};
};
# Github cli
# {{{ Github cli
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
};
# }}}
}

View file

@ -0,0 +1,5 @@
{
programs.nix-index-database.comma.enable = true;
programs.nix-index.enable = true;
programs.command-not-found.enable = false;
}

View file

@ -1,5 +1,3 @@
{
programs.starship = {
enable = true;
};
}
programs.starship.enable = true;
}

View file

@ -6,5 +6,5 @@
];
};
home.packages = with pkgs; [ wakatime ];
home.packages = [ pkgs.wakatime ];
}

View file

@ -127,7 +127,10 @@ let
# }}}
# {{{ Clients
neovim = wrapClient {
base = pkgs.neovim;
base =
if config.satellite.toggles.neovim-nightly.enable
then pkgs.neovim-nightly
else pkgs.neovim;
name = "nvim";
};

View file

@ -2,28 +2,29 @@
let
# {{{ Imports
imports = [
# {{{ flake inputs
inputs.stylix.homeManagerModules.stylix
inputs.homeage.homeManagerModules.homeage
inputs.nur.nixosModules.nur
inputs.impermanence.nixosModules.home-manager.impermanence
inputs.spicetify-nix.homeManagerModules.spicetify
inputs.anyrun.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
# {{{ self management
# NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion!
inputs.intray.homeManagerModules.x86_64-linux.default
inputs.smos.homeManagerModules.x86_64-linux.default
# }}}
# }}}
# {{{ global configuration
./features/cli
./features/persistence.nix
../common
# }}}
];
# }}}
# {{{ Overlays
overlays = [
# inputs.neovim-nightly-overlay.overlay
];
# }}}
in
{
# Import all modules defined in modules/home-manager
@ -32,31 +33,30 @@ in
# {{{ Nixpkgs
nixpkgs = {
# Add all overlays defined in the overlays directory
overlays = builtins.attrValues outputs.overlays ++ overlays;
overlays = builtins.attrValues outputs.overlays ++
lib.lists.optional
config.satellite.toggles.neovim-nightly.enable
inputs.neovim-nightly-overlay.overlay;
# Allow unfree packages
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
config.allowUnfree = true;
};
# }}}
# Nicely reload system units when changing configs
systemd.user.startServices = lib.mkForce "sd-switch";
# Enable the home-manager and git clis
# {{{ Enable the home-manager and git clis
programs = {
home-manager.enable = true;
git.enable = true;
};
# Set reasonable defaults for some settings
# }}}
# {{{ Set reasonable defaults for some settings
home = {
username = lib.mkDefault "adrielus";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.05";
};
# }}}
# {{{ Ad-hoc settings
# Nicely reload system units when changing configs
systemd.user.startServices = lib.mkForce "sd-switch";
# Where homeage should look for our ssh key
homeage.identityPaths = [ "~/.ssh/id_ed25519" ];
@ -64,18 +64,18 @@ in
# Allow root to read persistent files from this user.
home.persistence."/persist/home/adrielus".allowOther = true;
# {{{ Ad-hoc stylix targets
stylix.targets.xresources.enable = true;
# }}}
# }}}
# {{{ Xdg user directories
# Set the xdg env vars
xdg.enable = true;
# {{{ Xdg user directories
xdg.userDirs = {
enable = lib.mkDefault true;
createDirectories = lib.mkDefault false;
extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
# }}}
# {{{ Ad-hoc stylix targets
# TODO: is this useful outside xorg?
stylix.targets.xresources.enable = true;
# }}}
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, lib, config, ... }: {
imports = [
./global.nix
@ -8,10 +8,9 @@
./features/desktop/discord
./features/cli/productivity
./features/cli/pass.nix
./features/neovim
# ./features/xorg/xmonad.nix
./features/cli/nix-index.nix
./features/wayland/hyprland
./features/neovim
];
# Arbitrary extra packages

View file

@ -0,0 +1,8 @@
{
programs.htop = {
enable = true;
settings = {
tree_view = true;
};
};
}

View file

@ -1,8 +1,9 @@
# Configuration pieces included on all (nixos) hosts
{ inputs, outputs, ... }:
{ inputs, lib, config, outputs, ... }:
let
# {{{ Imports
imports = [
# {{{ flake inputs
# inputs.hyprland.nixosModules.default
inputs.disko.nixosModules.default
inputs.agenix.nixosModules.default
@ -11,20 +12,26 @@ let
inputs.impermanence.nixosModule
inputs.slambda.nixosModule
# {{{ self management
# NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion!
inputs.intray.nixosModules.x86_64-linux.default
inputs.smos.nixosModules.x86_64-linux.default
inputs.tickler.nixosModules.x86_64-linux.default
./persistence.nix
# }}}
# }}}
# {{{ global configuration
./cli/fish.nix
./cli/htop.nix
./services/openssh.nix
./services/tailscale.nix
./nix.nix
./openssh.nix
./fish.nix
./locale.nix
./persistence.nix
./wireless
./tailscale.nix
../../../../common
# }}}
];
# }}}
in
@ -32,6 +39,7 @@ in
# Import all modules defined in modules/nixos
imports = builtins.attrValues outputs.nixosModules ++ imports;
# {{{ ad-hoc options
# Allow non root users to specify the "allowOther" option.
# See [the imperanence readme](https://github.com/nix-community/impermanence#home-manager)
programs.fuse.userAllowOther = true;
@ -39,14 +47,19 @@ in
# Customize tty colors
stylix.targets.console.enable = true;
# Reduce the amount of storage spent for logs
services.journald.extraConfig = lib.mkDefault ''
SystemMaxUse=256M
'';
# }}}
nixpkgs = {
# Add all overlays defined in the overlays directory
overlays = builtins.attrValues outputs.overlays ++ [
# inputs.neovim-nightly-overlay.overlay
];
overlays = builtins.attrValues outputs.overlays ++
lib.lists.optional
config.satellite.toggles.neovim-nightly.enable
inputs.neovim-nightly-overlay.overlay;
config = {
allowUnfree = true;
};
config.allowUnfree = true;
};
}

View file

@ -1,5 +1,5 @@
# The main configuration is specified by home-manager
{ inputs, pkgs, ... }: {
{ pkgs, ... }: {
programs.hyprland.enable = true;
programs.hyprland.package = pkgs.hyprland;
}

View file

@ -3,10 +3,10 @@
../common/global
../common/users/guest.nix
../common/optional/greetd.nix
../common/optional/pipewire.nix
../common/optional/lightdm.nix
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
../common/optional/desktop/xdg-portal.nix
../common/optional/wayland/hyprland.nix
];
# Usually included in the hardware-configuration

View file

@ -2,7 +2,7 @@
imports = [
../common/global
../common/users/adrielus.nix
../common/optional/slambda.nix
../common/optional/services/slambda.nix
./services/syncthing.nix
./filesystems

View file

@ -1,5 +1,5 @@
{
imports = [ ../../common/optional/syncthing.nix ];
imports = [ ../../common/optional/services/syncthing.nix ];
networking.firewall.allowedTCPPorts = [ 8384 ];

View file

@ -1,31 +1,30 @@
{ lib, ... }: {
# {{{ Imports
imports = [
../common/global
../common/users/adrielus.nix
../common/optional/pipewire.nix
../common/optional/greetd.nix
# ../common/optional/xmonad
# ../common/optional/lightdm.nix
../common/optional/steam.nix
../common/optional/slambda.nix
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
../common/optional/quietboot.nix
# ../common/optional/gitea.nix
../common/optional/desktop/steam.nix
../common/optional/services/slambda.nix
../common/optional/desktop/xdg-portal.nix
../common/optional/wayland/hyprland.nix
./hardware
./services/syncthing.nix
./boot.nix
./services/syncthing.nix
];
# Machine ids
networking.hostName = "tethys";
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
# }}}
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
# {{{ Machine ids
networking.hostName = "tethys";
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
# }}}
# {{{ A few ad-hoc hardware settings
hardware.enableAllFirmware = true;
hardware.opengl.enable = true;

View file

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, modulesPath, ... }:
{
imports =

View file

@ -9,7 +9,7 @@ let
};
in
{
imports = [ ../../common/optional/syncthing.nix ];
imports = [ ../../common/optional/services/syncthing.nix ];
services.syncthing.settings.folders = {
"mythical-vault" = {

View file

@ -47,8 +47,8 @@
popups = config.stylix.opacity.popups < 1.0;
};
rounding = {
enable = toString config.satellite.theming.rounding.enable;
radius = toString config.satellite.theming.rounding.radius;
enable = config.satellite.theming.rounding.enable;
radius = config.satellite.theming.rounding.radius;
};
};
in

View file

@ -1,7 +1,7 @@
{ pkgs ? import <nixpkgs> { }
}:
# See [this blog post](http://blog.sidhartharya.com/using-custom-plymouth-theme-on-nixos/)
let mkTheme = { themeName, pack }: pkgs.stdenv.mkDerivation rec {
let mkTheme = { themeName, pack }: pkgs.stdenv.mkDerivation {
pname = "adi1090x-plymouth-${themeName}";
version = "0.0.1";

View file

@ -1,5 +1,5 @@
{ pkgs, lib, ... }:
let vimclip = pkgs.stdenv.mkDerivation rec {
let vimclipRaw = pkgs.stdenv.mkDerivation rec {
name = "vimclip";
rev = "52003cc31e6e1d20550cdf6b7d3bf1a019a34fa0";
@ -26,5 +26,5 @@ pkgs.writeShellScriptBin "vimclip" ''
export VIMCLIP_CLIPBOARD_COMMAND=${pkgs.xsel}/bin/xsel
fi
${lib.getExe vimclip}
${lib.getExe vimclipRaw}
''