format: update formatting to new rfc style

This commit is contained in:
Nydragon 2024-05-16 03:31:48 +09:00
parent e9371c3a15
commit ce7de9b9a6
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
15 changed files with 478 additions and 462 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
./result/

24
flake.lock generated
View file

@ -22,26 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1715458517, "lastModified": 1715534503,
"narHash": "sha256-oi4z6RuLnGTR8TbjPcN/D2jFKywCrMRhAtSfgPHY9nE=", "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "09208c1471b96985c809998af55d82e134a750b8", "rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,8 +39,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"nixpkgs-unstable": "nixpkgs-unstable"
} }
} }
}, },

View file

@ -2,8 +2,7 @@
description = "Nydragon's configuration'"; description = "Nydragon's configuration'";
inputs = { inputs = {
nixpkgs = { url = "github:nixos/nixpkgs"; }; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable = { url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@ -11,7 +10,7 @@
}; };
}; };
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager }: outputs = inputs@{ self, nixpkgs, home-manager }:
let let
inherit (self) outputs; inherit (self) outputs;
@ -22,18 +21,13 @@
config.allowUnfree = true; config.allowUnfree = true;
}; };
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in {
nixosConfigurations = { nixosConfigurations = {
xps9510 = lib.nixosSystem { xps9510 = lib.nixosSystem {
inherit system; inherit system;
modules = [ ./hosts/xps9510/configuration.nix ]; modules = [ ./hosts/xps9510/configuration.nix ];
specialArgs = { inherit inputs outputs system unstable; }; specialArgs = { inherit inputs outputs system pkgs; };
}; };
}; };
}; };

View file

@ -1,11 +1,24 @@
{ config, inputs, system, stateVersion, username, homeDirectory, pkgs, unstable {
, ... }: stateVersion,
let scripts = import ./scripts { inherit pkgs; }; username,
in { homeDirectory,
imports = [ ./firefox ./fish ./sway ./neovim ./rofi ./thunderbird ]; pkgs,
...
}:
let
scripts = import ./scripts { inherit pkgs; };
in
{
imports = [
./firefox
./fish
./sway
./neovim
./rofi
./thunderbird
];
xdg.configFile."gtk-4.0/gtk.css".source = xdg.configFile."gtk-4.0/gtk.css".source = "${pkgs.catppuccin-gtk}/share/themes/Catppuccin-Frappe-Standard-Blue-Dark/gtk-4.0/gtk.css";
"${pkgs.catppuccin-gtk}/share/themes/Catppuccin-Frappe-Standard-Blue-Dark/gtk-4.0/gtk.css";
dconf = { dconf = {
enable = true; enable = true;
@ -38,11 +51,11 @@ in {
thunderbird thunderbird
gnome.nautilus gnome.nautilus
rofi-power-menu rofi-power-menu
unstable.lollypop lollypop
# Proprietary # Proprietary
unstable.postman postman
unstable.mongodb-compass mongodb-compass
# CLI tools # CLI tools
delta delta
@ -56,11 +69,11 @@ in {
lazygit lazygit
fd fd
ripgrep ripgrep
swaybg
# Scripts # Scripts
scripts.screenshot scripts.screenshot
scripts.set-background scripts.set-background
]; ];
sessionVariables = { sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";

View file

@ -1,4 +1,5 @@
{ pkgs, config, lib, ... }: { { pkgs, ... }:
{
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.nico = { profiles.nico = {
@ -7,62 +8,56 @@
search = { search = {
default = "DuckDuckGo"; default = "DuckDuckGo";
force = true; force = true;
engines = let engines =
nixicon = let
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; nixicon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
iconUpdateInteval = 24 * 60 * 60 * 1000; # every day iconUpdateInteval = 24 * 60 * 60 * 1000; # every day
in { in
{
"NixOS Packages" = { "NixOS Packages" = {
urls = [{ urls = [ { template = "https://search.nixos.org/packages?query={searchTerms}"; } ];
template =
"https://search.nixos.org/packages?query={searchTerms}";
}];
icon = nixicon; icon = nixicon;
definedAliases = [ "@nixpkg" ]; definedAliases = [ "@nixpkg" ];
}; };
"NixOS Wiki" = { "NixOS Wiki" = {
urls = [{ urls = [ { template = "https://wiki.nixos.org/index.php?search={searchTerms}"; } ];
template =
"https://wiki.nixos.org/index.php?search={searchTerms}";
}];
icon = nixicon; icon = nixicon;
definedAliases = [ "@nixwiki" ]; definedAliases = [ "@nixwiki" ];
}; };
"NixOS Options" = { "NixOS Options" = {
urls = [{ urls = [ { template = "https://search.nixos.org/options?query={searchTerms}"; } ];
template = "https://search.nixos.org/options?query={searchTerms}";
}];
icon = nixicon; icon = nixicon;
definedAliases = [ "@nixoptions" ]; definedAliases = [ "@nixoptions" ];
}; };
"Arch Wiki" = { "Arch Wiki" = {
urls = [{ urls = [
template = { template = "https://wiki.archlinux.org/index.php?title=Special:Search&search={searchTerms}"; }
"https://wiki.archlinux.org/index.php?title=Special:Search&search={searchTerms}"; ];
}];
iconUpdateURL = "https://nixos.wiki/favicon.ico"; iconUpdateURL = "https://nixos.wiki/favicon.ico";
updateInterval = iconUpdateInteval; updateInterval = iconUpdateInteval;
definedAliases = [ "@archwiki" ]; definedAliases = [ "@archwiki" ];
}; };
"DuckDuckGo" = { "DuckDuckGo" = {
urls = [{ template = "https://duckduckgo.com/?q={searchTerms}"; }]; urls = [ { template = "https://duckduckgo.com/?q={searchTerms}"; } ];
iconUpdateURL = "https://duckduckgo.com/favicon.ico"; iconUpdateURL = "https://duckduckgo.com/favicon.ico";
updateInterval = iconUpdateInteval; updateInterval = iconUpdateInteval;
definedAliases = [ "@duckduckgo" "@ddg" ]; definedAliases = [
"@duckduckgo"
"@ddg"
];
}; };
"MyNixOS" = { "MyNixOS" = {
urls = urls = [ { template = "https://mynixos.com/search?q={searchTerms}"; } ];
[{ template = "https://mynixos.com/search?q={searchTerms}"; }];
iconUpdateURL = "https://mynixos.com/favicon.ico"; iconUpdateURL = "https://mynixos.com/favicon.ico";
updateInterval = iconUpdateInteval; updateInterval = iconUpdateInteval;
definedAliases = [ "@hm" "@mynixos" ]; definedAliases = [
"@hm"
"@mynixos"
];
}; };
"stackoverflow" = { "stackoverflow" = {
urls = [{ urls = [ { template = "https://stackoverflow.com/search?q={searchTerms}"; } ];
template = "https://stackoverflow.com/search?q={searchTerms}"; iconUpdateURL = "https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico";
}];
iconUpdateURL =
"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico";
updateInterval = iconUpdateInteval; updateInterval = iconUpdateInteval;
definedAliases = [ "@stackoverflow" ]; definedAliases = [ "@stackoverflow" ];
}; };

View file

@ -1,4 +1,5 @@
{ pkgs, config, lib, ... }: { { ... }:
{
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAbbrs = { shellAbbrs = {
@ -12,8 +13,7 @@
functions = { functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv"; gitignore = "curl -sL https://www.gitignore.io/api/$argv";
nrun = "nix run nixpkgs#$argv[1] -- $argv[2..]"; nrun = "nix run nixpkgs#$argv[1] -- $argv[2..]";
mv-bad-creation-date = '' mv-bad-creation-date = ''exiftool -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]"'';
exiftool -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]"'';
rename-images = '' rename-images = ''
set -f input "$PWD/$argv[1]" set -f input "$PWD/$argv[1]"

View file

@ -1,9 +1,15 @@
{ pkgs, system, config, lib, ... }: { { pkgs, ... }:
programs.neovim = let {
programs.neovim =
let
customR = pkgs.rWrapper.override { customR = pkgs.rWrapper.override {
packages = with pkgs.rPackages; [ styler languageserver ]; packages = with pkgs.rPackages; [
styler
languageserver
];
}; };
in { in
{
defaultEditor = true; defaultEditor = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
@ -13,7 +19,6 @@
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# Language Servers # Language Servers
rust-analyzer rust-analyzer
#unstable.rust-analyzer
nixd nixd
clang clang
nodePackages_latest.pyright nodePackages_latest.pyright
@ -30,7 +35,7 @@
taplo # TOML formatter taplo # TOML formatter
rustfmt # Rust formatter rustfmt # Rust formatter
shfmt # Shell, Bash etc. shfmt # Shell, Bash etc.
nixfmt-rfc-style
# Misc # Misc
ripgrep ripgrep
rustc rustc
@ -40,5 +45,4 @@
customR customR
]; ];
}; };
} }

View file

@ -1,6 +1,10 @@
{ pkgs, config, lib, ... }: { { pkgs, config, ... }:
programs.rofi = let conf = "${config.home.homeDirectory}/.config/rofi"; {
in { programs.rofi =
let
conf = "${config.home.homeDirectory}/.config/rofi";
in
{
enable = true; enable = true;
plugins = [ pkgs.rofi-calc ]; plugins = [ pkgs.rofi-calc ];
theme = "${conf}/themes/rounded-gray-dark.rasi"; theme = "${conf}/themes/rounded-gray-dark.rasi";
@ -23,7 +27,14 @@
steal-focus = true; steal-focus = true;
drun-use-desktop-cache = true; drun-use-desktop-cache = true;
drun-reload-desktop-cache = true; drun-reload-desktop-cache = true;
combi-modes = [ "window" "drun" "filebrowser" "ssh" "calc" "obsidian" ]; combi-modes = [
"window"
"drun"
"filebrowser"
"ssh"
"calc"
"obsidian"
];
}; };
}; };
} }

View file

@ -1,8 +1,14 @@
{ pkgs, ... }: { { pkgs, ... }:
screenshot = with pkgs; {
screenshot =
with pkgs;
writeShellApplication { writeShellApplication {
name = "screenshot"; name = "screenshot";
runtimeInputs = [ slurp wl-clipboard libnotify ]; runtimeInputs = [
slurp
wl-clipboard
libnotify
];
text = '' text = ''
location="$HOME/Pictures/Screenshots/$(date +%Y-%m-%d-%H%M%S)-screenshot.png"; location="$HOME/Pictures/Screenshots/$(date +%Y-%m-%d-%H%M%S)-screenshot.png";
@ -12,11 +18,12 @@
fi fi
''; '';
}; };
set-background = pkgs.writers.writeFishBin "set-background" (builtins.readFile set-background = pkgs.writers.writeFishBin "set-background" (
(pkgs.fetchurl { builtins.readFile (
url = pkgs.fetchurl {
"https://codeberg.org/Nydragon/scripts/raw/commit/bb7a40545fa5cfce177cdac009d9f46f4823d360/set_background.fish"; url = "https://codeberg.org/Nydragon/scripts/raw/commit/bb7a40545fa5cfce177cdac009d9f46f4823d360/set_background.fish";
hash = "sha256-Qoz5nn0tqV6QtsXv9fsOkf3PafL30iO/eIkh8ro6O+c="; hash = "sha256-Qoz5nn0tqV6QtsXv9fsOkf3PafL30iO/eIkh8ro6O+c=";
})); }
)
);
} }

View file

@ -1,8 +1,18 @@
# vim:fileencoding=utf-8:foldmethod=marker # vim:fileencoding=utf-8:foldmethod=marker
{ pkgs, config, lib, ... }: { {
imports = [ ./swayidle.nix ]; pkgs,
config,
lib,
...
}:
{
imports = [
./swayidle.nix
./swaylock.nix
];
wayland.windowManager.sway = let wayland.windowManager.sway =
let
screenshot = (import ../scripts { inherit pkgs; }).screenshot; screenshot = (import ../scripts { inherit pkgs; }).screenshot;
set-background = (import ../scripts { inherit pkgs; }).set-background; set-background = (import ../scripts { inherit pkgs; }).set-background;
@ -21,8 +31,8 @@
}; };
}; };
wallpaper = "${homeDirectory}/Pictures/backgrounds/catppucchin"; wallpaper = "${homeDirectory}/Pictures/backgrounds/catppucchin";
scripts = "${homeDirectory}/.config/system_scripts"; in
in { {
enable = true; enable = true;
xwayland = true; xwayland = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
@ -41,14 +51,16 @@
workspace 1 workspace 1
''; '';
config = { config = {
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; bars = [ { command = "${pkgs.waybar}/bin/waybar"; } ];
modifier = "Mod4"; modifier = "Mod4";
#: Keybindings {{{ #: Keybindings {{{
keybindings = let mod = config.wayland.windowManager.sway.config.modifier; keybindings =
in lib.mkOptionDefault { let
mod = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${mod}+p" = "exec ${pkgs.swaylock}/bin/swaylock"; "${mod}+p" = "exec ${pkgs.swaylock}/bin/swaylock";
"${mod}+Shift+p" = "${mod}+Shift+p" = "exec ${pkgs.rofi}/bin/rofi -show p -modi p:rofi-power-menu";
"exec ${pkgs.rofi}/bin/rofi -show p -modi p:rofi-power-menu";
# Reload the config file # Reload the config file
"${mod}+Shift+c" = "reload"; "${mod}+Shift+c" = "reload";
# Kill the focused window # Kill the focused window
@ -56,8 +68,7 @@
# Make focused window fullscreen # Make focused window fullscreen
"${mod}+f" = "fullscreen"; "${mod}+f" = "fullscreen";
# Start launcher # Start launcher
"${mod}+d" = "${mod}+d" = "exec rofi -config ${homeDirectory}/.config/rofi/config.rasi -show combi -automatic-save-to-history | xargs swaymsg exec --";
"exec rofi -config ${homeDirectory}/.config/rofi/config.rasi -show combi -automatic-save-to-history | xargs swaymsg exec --";
# Toggle the current focus between tiling and floating mode # Toggle the current focus between tiling and floating mode
"${mod}+Shift+space" = "floating toggle"; "${mod}+Shift+space" = "floating toggle";
"${mod}+Return" = "exec ${term}"; "${mod}+Return" = "exec ${term}";
@ -66,18 +77,12 @@
"${mod}+Control+Left" = "workspace prev"; "${mod}+Control+Left" = "workspace prev";
"${mod}+Control+Right" = "workspace next"; "${mod}+Control+Right" = "workspace next";
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t"; "${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"--locked XF86MonBrightnessUp" = "--locked XF86MonBrightnessUp" = "exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s +10%";
"exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s +10%"; "--locked XF86MonBrightnessDown" = "exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s 10%-";
"--locked XF86MonBrightnessDown" = "--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
"exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s 10%-"; "--locked XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"--locked XF86AudioRaiseVolume" = "--locked XF86AudioMicMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer --default-source -m";
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5"; "--locked XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"--locked XF86AudioLowerVolume" =
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"--locked XF86AudioMicMute" =
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer --default-source -m";
"--locked XF86AudioMute" =
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"--locked XF86AudioPlay" = "exec playerctl play-pause"; "--locked XF86AudioPlay" = "exec playerctl play-pause";
"--locked XF86AudioPause" = "exec playerctl play-pause"; "--locked XF86AudioPause" = "exec playerctl play-pause";
"--locked XF86AudioNext" = "exec playerctl next"; "--locked XF86AudioNext" = "exec playerctl next";
@ -85,62 +90,38 @@
"Print" = "exec ${screenshot}/bin/screenshot"; "Print" = "exec ${screenshot}/bin/screenshot";
"${mod}+u" = "exec ${screenshot}/bin/screenshot"; "${mod}+u" = "exec ${screenshot}/bin/screenshot";
#: {{{ #: {{{
"--input-device=${inputs.kb.builtin} ${mod}+ampersand" = "--input-device=${inputs.kb.builtin} ${mod}+ampersand" = "workspace number 1";
"workspace number 1"; "--input-device=${inputs.kb.builtin} ${mod}+eacute" = "workspace number 2";
"--input-device=${inputs.kb.builtin} ${mod}+eacute" = "--input-device=${inputs.kb.builtin} ${mod}+quotedbl" = "workspace number 3";
"workspace number 2"; "--input-device=${inputs.kb.builtin} ${mod}+apostrophe" = "workspace number 4";
"--input-device=${inputs.kb.builtin} ${mod}+quotedbl" = "--input-device=${inputs.kb.builtin} ${mod}+parenleft" = "workspace number 5";
"workspace number 3"; "--input-device=${inputs.kb.builtin} ${mod}+minus" = "workspace number 6";
"--input-device=${inputs.kb.builtin} ${mod}+apostrophe" = "--input-device=${inputs.kb.builtin} ${mod}+egrave" = "workspace number 7";
"workspace number 4"; "--input-device=${inputs.kb.builtin} ${mod}+underscore" = "workspace number 8";
"--input-device=${inputs.kb.builtin} ${mod}+parenleft" = "--input-device=${inputs.kb.builtin} ${mod}+ccedilla" = "workspace number 9";
"workspace number 5"; "--input-device=${inputs.kb.builtin} ${mod}+agrave" = "workspace number 10";
"--input-device=${inputs.kb.builtin} ${mod}+minus" = "--input-device=${inputs.kb.builtin} ${mod}+Shift+ampersand" = "move container to workspace number 1";
"workspace number 6"; "--input-device=${inputs.kb.builtin} ${mod}+Shift+eacute" = "move container to workspace number 2";
"--input-device=${inputs.kb.builtin} ${mod}+egrave" = "--input-device=${inputs.kb.builtin} ${mod}+Shift+quotedbl" = "move container to workspace number 3";
"workspace number 7"; "--input-device=${inputs.kb.builtin} ${mod}+Shift+apostrophe" = "move container to workspace number 4";
"--input-device=${inputs.kb.builtin} ${mod}+underscore" = "--input-device=${inputs.kb.builtin} ${mod}+Shift+parenleft" = "move container to workspace number 5";
"workspace number 8"; "--input-device=${inputs.kb.builtin} ${mod}+Shift+minus" = "move container to workspace number 6";
"--input-device=${inputs.kb.builtin} ${mod}+ccedilla" = "--input-device=${inputs.kb.builtin} ${mod}+Shift+egrave" = "move container to workspace number 7";
"workspace number 9"; "--input-device=${inputs.kb.builtin} ${mod}+Shift+underscore" = "move container to workspace number 8";
"--input-device=${inputs.kb.builtin} ${mod}+agrave" = "--input-device=${inputs.kb.builtin} ${mod}+Shift+ccedilla" = "move container to workspace number 9";
"workspace number 10"; "--input-device=${inputs.kb.builtin} ${mod}+Shift+agrave" = "move container to workspace number 10";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+ampersand" =
"move container to workspace number 1";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+eacute" =
"move container to workspace number 2";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+quotedbl" =
"move container to workspace number 3";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+apostrophe" =
"move container to workspace number 4";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+parenleft" =
"move container to workspace number 5";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+minus" =
"move container to workspace number 6";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+egrave" =
"move container to workspace number 7";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+underscore" =
"move container to workspace number 8";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+ccedilla" =
"move container to workspace number 9";
"--input-device=${inputs.kb.builtin} ${mod}+Shift+agrave" =
"move container to workspace number 10";
#: }}} #: }}}
}; };
#: }}} #: }}}
#: Startup {{{ #: Startup {{{
startup = [ startup = [
{ { command = "${pkgs.swayidle}/bin/swayidle -C ${homeDirectory}/.config/swayidle/config"; }
command =
"${pkgs.swayidle}/bin/swayidle -C ${homeDirectory}/.config/swayidle/config";
}
{ {
command = "${pkgs.swaynotificationcenter}/bin/swaync"; command = "${pkgs.swaynotificationcenter}/bin/swaync";
} }
{ {
command = '' command = ''[ -z "$(pidof nextcloud)" ] && ${pkgs.nextcloud-client}/bin/nextcloud --background'';
[ -z "$(pidof nextcloud)" ] && ${pkgs.nextcloud-client}/bin/nextcloud --background'';
} }
{ {
command = '' command = ''
@ -152,17 +133,16 @@
always = true; always = true;
} }
{ {
command = command = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config --reload-css";
"${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config --reload-css";
always = true; always = true;
} }
]; ];
#: }}} #: }}}
assigns = { assigns = {
"2" = [{ app_id = "firefox"; }]; "2" = [ { app_id = "firefox"; } ];
"3" = [ ]; "3" = [ ];
"4" = [{ class = "discord"; }]; "4" = [ { class = "discord"; } ];
"5" = [{ app_id = "lollypop"; }]; "5" = [ { app_id = "lollypop"; } ];
}; };
seat = { seat = {
"*" = { "*" = {
@ -190,7 +170,6 @@
"com.nextcloud.desktopclient.nextcloud" "com.nextcloud.desktopclient.nextcloud"
]) ])
})$"; })$";
} }
{ {
command = ''title_format "[XWayland] %title"''; command = ''title_format "[XWayland] %title"'';
@ -212,14 +191,18 @@
childBorder = lavender; childBorder = lavender;
}; };
}; };
gaps = { inner = 5; }; gaps = {
inner = 5;
};
#: Input {{{ #: Input {{{
input = { input = {
"*" = { "*" = {
xkb_layout = "fr,us"; xkb_layout = "fr,us";
xkb_options = "grp:alt_shift_toggle,compose:caps"; xkb_options = "grp:alt_shift_toggle,compose:caps";
}; };
"${inputs.kb.builtin}" = { xkb_layout = "fr"; }; "${inputs.kb.builtin}" = {
xkb_layout = "fr";
};
"${inputs.kb.keychron}" = { "${inputs.kb.keychron}" = {
xkb_layout = "us"; xkb_layout = "us";
xkb_numlock = "enabled"; xkb_numlock = "enabled";

View file

@ -1,4 +1,5 @@
{ pkgs, config, lib, ... }: { { pkgs, ... }:
{
services.swayidle = { services.swayidle = {
enable = true; enable = true;
events = [ events = [

View file

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }: { pkgs, ... }:
let let
pointer = { pointer = {
@ -6,8 +6,11 @@ let
package = pkgs.catppuccin-cursors.frappeLavender; package = pkgs.catppuccin-cursors.frappeLavender;
size = 32; size = 32;
}; };
in { in
programs.swaylock = { enable = true; }; {
programs.swaylock = {
enable = true;
};
gtk = { gtk = {
enable = true; enable = true;
theme = { theme = {

View file

@ -1,7 +1,10 @@
{ pkgs, config, lib, ... }: { { ... }:
{
programs.thunderbird = { programs.thunderbird = {
enable = true; enable = true;
#settings = { mailnews.wraplength = 80; }; #settings = { mailnews.wraplength = 80; };
profiles.nico = { isDefault = true; }; profiles.nico = {
isDefault = true;
};
}; };
} }

View file

@ -1,13 +1,20 @@
# vim:fileencoding=utf-8:foldmethod=marker # vim:fileencoding=utf-8:foldmethod=marker
{ config, pkgs, lib, inputs, system, unstable, ... }: {
config,
pkgs,
inputs,
system,
...
}:
let let
stateVersion = "23.11"; stateVersion = "23.11";
username = "nico"; username = "nico";
hostename = "xps9510"; hostname = "xps9510";
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
in
in { {
imports = [ # Include the results of the hardware scan. imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
../../modules ../../modules
@ -17,13 +24,9 @@ in {
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices."luks-7adaa102-d438-4e9e-9972-4a3c91b887b3".device = boot.initrd.luks.devices."luks-7adaa102-d438-4e9e-9972-4a3c91b887b3".device = "/dev/disk/by-uuid/7adaa102-d438-4e9e-9972-4a3c91b887b3";
"/dev/disk/by-uuid/7adaa102-d438-4e9e-9972-4a3c91b887b3"; networking.hostName = hostname;
networking.hostName = hostename;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -52,10 +55,12 @@ in {
xdg.mime = { xdg.mime = {
enable = true; enable = true;
defaultApplications = let defaultApplications =
let
fileManager = "org.gnome.Nautilus.desktop"; fileManager = "org.gnome.Nautilus.desktop";
browser = "firefox.desktop"; browser = "firefox.desktop";
in { in
{
"inode/directory" = fileManager; "inode/directory" = fileManager;
"application/zip" = fileManager; "application/zip" = fileManager;
"application/pdf" = browser; "application/pdf" = browser;
@ -70,8 +75,15 @@ in {
}; };
home-manager.users.${username} = import ../../home { home-manager.users.${username} = import ../../home {
inherit config pkgs system inputs stateVersion username homeDirectory inherit
unstable; config
pkgs
system
inputs
stateVersion
username
homeDirectory
;
}; };
# home-manager.users.nico = # home-manager.users.nico =
@ -79,7 +91,7 @@ in {
#{ config, pkgs, ... }: #{ config, pkgs, ... }:
#programs.vscode = { #programs.vscode = {
#enable = false; #enable = false;
#package = unstable.vscodium; #package = vscodium;
#extensions = with pkgs.vscode-extensions; [ #extensions = with pkgs.vscode-extensions; [
#yzhang.markdown-all-in-one #yzhang.markdown-all-in-one
#rust-lang.rust-analyzer #rust-lang.rust-analyzer
@ -117,7 +129,6 @@ in {
#Optional helps save long term battery health #Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
}; };
}; };
@ -153,15 +164,19 @@ in {
users.users.${username} = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
createHome = true; createHome = true;
extraGroups = [ "networkmanager" "wheel" "audio" "libvirtd" ]; extraGroups = [
"networkmanager"
"wheel"
"audio"
"libvirtd"
];
}; };
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {
initial_session = { initial_session = {
command = command = "${pkgs.greetd.greetd}/bin/agreety --cmd ${pkgs.sway}/bin/sway";
"${pkgs.greetd.greetd}/bin/agreety --cmd ${pkgs.sway}/bin/sway";
user = "${username}"; user = "${username}";
}; };
default_session = initial_session; default_session = initial_session;
@ -179,7 +194,7 @@ in {
#grim #grim
#slurp #slurp
#wl-clipboard #wl-clipboard
#unstable.swaynotificationcenter #swaynotificationcenter
#swaybg #swaybg
#swaylock #swaylock
#swayidle #swayidle
@ -208,10 +223,11 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
shared-mime-info shared-mime-info
fish fish
firefox
nextcloud-client nextcloud-client
git git
keepassxc keepassxc
firefox
htop
alacritty alacritty
eza eza
bat bat
@ -224,7 +240,6 @@ in {
dconf dconf
pavucontrol pavucontrol
xdg-utils xdg-utils
htop
brightnessctl brightnessctl
]; ];

View file

@ -1,7 +1,12 @@
# 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 = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -24,16 +29,14 @@
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-ef68c7a7-4355-4c37-bd6f-b753f6b9520c".device = boot.initrd.luks.devices."luks-ef68c7a7-4355-4c37-bd6f-b753f6b9520c".device = "/dev/disk/by-uuid/ef68c7a7-4355-4c37-bd6f-b753f6b9520c";
"/dev/disk/by-uuid/ef68c7a7-4355-4c37-bd6f-b753f6b9520c";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/83C5-F9F2"; device = "/dev/disk/by-uuid/83C5-F9F2";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/ba211282-a02a-42d6-9a89-9998ffee4755"; } ];
[{ device = "/dev/disk/by-uuid/ba211282-a02a-42d6-9a89-9998ffee4755"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -43,6 +46,5 @@
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }