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

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

View file

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

View file

@ -16,8 +16,8 @@
}; };
sizes = { sizes = {
desktop = 14; desktop = 13;
applications = 17; 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 # 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 # 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 in
import (fetchTarball { import (fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; 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 # 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 { pkgs.mkShell {
# Enable experimental features without having to specify the argument # Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes"; NIX_CONFIG = "experimental-features = nix-command flakes";

View file

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

View file

@ -456,28 +456,6 @@
"type": "github" "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": { "dirforest": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -602,22 +580,6 @@
} }
}, },
"flake-compat": { "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, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1673956053,
@ -633,7 +595,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -649,7 +611,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": { "flake-compat_3": {
"locked": { "locked": {
"lastModified": 1688025799, "lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
@ -664,6 +626,22 @@
"type": "github" "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-compat_5": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -728,22 +706,6 @@
"type": "github" "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": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -1849,7 +1811,7 @@
}, },
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"hercules-ci-effects": "hercules-ci-effects", "hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake", "neovim-flake": "neovim-flake",
@ -1914,6 +1876,26 @@
"type": "github" "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": { "nixd": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_5",
@ -1933,26 +1915,6 @@
"type": "github" "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": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1701656485, "lastModified": 1701656485,
@ -2150,7 +2112,7 @@
}, },
"nixpkgs-wayland": { "nixpkgs-wayland": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_3",
"lib-aggregate": "lib-aggregate", "lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs", "nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": [ "nixpkgs": [
@ -2474,7 +2436,7 @@
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
@ -2496,7 +2458,7 @@
}, },
"pre-commit-hooks_2": { "pre-commit-hooks_2": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_7",
"gitignore": "gitignore_2", "gitignore": "gitignore_2",
"nixpkgs": "nixpkgs_11", "nixpkgs": "nixpkgs_11",
@ -2518,7 +2480,7 @@
}, },
"pre-commit-hooks_3": { "pre-commit-hooks_3": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_6", "flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_8",
"gitignore": "gitignore_3", "gitignore": "gitignore_3",
"nixpkgs": "nixpkgs_12", "nixpkgs": "nixpkgs_12",
@ -2540,7 +2502,7 @@
}, },
"pre-commit-hooks_4": { "pre-commit-hooks_4": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_8", "flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_10", "flake-utils": "flake-utils_10",
"gitignore": "gitignore_4", "gitignore": "gitignore_4",
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_14",
@ -2562,7 +2524,7 @@
}, },
"pre-commit-hooks_5": { "pre-commit-hooks_5": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_9", "flake-compat": "flake-compat_8",
"flake-utils": "flake-utils_11", "flake-utils": "flake-utils_11",
"gitignore": "gitignore_5", "gitignore": "gitignore_5",
"nixpkgs": "nixpkgs_15", "nixpkgs": "nixpkgs_15",
@ -2604,7 +2566,6 @@
"anyrun": "anyrun", "anyrun": "anyrun",
"anyrun-nixos-options": "anyrun-nixos-options", "anyrun-nixos-options": "anyrun-nixos-options",
"catppuccin-base16": "catppuccin-base16", "catppuccin-base16": "catppuccin-base16",
"deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"grub2-themes": "grub2-themes", "grub2-themes": "grub2-themes",
@ -2616,8 +2577,8 @@
"intray": "intray", "intray": "intray",
"matui": "matui", "matui": "matui",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database",
"nixd": "nixd", "nixd": "nixd",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
@ -2936,7 +2897,7 @@
"base16-kitty": "base16-kitty", "base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux", "base16-tmux": "base16-tmux",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"flake-compat": "flake-compat_7", "flake-compat": "flake-compat_6",
"home-manager": [ "home-manager": [
"home-manager" "home-manager"
], ],
@ -3313,21 +3274,6 @@
"type": "github" "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": { "validity": {
"flake": false, "flake": false,
"locked": { "locked": {

208
flake.nix
View file

@ -3,111 +3,66 @@
# {{{ Inputs # {{{ Inputs
inputs = { inputs = {
# Nixpkgs # {{{ Nixpkgs instances
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# }}}
# Home manager # {{{ Additional package repositories
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# NUR
nur.url = "github:nix-community/NUR"; 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.url = "github:hyprwm/contrib";
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs"; hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Contains a bunch of wayland stuff not on nixpkgs # Contains a bunch of wayland stuff not on nixpkgs
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs"; 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 # Nix language server
# [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation) # [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation)
# tell me not to override the nixpkgs input. # tell me not to override the nixpkgs input.
nixd.url = "github:nix-community/nixd"; 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 # https://github.com/happenslol/wezterm/blob/add-nix-flake/nix/flake.nix
wezterm.url = "github:happenslol/wezterm/add-nix-flake?dir=nix"; wezterm.url = "github:happenslol/wezterm/add-nix-flake?dir=nix";
wezterm.inputs.nixpkgs.follows = "nixpkgs"; wezterm.inputs.nixpkgs.follows = "nixpkgs";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs";
# }}}
# {{{ Self management # {{{ Self management
# Smos # Smos
smos.url = "github:NorfairKing/smos"; smos.url = "github:NorfairKing/smos";
@ -125,6 +80,43 @@
tickler.inputs.nixpkgs.follows = "nixpkgs"; tickler.inputs.nixpkgs.follows = "nixpkgs";
tickler.inputs.intray.follows = "intray"; 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 # Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; } // { 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=";
})
];
}));
}
); );
# }}} # }}}
# {{{ Bootstrapping and other pinned devshells # {{{ Bootstrapping and other pinned devshells
@ -176,11 +153,9 @@
(system: (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
default = import ./shell.nix { inherit pkgs; };
args = { inherit pkgs; } // specialArgs system; args = { inherit pkgs; } // specialArgs system;
devshells = import ./devshells args;
in in
devshells // { inherit default; }); ./devshells args);
# }}} # }}}
# {{{ Overlays and modules # {{{ Overlays and modules
# Custom packages and modifications, exported as overlays # Custom packages and modifications, exported as overlays
@ -209,12 +184,6 @@
stylix.homeManagerIntegration.followSystem = false; stylix.homeManagerIntegration.followSystem = false;
stylix.homeManagerIntegration.autoImport = false; stylix.homeManagerIntegration.autoImport = false;
_module.args.nixinate = {
host = hostname;
sshUser = "adrielus";
buildOn = "remote";
};
} }
./hosts/nixos/${hostname} ./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 # {{{ Caching and whatnot

View file

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

View file

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

View file

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

View file

@ -2,26 +2,27 @@
let let
# {{{ Imports # {{{ Imports
imports = [ imports = [
# {{{ flake inputs
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
inputs.homeage.homeManagerModules.homeage inputs.homeage.homeManagerModules.homeage
inputs.nur.nixosModules.nur inputs.nur.nixosModules.nur
inputs.impermanence.nixosModules.home-manager.impermanence inputs.impermanence.nixosModules.home-manager.impermanence
inputs.spicetify-nix.homeManagerModules.spicetify inputs.spicetify-nix.homeManagerModules.spicetify
inputs.anyrun.homeManagerModules.default inputs.anyrun.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
# {{{ self management
# NOTE: using `pkgs.system` before `module.options` is evaluated # NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion! # leads to infinite recursion!
inputs.intray.homeManagerModules.x86_64-linux.default inputs.intray.homeManagerModules.x86_64-linux.default
inputs.smos.homeManagerModules.x86_64-linux.default inputs.smos.homeManagerModules.x86_64-linux.default
# }}}
# }}}
# {{{ global configuration
./features/cli ./features/cli
./features/persistence.nix ./features/persistence.nix
../common ../common
];
# }}} # }}}
# {{{ Overlays
overlays = [
# inputs.neovim-nightly-overlay.overlay
]; ];
# }}} # }}}
in in
@ -32,31 +33,30 @@ in
# {{{ Nixpkgs # {{{ Nixpkgs
nixpkgs = { nixpkgs = {
# Add all overlays defined in the overlays directory # 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;
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
}; };
# }}} # }}}
# {{{ Enable the home-manager and git clis
# Nicely reload system units when changing configs
systemd.user.startServices = lib.mkForce "sd-switch";
# Enable the home-manager and git clis
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
git.enable = true; git.enable = true;
}; };
# }}}
# Set reasonable defaults for some settings # {{{ Set reasonable defaults for some settings
home = { home = {
username = lib.mkDefault "adrielus"; username = lib.mkDefault "adrielus";
homeDirectory = lib.mkDefault "/home/${config.home.username}"; homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.05"; 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 # Where homeage should look for our ssh key
homeage.identityPaths = [ "~/.ssh/id_ed25519" ]; homeage.identityPaths = [ "~/.ssh/id_ed25519" ];
@ -64,18 +64,18 @@ in
# Allow root to read persistent files from this user. # Allow root to read persistent files from this user.
home.persistence."/persist/home/adrielus".allowOther = true; home.persistence."/persist/home/adrielus".allowOther = true;
# {{{ Ad-hoc stylix targets
stylix.targets.xresources.enable = true;
# }}}
# }}}
# {{{ Xdg user directories
# Set the xdg env vars # Set the xdg env vars
xdg.enable = true; xdg.enable = true;
# {{{ Xdg user directories
xdg.userDirs = { xdg.userDirs = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
createDirectories = lib.mkDefault false; createDirectories = lib.mkDefault false;
extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; 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 = [ imports = [
./global.nix ./global.nix
@ -8,10 +8,9 @@
./features/desktop/discord ./features/desktop/discord
./features/cli/productivity ./features/cli/productivity
./features/cli/pass.nix ./features/cli/pass.nix
./features/neovim ./features/cli/nix-index.nix
# ./features/xorg/xmonad.nix
./features/wayland/hyprland ./features/wayland/hyprland
./features/neovim
]; ];
# Arbitrary extra packages # 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 # Configuration pieces included on all (nixos) hosts
{ inputs, outputs, ... }: { inputs, lib, config, outputs, ... }:
let let
# {{{ Imports # {{{ Imports
imports = [ imports = [
# {{{ flake inputs
# inputs.hyprland.nixosModules.default # inputs.hyprland.nixosModules.default
inputs.disko.nixosModules.default inputs.disko.nixosModules.default
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
@ -11,20 +12,26 @@ let
inputs.impermanence.nixosModule inputs.impermanence.nixosModule
inputs.slambda.nixosModule inputs.slambda.nixosModule
# {{{ self management
# NOTE: using `pkgs.system` before `module.options` is evaluated # NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion! # leads to infinite recursion!
inputs.intray.nixosModules.x86_64-linux.default inputs.intray.nixosModules.x86_64-linux.default
inputs.smos.nixosModules.x86_64-linux.default inputs.smos.nixosModules.x86_64-linux.default
inputs.tickler.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 ./nix.nix
./openssh.nix
./fish.nix
./locale.nix ./locale.nix
./persistence.nix
./wireless ./wireless
./tailscale.nix
../../../../common ../../../../common
# }}}
]; ];
# }}} # }}}
in in
@ -32,6 +39,7 @@ in
# Import all modules defined in modules/nixos # Import all modules defined in modules/nixos
imports = builtins.attrValues outputs.nixosModules ++ imports; imports = builtins.attrValues outputs.nixosModules ++ imports;
# {{{ ad-hoc options
# Allow non root users to specify the "allowOther" option. # Allow non root users to specify the "allowOther" option.
# See [the imperanence readme](https://github.com/nix-community/impermanence#home-manager) # See [the imperanence readme](https://github.com/nix-community/impermanence#home-manager)
programs.fuse.userAllowOther = true; programs.fuse.userAllowOther = true;
@ -39,14 +47,19 @@ in
# Customize tty colors # Customize tty colors
stylix.targets.console.enable = true; stylix.targets.console.enable = true;
# Reduce the amount of storage spent for logs
services.journald.extraConfig = lib.mkDefault ''
SystemMaxUse=256M
'';
# }}}
nixpkgs = { nixpkgs = {
# Add all overlays defined in the overlays directory # Add all overlays defined in the overlays directory
overlays = builtins.attrValues outputs.overlays ++ [ overlays = builtins.attrValues outputs.overlays ++
# inputs.neovim-nightly-overlay.overlay lib.lists.optional
]; config.satellite.toggles.neovim-nightly.enable
inputs.neovim-nightly-overlay.overlay;
config = { config.allowUnfree = true;
allowUnfree = true;
};
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

@ -1,31 +1,30 @@
{ lib, ... }: { { lib, ... }: {
# {{{ Imports
imports = [ imports = [
../common/global ../common/global
../common/users/adrielus.nix ../common/users/adrielus.nix
../common/optional/pipewire.nix ../common/optional/pipewire.nix
../common/optional/greetd.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/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 ./hardware
./services/syncthing.nix
./boot.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 # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11"; system.stateVersion = "22.11";
# {{{ Machine ids
networking.hostName = "tethys";
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
# }}}
# {{{ A few ad-hoc hardware settings # {{{ A few ad-hoc hardware settings
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
hardware.opengl.enable = true; hardware.opengl.enable = true;

View file

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

View file

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

View file

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

View file

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

View file

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