diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..af0cc93 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +use flake diff --git a/.gitignore b/.gitignore index f7275bb..a80b726 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ venv/ +.direnv diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..de278bd --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,4 @@ +[[language]] +name = "nix" +auto-format = true +formatter = { command = "alejandra" } diff --git a/bar/default.nix b/bar/default.nix new file mode 100644 index 0000000..223c9a4 --- /dev/null +++ b/bar/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./eww + ]; +} + + diff --git a/bar/eww/default.nix b/bar/eww/default.nix new file mode 100644 index 0000000..4b0dcfc --- /dev/null +++ b/bar/eww/default.nix @@ -0,0 +1,20 @@ +{pkgs, ...}: { + home.file = { + ".config/eww".source = ../eww; + # Eww-barD script + ".local/bin/eww-bard" = { + source = ../../bin/eww-bard; + executable = true; + }; + }; + + home.packages = [ + pkgs.eww + # Script dependencies + pkgs.jq + pkgs.dash + pkgs.socat + pkgs.pamixer + pkgs.pavucontrol + ]; +} diff --git a/bar/eww/scripts/get-bluetooth-info b/bar/eww/scripts/get-bluetooth-info index 1e128b2..77a5c4a 100755 --- a/bar/eww/scripts/get-bluetooth-info +++ b/bar/eww/scripts/get-bluetooth-info @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env dash info (){ power=$(bluetoothctl show | grep Powered | awk '{print $2}' | sed 's/yes/on/g; s/no/off/g') diff --git a/bar/eww/scripts/get-connectivity b/bar/eww/scripts/get-connectivity index 66ee186..8009206 100755 --- a/bar/eww/scripts/get-connectivity +++ b/bar/eww/scripts/get-connectivity @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash print_state() { case "$1" in diff --git a/bar/eww/scripts/get-music-info b/bar/eww/scripts/get-music-info index 8aa6501..b129031 100755 --- a/bar/eww/scripts/get-music-info +++ b/bar/eww/scripts/get-music-info @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env dash info (){ title=$(playerctl metadata xesam:title 2> /dev/null) diff --git a/bar/eww/scripts/get-volume b/bar/eww/scripts/get-volume index f5706eb..1e6d202 100755 --- a/bar/eww/scripts/get-volume +++ b/bar/eww/scripts/get-volume @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh volume (){ vol=$(pamixer --get-volume-human) diff --git a/bar/eww/scripts/hypr/change-active-workspace b/bar/eww/scripts/hypr/change-active-workspace index 88f2dcf..ea811f2 100755 --- a/bar/eww/scripts/hypr/change-active-workspace +++ b/bar/eww/scripts/hypr/change-active-workspace @@ -1,4 +1,5 @@ -#!/bin/dash +#!/usr/bin/env dash + function clamp { min=$1 max=$2 diff --git a/bar/eww/scripts/hypr/hyprstatus b/bar/eww/scripts/hypr/hyprstatus index 942500b..10dc401 100755 --- a/bar/eww/scripts/hypr/hyprstatus +++ b/bar/eww/scripts/hypr/hyprstatus @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash spaces (){ hyprctl workspaces -j | jq -c 'map({id: .id, windows: .windows, monitor: .monitorID}) | sort_by(.id)' diff --git a/bar/eww/scripts/power_profile b/bar/eww/scripts/power_profile index 955761b..5494bd7 100755 --- a/bar/eww/scripts/power_profile +++ b/bar/eww/scripts/power_profile @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash profile="$(powerprofilesctl get)" diff --git a/bar/eww/scripts/refresh_rate b/bar/eww/scripts/refresh_rate index b523a28..cc02659 100755 --- a/bar/eww/scripts/refresh_rate +++ b/bar/eww/scripts/refresh_rate @@ -1,4 +1,5 @@ -#!/bin/dash +#!/usr/bin/env dash + refresh_rate=$(hyprctl -j monitors | jq '.[0].refreshRate | round') if [ "$1" = "toggle" ]; then diff --git a/bin/Hyprland b/bin/Hyprland index 133832b..df38ce4 100755 --- a/bin/Hyprland +++ b/bin/Hyprland @@ -9,6 +9,6 @@ export XDG_CONFIG_HOME="${HOME}/.config" # Execution exec ssh-agent \ dbus-launch --exit-with-session \ - /usr/bin/Hyprland \ + hyprland \ "$@" diff --git a/bin/eww-bard b/bin/eww-bard index 40015b2..6ba3646 100755 --- a/bin/eww-bard +++ b/bin/eww-bard @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash # Monitor duplication daemon WIDGET_NAME=bar diff --git a/bin/jaaj b/bin/jaaj index 2f76621..46b1e3f 100755 --- a/bin/jaaj +++ b/bin/jaaj @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python jaajs = [ """ diff --git a/bin/mc-key-fix b/bin/mc-key-fix index 4ee62e8..bb1bc79 100755 --- a/bin/mc-key-fix +++ b/bin/mc-key-fix @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh xmodmap -e "keycode 10 = 1" xmodmap -e "keycode 11 = 2" diff --git a/bin/uwu-launcher b/bin/uwu-launcher index 1cb5f10..27ad8b9 100755 --- a/bin/uwu-launcher +++ b/bin/uwu-launcher @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh alacritty --class "uwu-uwu" -e /usr/bin/bash -c "uwu | dotacat && read" & alacritty --class "uwu-neofetch" -e /usr/bin/bash -c "echo '' && neofetch && read" & diff --git a/de/default.nix b/de/default.nix new file mode 100644 index 0000000..3d62142 --- /dev/null +++ b/de/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hypr + ]; +} + diff --git a/de/hypr/default.nix b/de/hypr/default.nix new file mode 100644 index 0000000..57fa055 --- /dev/null +++ b/de/hypr/default.nix @@ -0,0 +1,58 @@ +{ + inputs, + pkgs, + ... +}: { + home.file = { + ".config/hypr/hyprland.conf.d".source = ./hyprland.conf.d; + # Hyprland launch wrapper + ".local/bin/Hyprland" = { + source = ../../bin/Hyprland; + executable = true; + }; + # UWU launcher script + ".local/bin/uwu-launcher" = { + source = ../../bin/uwu-launcher; + executable = true; + }; + # Togglescreen script + ".local/bin/togglescreen" = { + source = ../../bin/togglescreen; + executable = true; + }; + }; + + home.packages = [ + pkgs.egl-wayland # For NVIDIA compatibility + pkgs.xdg-desktop-portal-hyprland + # Common DE packages required in config + pkgs.wl-clipboard-rs + pkgs.grim + pkgs.slurp + pkgs.hyprpicker + pkgs.udiskie + pkgs.swww + # Apps launchable from bindings + pkgs.firefox + pkgs.kitty + pkgs.yazi + # Theme + pkgs.bibata-cursors + pkgs.qogir-theme + pkgs.qogir-icon-theme + ]; + + wayland.windowManager.hyprland = { + enable = true; + extraConfig = builtins.readFile ./hyprland.conf; + plugins = [inputs.hy3.packages.${pkgs.system}.hy3]; + }; + + # bar is required + imports = [ + ../../bar + ../../term/alacritty + ../../misc/swayosd + ../../misc/anyrun + ]; +} diff --git a/de/hypr/hyprland.conf.d/startup.conf b/de/hypr/hyprland.conf.d/startup.conf index ace6a7a..7fd4d95 100644 --- a/de/hypr/hyprland.conf.d/startup.conf +++ b/de/hypr/hyprland.conf.d/startup.conf @@ -1,10 +1,10 @@ # Startup -exec-once = hyprpm reload -n exec-once = artix-pipewire-launcher restart exec-once = end-rs daemon exec-once = wallpaperctl daemon exec-once = swayosd-server exec-once = udiskie exec-once = eww-bard +exec-once = hyprctl setcursor Bibata-Modern-Classic 24 exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP diff --git a/editor/default.nix b/editor/default.nix new file mode 100644 index 0000000..c672753 --- /dev/null +++ b/editor/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./helix + ]; +} diff --git a/editor/helix/default.nix b/editor/helix/default.nix new file mode 100644 index 0000000..c85c522 --- /dev/null +++ b/editor/helix/default.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.helix + ]; + + home.file = { + ".config/helix/config.toml".source = ./config.toml; + ".config/helix/languages.toml".source = ./languages.toml; + ".config/helix/themes/jaaj.toml".source = ./themes/jaaj.toml; + }; + + home.sessionVariables = { + EDITOR = "hx"; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..77f964f --- /dev/null +++ b/flake.lock @@ -0,0 +1,368 @@ +{ + "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hy3", + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hy3", + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725199881, + "narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726838624, + "narHash": "sha256-SU40aZ/UyK4bhuanaWvqlhIw2/kiDrGYcKxCkTn5FP8=", + "owner": "nix-community", + "repo": "disko", + "rev": "0fe779905ffe730eace0bf7ecf56938c625012a5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726440980, + "narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hy3": { + "inputs": { + "hyprland": "hyprland" + }, + "locked": { + "lastModified": 1725825817, + "narHash": "sha256-hBvwaMlgBuR2cB1Kx6cA1z7x38HXUujNcHtBsKhaEZs=", + "owner": "outfoxxed", + "repo": "hy3", + "rev": "4b194eb5486b89102726ad5f4492bb3440c46031", + "type": "github" + }, + "original": { + "owner": "outfoxxed", + "repo": "hy3", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hy3", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722623071, + "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1725814101, + "narHash": "sha256-+wE97utoDfhQP6AMdZHUmBeL8grbce/Jv2i5M+6AbaE=", + "ref": "refs/heads/main", + "rev": "0f594732b063a90d44df8c5d402d658f27471dfe", + "revCount": 5196, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "rev": "0f594732b063a90d44df8c5d402d658f27471dfe", + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hy3", + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725188252, + "narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "c12ab785ce1982f82594aff03b3104c598186ddd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1724966483, + "narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "disko": "disko", + "home-manager": "home-manager", + "hy3": "hy3", + "hyprland": [ + "hy3", + "hyprland" + ], + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hy3", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725203932, + "narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d4a4140 --- /dev/null +++ b/flake.nix @@ -0,0 +1,81 @@ +{ + description = "Configuration Home Manager jaajesque"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Hyprland + hyprland = { + url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + follows = "hy3/hyprland"; + }; + hy3 = { + url = "github:outfoxxed/hy3"; + }; + }; + + outputs = { + self, + nixpkgs, + disko, + home-manager, + ... + } @ inputs: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + nixosConfigurations = { + Zephyrus = nixpkgs.lib.nixosSystem { + extraArgs = {inherit inputs;}; + modules = [ + ./hosts/Zephyrus + disko.nixosModules.disko + home-manager.nixosModules.home-manager + ]; + }; + }; + + homeConfigurations = { + "gaspard" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + extraSpecialArgs = {inherit inputs;}; + modules = [ + ./users/gaspard.nix + ]; + }; + + "culisg@im2ag" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + extraSpecialArgs = {inherit inputs;}; + modules = [ + ./users/culisg.nix + ]; + }; + }; + + devShells.${system}.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + git + helix + pkgs.home-manager + alejandra + nil + ]; + + shellHook = '' + export EDITOR=hx + ''; + }; + }; +} diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix new file mode 100644 index 0000000..a0533f2 --- /dev/null +++ b/hosts/Zephyrus/default.nix @@ -0,0 +1,86 @@ +{ + inputs, + pkgs, + lib, + config, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; + + # Nix + nix.settings.experimental-features = ["nix-command" "flakes"]; + + # Set your time zone. + time.timeZone = "Europe/Paris"; + + console.keyMap = "fr"; + + # Network & Bluetooth + networking.wireless.iwd.enable = true; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + + # Audio + hardware.pulseaudio.enable = true; + + # Services + services.seatd.enable = true; + services.blueman.enable = true; + services.pipewire.pulse.enable = true; + services.power-profiles-daemon.enable = true; + + # Programs + environment.systemPackages = [ + pkgs.git + pkgs.ncdu + pkgs.neofetch + pkgs.bottom + pkgs.htop + pkgs.iwgtk + ]; + + # NVIDIA + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; + + hardware.graphics.enable = true; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + modesetting.enable = true; + + open = false; # Bruuh + + prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # User config + users.groups.gaspard = { + name = "gaspard"; + }; + users.users.gaspard = { + isNormalUser = true; + extraGroups = [ + "wheel" + "video" + "seat" + "audio" + ]; + group = "gaspard"; + }; + + home-manager = { + extraSpecialArgs = {inherit inputs;}; + users = { + "gaspard" = import ../../users/gaspard.nix; + }; + }; + + system.stateVersion = "24.11"; +} diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix new file mode 100644 index 0000000..570efc9 --- /dev/null +++ b/hosts/Zephyrus/disko-config.nix @@ -0,0 +1,80 @@ +{ + disko.devices = { + disk = { + samsung980 = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + settings = { + allowDiscards = true; + # askPassword = true; + }; + content = { + type = "lvm_pv"; + vg = "zephyrus_vg"; + }; + }; + }; + }; + }; + }; + }; + lvm_vg = { + zephyrus_vg = { + type = "lvm_vg"; + lvs = { + swap = { + size = "16G"; + content = { + type = "swap"; + resumeDevice = true; + }; + }; + root = { + size = "64G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + "defaults" + ]; + }; + }; + var = { + size = "32G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/var"; + }; + }; + home = { + size = "100%FREE"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/Zephyrus/hardware-configuration.nix b/hosts/Zephyrus/hardware-configuration.nix new file mode 100644 index 0000000..0035108 --- /dev/null +++ b/hosts/Zephyrus/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ./disko-config.nix + ]; + + boot = { + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + initrd = { + availableKernelModules = ["nvme" "xhci_pci" "usbhid" "sdhci_pci"]; + kernelModules = []; + }; + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + }; + }; + }; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp7s0f4u2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/misc/anyrun/default.nix b/misc/anyrun/default.nix new file mode 100644 index 0000000..850ff9e --- /dev/null +++ b/misc/anyrun/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/anyrun".source = ../anyrun; + }; + + home.packages = [ + pkgs.anyrun + ]; +} diff --git a/misc/swayosd/default.nix b/misc/swayosd/default.nix new file mode 100644 index 0000000..e9a958c --- /dev/null +++ b/misc/swayosd/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/swayosd/style.css".source = ./style.css; + }; + + home.packages = [ + pkgs.swayosd + ]; +} diff --git a/shell/bash/.bash_exec b/shell/bash/.bash_exec index dae12e3..af4d26a 100644 --- a/shell/bash/.bash_exec +++ b/shell/bash/.bash_exec @@ -13,7 +13,7 @@ fi # Start in zellij by default export ZELLIJ_AUTO_EXIT=true export ZELLIJ_CONFIG_FILE=~/.config/zellij/config.kdl -eval "$(zellij setup --generate-auto-start bash)" +# eval "$(zellij setup --generate-auto-start bash)" # fnm FNM_PATH="$HOME/.local/share/fnm" diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc index 54efb06..30ace4f 100755 --- a/shell/bash/.bashrc +++ b/shell/bash/.bashrc @@ -23,7 +23,7 @@ fi bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' -export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.local/bin:$HOME/.nix-profile/bin:$PATH" export EDITOR="hx" diff --git a/shell/bash/default.nix b/shell/bash/default.nix new file mode 100644 index 0000000..07cb835 --- /dev/null +++ b/shell/bash/default.nix @@ -0,0 +1,19 @@ +{ + pkgs, + ... +} : { + programs.bash = { + enable = true; + bashrcExtra = ". ${./.bashrc}"; + }; + + home.file = { + ".bash_aliases".source = ./.bash_aliases; + ".bash_exec".source = ./.bash_exec; + }; + + home.packages = [ + pkgs.starship + ]; +} + diff --git a/shell/default.nix b/shell/default.nix new file mode 100644 index 0000000..3a67f04 --- /dev/null +++ b/shell/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bash + ]; +} + diff --git a/term/alacritty/default.nix b/term/alacritty/default.nix new file mode 100644 index 0000000..fb81d11 --- /dev/null +++ b/term/alacritty/default.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + ... +} : { + home.file = { + ".config/alacritty/alacritty.toml".source = ./alacritty.toml; + }; + + home.packages = [ + pkgs.alacritty + pkgs.fira-code-nerdfont + ]; + + fonts.fontconfig.enable = true; +} + + diff --git a/term/default.nix b/term/default.nix new file mode 100644 index 0000000..92baeed --- /dev/null +++ b/term/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./alacritty + ./zellij + ]; +} diff --git a/term/zellij/default.nix b/term/zellij/default.nix new file mode 100644 index 0000000..0f974bf --- /dev/null +++ b/term/zellij/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/zellij/config.kdl".source = ./config.kdl; + }; + + home.packages = [ + pkgs.zellij + ]; +} diff --git a/users/culisg.nix b/users/culisg.nix new file mode 100644 index 0000000..d5fa2df --- /dev/null +++ b/users/culisg.nix @@ -0,0 +1,15 @@ +{ + home.username = "culisg"; + home.homeDirectory = "/home/c/culisg"; + home.stateVersion = "24.05"; + + programs.home-manager.enable = true; + programs.direnv.enable = true; + + imports = [ + ../shell + ../term + ../editor + ../de + ]; +} diff --git a/users/gaspard.nix b/users/gaspard.nix new file mode 100644 index 0000000..d32a6ea --- /dev/null +++ b/users/gaspard.nix @@ -0,0 +1,15 @@ +{...}: { + home.username = "gaspard"; + home.homeDirectory = "/home/gaspard"; + home.stateVersion = "24.05"; + + programs.home-manager.enable = true; + programs.direnv.enable = true; + + imports = [ + ../shell + ../term + ../editor + ../de + ]; +}