Compare commits

...

3 commits

Author SHA1 Message Date
90cbeed3f2 Common/starship: use catppuccin theme from nixpkgs 2024-01-15 16:45:57 +01:00
b4020d4316 Flake: apply patch to nixpkgs-unstable
This feels really dirty, but it works and it's less effort that switching to
something like flake-utils that can do this for you
2024-01-15 16:45:57 +01:00
ea3870aa6e Use catppuccin from nixpkgs 2024-01-15 16:45:57 +01:00
6 changed files with 70 additions and 46 deletions

29
flake.lock generated
View file

@ -26,7 +26,7 @@
"catppuccin-vsc": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {
@ -101,7 +101,7 @@
"home-manager-unstable": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {
@ -143,7 +143,7 @@
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {
@ -236,7 +236,7 @@
"nix-index-db-unstable": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {
@ -284,7 +284,19 @@
"type": "indirect"
}
},
"nixpkgs-unstable": {
"nixpkgs-pr280779": {
"flake": false,
"locked": {
"narHash": "sha256-eP6JaUafbs7ulve2jOsidJKM28bKzcLgoQ4WKXN1k4I=",
"type": "file",
"url": "https://github.com/NixOS/nixpkgs/pull/280779.patch"
},
"original": {
"type": "file",
"url": "https://github.com/NixOS/nixpkgs/pull/280779.patch"
}
},
"nixpkgs-unstable-raw": {
"locked": {
"lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
@ -305,7 +317,7 @@
"home-manager-unstable"
],
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {
@ -335,7 +347,8 @@
"nix-index-db-unstable": "nix-index-db-unstable",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs-pr280779": "nixpkgs-pr280779",
"nixpkgs-unstable-raw": "nixpkgs-unstable-raw",
"plasma-manager": "plasma-manager",
"vscode-extensions": "vscode-extensions"
}
@ -375,7 +388,7 @@
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs-unstable-raw"
]
},
"locked": {

View file

@ -3,7 +3,12 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixpkgs-unstable-raw.url = "nixpkgs/nixos-unstable";
nixpkgs-pr280779 = {
url = "file+https://github.com/NixOS/nixpkgs/pull/280779.patch";
flake = false;
};
agenix = {
url = "github:ryantm/agenix";
@ -20,14 +25,14 @@
home-manager-unstable = {
url = "github:nix-community/home-manager/";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
nix-impermanence.url = "github:nix-community/impermanence";
@ -43,30 +48,41 @@
nix-index-db-unstable = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
inputs.home-manager.follows = "home-manager-unstable";
};
catppuccin-vsc = {
url = "github:catppuccin/vscode";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
nix-flatpak.url = github:gmodena/nix-flatpak/main;
};
outputs = { ... } @inputs: with inputs; {
outputs = { ... } @inputs: with inputs;
# Patch nixpkgs
# https://ertt.ca/nix/patch-nixpkgs/
let
nixpkgs-unstable-patched = nixpkgs.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs-unstable";
src = nixpkgs-unstable-raw;
patches = [ nixpkgs-pr280779 ];
};
# https://discourse.nixos.org/t/proper-way-of-applying-patch-to-system-managed-via-flake/21073/26
nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs { self = inputs.self; };
in
{
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
name = "Environment for toast's nixos configurations";
# The agenix cli is not needed to activate a configuration, so instead of installing it
@ -82,7 +98,7 @@
'';
};
packages = {
x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; {
x86_64-linux = with import nixpkgs-unstable-raw { system = "x86_64-linux"; }; {
pseint = callPackage ./pkgs/pseint.nix {};
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {};
@ -91,7 +107,7 @@
nixosConfigurations = {
Archie = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
/*
I used to set up nixpkgs in the flake, but doing that made
defining overlays in modules impossible (or at least I could
@ -113,7 +129,7 @@
SurfaceGo = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
modules = [
agenix.nixosModules.default
home-manager-unstable.nixosModule
@ -128,7 +144,7 @@
SteamDeck = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
modules = [
agenix.nixosModules.default
jovian.nixosModules.default

View file

@ -64,6 +64,22 @@
# Set up time zone.
time.timeZone = "Europe/Madrid";
nixpkgs.overlays = [
(
final: prev: {
catppuccin = prev.catppuccin.override {
accent = "mauve";
variant = "mocha";
themeList = [
"bat"
"btop"
"starship"
];
};
}
)
];
home-manager = {
backupFileExtension = "hm-backup";
useGlobalPkgs = true;

View file

@ -9,13 +9,8 @@
};
themes = {
catppuccin-mocha = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "master";
hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-mocha.tmTheme";
src = pkgs.catppuccin;
file = "bat/Catppuccin-mocha.tmTheme";
};
};
};

View file

@ -1,15 +1,5 @@
{ pkgs, ... }:
let
catppuccinBtop = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "btop";
# I know fetiching from master is not best practice but idc this is not going to change often
# Latest commit rn is c6469190f2ecf25f017d6120bf4e050e6b1d17af
rev = "master";
hash = "sha256-jodJl4f2T9ViNqsY9fk8IV62CrpC5hy7WK3aRpu70Cs=";
};
in
{
home-manager = {
users.toast = {
@ -20,7 +10,7 @@ in
};
};
xdg.configFile = {
"btop/themes".source = "${catppuccinBtop}/themes";
"btop/themes".source = "${pkgs.catppuccin}/btop";
};
};
};

View file

@ -5,13 +5,7 @@ with builtins;
let
catppuccinFlavour = "mocha";
catppuccinStarship = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "starship";
# Latest commit is 5629d2356f62a9f2f8efad3ff37476c19969bd4f
rev = "main";
hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
} + /palettes/${catppuccinFlavour}.toml;
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
presets = {
nerdFontSymbols = pkgs.fetchurl {