Compare commits

...

2 Commits

Author SHA1 Message Date
Jill fa9ee7a9c1 move stuff around wee 2024-01-07 18:13:44 +03:00
Jill 38acc91c40 the big. the large, even 2024-01-07 18:07:03 +03:00
12 changed files with 176 additions and 94 deletions

View File

@ -16,13 +16,31 @@
"type": "github"
}
},
"catppuccin-vsc": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1704479967,
"narHash": "sha256-YcbqMvphGDiAXX+zvEPci4LmBr1zQhGlwT/or9g7gHs=",
"owner": "catppuccin",
"repo": "vscode",
"rev": "80122d60e2d3a169d0f640cfa347d91b78f814d5",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "vscode",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1704266875,
"narHash": "sha256-luA5SGmeIRZlgLfSLUuR3eacS63q2bJ0Yywqak5lj3E=",
"lastModified": 1704458188,
"narHash": "sha256-f6BYEuIqnbrs6J/9m1/1VdkJ6d63hO9kUC09kTPuOqE=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "8e34f33464d77bea2d5cf7dc1066647b1ad2b324",
"rev": "172385318068519900a7d71c1024242fa6af75f0",
"type": "github"
},
"original": {
@ -73,16 +91,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1703992652,
"narHash": "sha256-C0o8AUyu8xYgJ36kOxJfXIroy9if/G6aJbNOpA5W0+M=",
"owner": "nixos",
"lastModified": 1703961334,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "32f63574c85fbc80e4ba1fbb932cde9619bad25e",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -104,11 +122,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1703961334,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
"lastModified": 1704194953,
"narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6",
"type": "github"
},
"original": {
@ -118,12 +136,29 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1704295289,
"narHash": "sha256-9WZDRfpMqCYL6g/HNWVvXF0hxdaAgwgIGeLYiOhmes8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b0b2c5445c64191fd8d0b31f2b1a34e45a64547d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"catppuccin-vsc": "catppuccin-vsc",
"hardware": "hardware",
"home-manager": "home-manager",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}

View File

@ -2,23 +2,23 @@
description = "goop-drive config";
inputs = {
# Nixpkgs
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";
hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors";
catppuccin-vsc.url = "github:catppuccin/vscode";
};
outputs = {
self,
nixpkgs,
home-manager,
catppuccin-vsc,
...
} @ inputs: let
inherit (self) outputs;

72
home-manager/editors.nix Normal file
View File

@ -0,0 +1,72 @@
{ pkgs, config, ... }:
{
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
sumneko.lua
ms-vsliveshare.vsliveshare
(catppuccin.catppuccin-vsc.override {
accent = "pink";
boldKeywords = false;
italicComments = false;
italicKeywords = false;
extraBordersEnabled = false;
workbenchMode = "flat";
#bracketMode = "rainbow";
})
];
mutableExtensionsDir = false;
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
userSettings = with config.opinions.font; {
"telemetry.enableTelemetry" = false;
"editor.tabSize" = 2;
"editor.cursorSmoothCaretAnimation" = "on";
"editor.fontFamily" = "'${monospace.family}', monospace";
"editor.fontSize" = monospace.size;
"terminal.integrated.fontFamily" = "\"${monospace.family}\"";
"terminal.integrated.fontSize" = monospace.size;
"window.dialogStyle" = "custom";
"window.titleBarStyle" = "custom";
"workbench.tips.enabled" = false;
"workbench.colorTheme" = "Catppuccin Mocha";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nil}";
"security.workspace.trust.untrustedFiles" = "open";
"explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = false;
"editor.bracketPairColorization.enabled" = false;
"editor.smoothScrolling" = true;
"editor.wordWrap" = "on";
"editor.wrappingStrategy" = "advanced";
"editor.fontWeight" = "normal";
"editor.semanticHighlighting.enabled" = true;
# prevent VSCode from modifying the terminal colors
"terminal.integrated.minimumContrastRatio" = 1;
};
};
programs.micro = {
enable = true;
settings = {
autosu = true;
clipboard = "terminal";
savecursor = true;
scrollbar = true;
tabsize = 2;
tabstospaces = true;
};
};
microColors.enable = true;
}

View File

@ -1,4 +1,4 @@
{ inputs, outputs, pkgs, lib, ... }:
{ inputs, outputs, pkgs, lib, config, ... }:
{
imports = [
@ -10,16 +10,23 @@
outputs.homeManagerModules.microColors
outputs.homeManagerModules.gnomeBindings
outputs.homeManagerModules.disableNews
./editors.nix
];
home.username = "oatmealine";
home.homeDirectory = "/home/oatmealine";
nixpkgs.overlays = [
outputs.overlays.additions
outputs.overlays.unstable-packages
inputs.catppuccin-vsc.overlays.default
];
nixpkgs.config.allowUnfree = true;
# Packages that should be installed to the user profile.
home.packages = with pkgs; let
discord = discord-canary.override {
discord = unstable.discord-canary.override {
withOpenASAR = true;
withVencord = true;
};
@ -29,7 +36,7 @@
# utils
ripgrep jq
# nix
nil nix-output-monitor
nix-output-monitor
# dev
sqlitebrowser sqlite-interactive
# system
@ -38,6 +45,8 @@
strace ltrace lsof
# apps
vivaldi telegram-desktop onlyoffice-bin gnome.gnome-tweaks discord mpv
# compatilibility
wine
# misc
cowsay file which tree gnused grc
# um
@ -79,8 +88,6 @@
init.defaultBranch = "main";
};
};
alacritty.enable = true;
gtkConfig = {
enable = true;
@ -95,36 +102,12 @@
};
};
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
];
};
alacritty.enable = true;
shellColors.enable = true;
programs.fish.enable = true;
programs.fish.plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ];
programs.micro = {
enable = true;
settings = {
autosu = true;
clipboard = "terminal";
colorscheme = "generated";
savecursor = true;
scrollbar = true;
tabsize = 2;
tabstospaces = true;
};
};
microColors.enable = true;
services.syncthing = {
enable = true;
tray.enable = true;
};
services.syncthing.enable = true;
services.syncthing.tray.enable = true;
gnomeBindings.enable = true;
gnomeBindings.shell = {
# disable defaults
@ -140,6 +123,10 @@
binding = "Print";
command = "${lib.getExe pkgs.flameshot} gui";
};
"take-screen-recording" = {
binding = "<Shift>Print";
command = "${lib.getExe pkgs.peek}";
};
"grab-password" = let
grabScript = pkgs.writeScript "grab-password" ''
${lib.getExe pkgs.rbw} get $(${lib.getExe pkgs.gnome.zenity} --entry --text="" --title="") | ${lib.getExe pkgs.xclip} -selection clipboard

View File

@ -3,13 +3,15 @@
with lib;
let
cfg = config.microColors;
name = "generated";
in {
options.microColors = {
enable = mkEnableOption "Enable shell color config";
};
config = mkIf cfg.enable {
home.file.".config/micro/colorschemes/generated.micro".text = with config.colorScheme.colors; ''
programs.micro.colorScheme = name;
home.file.".config/micro/colorschemes/${name}.micro".text = with config.colorScheme.colors; ''
color-link default "#${base05},#${base00}"
color-link comment "#${base03},#${base00}"
color-link identifier "#${base0D},#${base00}"

View File

@ -1,4 +1,3 @@
{
gnome = ./gnome.nix;
grub = ./grub.nix;
}

View File

@ -1,22 +0,0 @@
{ lib, config, pkga, ... }:
with lib;
let
cfg = config.grubConfig;
in {
options.grubConfig = {
enable = mkEnableOption "GRUB customization";
font = mkOption {
type = types.str;
};
fontSize = mkOption {
type = types.number;
};
};
config = mkIf cfg.enable {
boot.loader.grub.enable = true;
boot.loader.grub.font = cfg.font;
boot.loader.grub.fontSize = cfg.fontSize;
};
}

View File

@ -10,7 +10,6 @@
./hardware-configuration.nix
outputs.nixosModules.grub
outputs.nixosModules.gnome
./security.nix
@ -21,18 +20,26 @@
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowAliases = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters =
[ "https://nix-community.cachix.org" "https://devenv.cachix.org" ];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
};
nixpkgs.overlays = [
outputs.overlays.additions
outputs.overlays.unstable-packages
outputs.overlays.dynamic-triple-buffering
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
#grubConfig = {
# enable = true;
# font = "${pkgs.cozette}/share/fonts/truetype/CozetteVector.ttf";
# fontSize = 10;
#};
networking.hostName = "goop-drive"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -52,6 +59,10 @@
};
console.useXkbConfig = true;
# Prefer tlp over Gnome's power-profiles-daemon
#services.power-profiles-daemon.enable = false;
#services.tlp.enable = true;
# Enable CUPS to print documents.
#services.printing.enable = false;

View File

@ -3,7 +3,12 @@
{ config, ... }:
{
# Laptop-specific battery usage tuning
powerManagement.enable = true;
# Tune power saving options on boot
#powerManagement.powertop.enable = true;
# Thermald proactively prevents overheating on Intel CPUs and works well with other tools.
services.thermald.enable = true;
boot.kernelParams = [
# Enable the i915 Sandybridge Framebuffer Compression (confirmed 475mw savings)
"i915.i915_enable_fbc=1"

View File

@ -1,5 +1,5 @@
{
#security.sudo.enable = false;
security.sudo.enable = false;
security.doas.enable = true;
security.doas.extraRules = [
{ users = [ "oatmealine" ]; noPass = true; persist = false; keepEnv = true; }

View File

@ -51,4 +51,7 @@
atkinson-hyperlegible
cozette
];
services.flatpak.enable = true;
programs.noisetorch.enable = true;
}

View File

@ -1,17 +1,7 @@
# This file defines overlays
{inputs, pkgs, ...}: {
{inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs {pkgs = final;};
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
@ -24,7 +14,7 @@
dynamic-triple-buffering = (final: prev: {
gnome = prev.gnome.overrideScope' (gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs ( old: {
src = pkgs.fetchgit {
src = prev.fetchgit {
url = "https://gitlab.gnome.org/vanvugt/mutter.git";
# GNOME 45: triple-buffering-v4-45
rev = "0b896518b2028d9c4d6ea44806d093fd33793689";
@ -32,5 +22,5 @@
};
} );
});
})
});
}