Change defaults

This commit is contained in:
Patrick Neff 2024-02-06 19:05:05 +01:00
parent 6d697d3aa7
commit 6fa8f8f2a6
14 changed files with 302 additions and 57 deletions

View File

@ -190,6 +190,21 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gopher-nvim": { "gopher-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -256,15 +271,16 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1706134977, "lastModified": 1705659542,
"narHash": "sha256-KwNb1Li3K6vuVwZ77tFjZ89AWBo7AiCs9t0Cens4BsM=", "narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6359d40f6ec0b72a38e02b333f343c3d4929ec10", "rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -295,17 +311,16 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1706712950, "dirtyRev": "bbc31d60a53fef45106e986567070cb4e47713e0-dirty",
"narHash": "sha256-17TOvi0vKtelaRCZJvDaXk7YTDphqYwUMtxyZmWtAF4=", "dirtyShortRev": "bbc31d6-dirty",
"ref": "refs/heads/master", "lastModified": 1706718229,
"rev": "edeed6fbbd204fb3eb9bd2a6342a6d142c8b7dac", "narHash": "sha256-mJgZSFTPlA0N1tG155yH0klQIOyhdE31/g9rTUJUqeg=",
"revCount": 8,
"type": "git", "type": "git",
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake" "url": "file:///home/odie/Code/nix/neovim-config"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake" "url": "file:///home/odie/Code/nix/neovim-config"
} }
}, },
"neovim-flake": { "neovim-flake": {
@ -401,18 +416,37 @@
"type": "github" "type": "github"
} }
}, },
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1685908677,
"narHash": "sha256-E4zUPEUFyVWjVm45zICaHRpfGepfkE9Z2OECV9HXfA4=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "489d6b095ab9d289fe11af0219a9ff00fe87c7c5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1705856552, "lastModified": 1706515015,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", "narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", "rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -498,6 +532,21 @@
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": {
"lastModified": 1660551188,
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1705916986, "lastModified": 1705916986,
"narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=", "narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=",
@ -513,14 +562,31 @@
"type": "github" "type": "github"
} }
}, },
"nur": {
"locked": {
"lastModified": 1706713393,
"narHash": "sha256-RYjelBW6OfXqsKJe5mJp1sbKHf3e8ytvwhlxRwx8Trk=",
"owner": "nix-community",
"repo": "NUR",
"rev": "6bc9f506e6299fc5e02bb7f5f7d7692b82df628d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim": "neovim", "neovim": "neovim",
"neovim-nightly-overlay": "neovim-nightly-overlay_2", "neovim-nightly-overlay": "neovim-nightly-overlay_2",
"nixpkgs": "nixpkgs_6", "nixgl": "nixgl",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs": "nixpkgs_7",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur"
} }
}, },
"systems": { "systems": {

View File

@ -6,14 +6,17 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-23.11";
}; };
neovim-nightly-overlay = { neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay"; url = "github:nix-community/neovim-nightly-overlay";
}; };
neovim = { neovim = {
url = "git+ssh://gitea@pi1.odie.intranet/odie/neovim-flake"; #url = "git+ssh://gitea@pi1.odie.intranet/odie/neovim-flake";
url = "/home/odie/Code/nix/neovim-config";
}; };
nur.url = "github:nix-community/NUR";
nixgl.url = "github:nix-community/nixGL";
}; };
outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, ... }: outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, ... }:
@ -22,6 +25,8 @@
inputOverlays = [ inputOverlays = [
inputs.neovim-nightly-overlay.overlays.default inputs.neovim-nightly-overlay.overlays.default
inputs.neovim.overlays.default inputs.neovim.overlays.default
inputs.nur.overlay
inputs.nixgl.overlay
]; ];
unstableOverlay = final: _prev: { unstableOverlay = final: _prev: {
unstable = import inputs.nixpkgs-unstable { unstable = import inputs.nixpkgs-unstable {
@ -40,29 +45,32 @@
}; };
in in
rec { rec {
homeManagerModules = [ homeManagerModules = rec {
(import ./modules) full = [
]; (import ./modules)
];
};
homeConfigurations = { homeConfigurations = {
"odie-full" = home-manager.lib.homeManagerConfiguration { "odie-full" = home-manager.lib.homeManagerConfiguration {
pkgs = (mkPkgs "x86_64-linux").unstable; pkgs = mkPkgs "x86_64-linux";
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
modules = homeManagerModules; modules = homeManagerModules.full;
}; };
}; };
} // flake-utils.lib.eachDefaultSystem (system: } // flake-utils.lib.eachDefaultSystem
let (system:
pkgs = mkPkgs system; let
in pkgs = mkPkgs system;
{ in
formatter = pkgs.alejandra; {
devShells = { formatter = pkgs.alejandra;
default = pkgs.mkShell { devShells = {
name = "home-manager"; default = pkgs.mkShell {
buildInputs = with pkgs; [ name = "home-manager";
inputs.home-manager.packages.${system}.default buildInputs = with pkgs; [
]; inputs.home-manager.packages.${system}.default
];
};
}; };
}; });
});
} }

View File

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: with lib; { { pkgs, lib, inputs, ... }: with lib; {
home = { home = {
username = "odie"; username = "odie";
homeDirectory = "/home/odie"; homeDirectory = "/home/odie";
@ -6,20 +6,22 @@
packages = with pkgs; [ packages = with pkgs; [
home-manager home-manager
]; ];
stateVersion = "23.05";
}; };
imports = [ imports = [
./shell ./shell
./neovim-ide.nix ./gui
./mpd
inputs.neovim.homeModules.default
]; ];
programs = { programs.neovim-ide.enable = lib.mkDefault true;
neovim-ide.enable = mkDefault true; programs.kitty.enable = lib.mkForce true;
};
services = { news = {
ssh-agent.enable = mkDefault true; display = "silent";
json = lib.mkForce { };
entries = lib.mkForce [ ];
}; };
home.stateVersion = "23.05";
} }

17
modules/gui/default.nix Normal file
View File

@ -0,0 +1,17 @@
{ lib, ... }: {
imports = [
./firefox.nix
./keepassxc.nix
./kitty.nix
./nextcloud-client.nix
];
programs = {
keepassxc.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true;
kitty.enable = lib.mkDefault false;
};
services = {
nextcloud-client.enable = lib.mkDefault false;
udiskie.enable = lib.mkDefault false;
};
}

48
modules/gui/firefox.nix Normal file
View File

@ -0,0 +1,48 @@
{pkgs, config, lib, ...}: lib.mkIf config.programs.firefox.enable {
programs.firefox = {
package = pkgs.firefox.override {
nativeMessagingHosts = with pkgs; [
tridactyl-native
keepassxc
];
};
profiles.odie = {
isDefault = true;
id = 0;
name = "odie";
search = {
default = "DuckDuckGo";
force = true;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
adnauseam
istilldontcareaboutcookies
sponsorblock
stylus
keepassxc-browser
tridactyl
canvasblocker
deutsch-de-language-pack
greasemonkey
youtube-recommended-videos # unhook
return-youtube-dislikes
user-agent-string-switcher
];
settings = {
"browser.startup.homepage" = "https://duckduckgo.com";
"browser.search.region" = "DE";
"browser.search.isUS" = false;
"browser.search.default" = "DuckDuckGo";
"distribution.searchplugins.defaultLocale" = "de-DE";
"general.useragent.locale" = "de-DE";
"browser.bookmarks.showMobileBookmarks" = false;
"browser.newtabpage.pinned" = [
{
title = "NixOS";
url = "https://nixos.org";
}
];
};
};
};
}

10
modules/gui/keepassxc.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, lib, config, ... }: {
options = {
programs.keepassxc.enable = lib.mkEnableOption "keepassxc";
};
config = lib.mkIf config.programs.keepassxc.enable {
home.packages = [
pkgs.keepassxc
];
};
}

18
modules/gui/kitty.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, config, lib, ... }: {
config = lib.mkIf config.programs.kitty.enable {
programs.kitty = {
font = {
name = "JetBrains Mono";
size = 9.5;
};
shellIntegration.enableZshIntegration = true;
settings = {
background_opacity = 1;
enable_audio_bell = "no";
visual_bell_duration = "0.025";
window_padding_width = 0;
};
theme = "Catppuccin-Mocha";
};
};
}

View File

@ -0,0 +1,5 @@
{lib,config,...}: lib.mkIf config.services.nextcloud-client.enable {
services.nextcloud-client = {
startInBackground = true;
};
}

37
modules/gui/picom.nix Normal file
View File

@ -0,0 +1,37 @@
{ config, lib, ... }: {
options = {
services = {
picom = {
glxBackend = lib.mkOption {
type = lib.types.str;
description = "the default terminal to use";
default = "glx";
};
};
};
};
services.picom = {
enable = true;
backend = config.services.picom.glxBackend;
fade = true;
opacityRules = [
"95:class_g = 'kitty' && focused"
"85:class_g = 'kitty' && !focused"
"95:class_g = 'Alacritty' && focused"
"85:class_g = 'Alacritty' && !focused"
"85:window_type = 'dock'"
];
settings = {
blur = {
method = "gaussian";
size = 10;
deviation = 5.0;
};
corner-radius = 6;
rounded-corners-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
];
};
};
}

13
modules/mpd/default.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, ... }: {
imports = [
./mpd.nix
./ncmpcpp.nix
];
programs = {
ncmpcpp.enable = lib.mkDefault true;
};
services = {
mpd.enable = lib.mkDefault true;
};
}

5
modules/mpd/mpd.nix Normal file
View File

@ -0,0 +1,5 @@
{lib,config,...}: lib.mkIf config.services.mpd.enable {
services.mpd = {
musicDirectory = "/mnt/media/Audio/Musik";
};
}

22
modules/mpd/ncmpcpp.nix Normal file
View File

@ -0,0 +1,22 @@
{lib,config,...}: lib.mkIf config.programs.ncmpcpp.enable {
programs.ncmpcpp = {
bindings = [
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "J";
command = ["select_item" "scroll_down"];
}
{
key = "K";
command = ["select_item" "scroll_up"];
}
];
};
}

View File

@ -1,10 +0,0 @@
{ pkgs, config, lib, ... }: {
options = {
programs.neovim-ide.enable = lib.mkEnableOption "neovim-ide";
};
config = lib.mkIf config.programs.neovim-ide.enable {
home = {
packages = with pkgs; [ neovim-ide ];
};
};
}

View File

@ -2,8 +2,12 @@
home.packages = with pkgs; [ tea ]; home.packages = with pkgs; [ tea ];
programs = { programs = {
ssh = { ssh = {
addKeysToAgent = "yes"; #addKeysToAgent = "yes";
forwardAgent = true; forwardAgent = true;
}; };
}; };
services = {
ssh-agent.enable = true;
};
} }