From 0fb297b57d7efd947777157762414a6141627f84 Mon Sep 17 00:00:00 2001 From: alisceon Date: Wed, 23 Jul 2025 13:12:09 +0200 Subject: [PATCH] iter --- dotfiles/.bashrc | 27 ------- dotfiles/.config/fish/config.fish | 4 -- dotfiles/.config/fish/fish_variables | 31 -------- dotfiles/.ssh/config | 29 -------- dotfiles/.xonshrc | 4 -- etc/hostname | 0 etc/hosts | 0 etc/resolv.conf | 0 flake.lock | 8 +-- flake.nix | 2 +- home/users/alisceon.nix | 103 ++++++++++++++++++++++----- hosts/laptop/configuration.nix | 65 +++++++++-------- run/.containerenv | 0 13 files changed, 128 insertions(+), 145 deletions(-) delete mode 100644 dotfiles/.bashrc delete mode 100644 dotfiles/.config/fish/config.fish delete mode 100644 dotfiles/.config/fish/fish_variables delete mode 100644 dotfiles/.ssh/config delete mode 100644 dotfiles/.xonshrc create mode 100755 etc/hostname create mode 100755 etc/hosts create mode 100755 etc/resolv.conf create mode 100755 run/.containerenv diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc deleted file mode 100644 index ad4581e..0000000 --- a/dotfiles/.bashrc +++ /dev/null @@ -1,27 +0,0 @@ -# .bashrc - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# User specific environment -if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] -then - PATH="$HOME/.local/bin:$HOME/bin:$PATH" -fi -export PATH - -# Uncomment the following line if you don't like systemctl's auto-paging feature: -# export SYSTEMD_PAGER= - -# User specific aliases and functions -if [ -d ~/.bashrc.d ]; then - for rc in ~/.bashrc.d/*; do - if [ -f "$rc" ]; then - . "$rc" - fi - done -fi - -unset rc diff --git a/dotfiles/.config/fish/config.fish b/dotfiles/.config/fish/config.fish deleted file mode 100644 index 083edd8..0000000 --- a/dotfiles/.config/fish/config.fish +++ /dev/null @@ -1,4 +0,0 @@ -if status is-interactive - # Commands to run in interactive sessions can go here - abbr -a tsla-fan ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0 -end diff --git a/dotfiles/.config/fish/fish_variables b/dotfiles/.config/fish/fish_variables deleted file mode 100644 index 40201c4..0000000 --- a/dotfiles/.config/fish/fish_variables +++ /dev/null @@ -1,31 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR __fish_initialized:3800 -SETUVAR fish_color_autosuggestion:555\x1ebrblack -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:blue -SETUVAR fish_color_comment:red -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:green -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_host_remote:yellow -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:brcyan -SETUVAR fish_color_param:cyan -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold -SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_key_bindings:fish_default_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di -SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/dotfiles/.ssh/config b/dotfiles/.ssh/config deleted file mode 100644 index 4570c09..0000000 --- a/dotfiles/.ssh/config +++ /dev/null @@ -1,29 +0,0 @@ -Host alisceon.com - HostName alisceon.com - User opc - -Host miscbox - HostName 10.1.0.11 - ProxyJump alisceon.com - user opc - -Host blogbox - HostName 10.1.0.10 - ProxyJump alisceon.com - user ubuntu - -Host filurbox - Hostname oci.malice.zone - User opc - -Host dnspi - Hostname 10.40.0.2 - User pi - -Host tsla-exporter-bridge - Hostname alma02.lab.the.malice.zone - User root - -Host tsla-runner-boi - Hostname alma03.lab.the.malice.zone - User root diff --git a/dotfiles/.xonshrc b/dotfiles/.xonshrc deleted file mode 100644 index ace84af..0000000 --- a/dotfiles/.xonshrc +++ /dev/null @@ -1,4 +0,0 @@ -# XONSH WEBCONFIG START -$XONSH_COLOR_STYLE = 'default' -$PROMPT = '{YELLOW}{env_name}{RESET}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {RED}{last_return_code_if_nonzero:[{BOLD_INTENSE_RED}{}{RED}] }{RESET}{BOLD_BLUE}{prompt_end}{RESET} ' -# XONSH WEBCONFIG END \ No newline at end of file diff --git a/etc/hostname b/etc/hostname new file mode 100755 index 0000000..e69de29 diff --git a/etc/hosts b/etc/hosts new file mode 100755 index 0000000..e69de29 diff --git a/etc/resolv.conf b/etc/resolv.conf new file mode 100755 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock index d5e05a5..38da35d 100644 --- a/flake.lock +++ b/flake.lock @@ -56,16 +56,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1735563628, - "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "lastModified": 1753115646, + "narHash": "sha256-yLuz5cz5Z+sn8DRAfNkrd2Z1cV6DaYO9JMrEz4KZo/c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "rev": "92c2e04a475523e723c67ef872d8037379073681", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index d43d280..4460357 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; flake-utils.url = "github:numtide/flake-utils"; home-manager = { url = "github:nix-community/home-manager"; diff --git a/home/users/alisceon.nix b/home/users/alisceon.nix index 15f2538..56c2694 100644 --- a/home/users/alisceon.nix +++ b/home/users/alisceon.nix @@ -1,23 +1,89 @@ -{ pkgs, ... }: { +{ pkgs, config, ... }: { home.username = "alisceon"; home.homeDirectory = "/home/alisceon"; home.stateVersion = "24.05"; + manual.manpages.enable = true; - - programs.fish.enable = true; - programs.git.enable = true; - - programs.vscode.enable = true; - programs.firefox = { - enable = true; - nativeMessagingHosts = [ - pkgs.gnome-browser-connector - ]; + programs = { + fish = { + enable = true; + # Disable greeting + interactiveShellInit = '' + set fish_greeting + ''; + preferAbbrs = true; + shellAbbrs = { + ls = "exa"; + ll = "exa -lah"; + grep = "rg"; + cat = "bat"; + tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0"; + nixos-switch = "sudo nixos-rebuild switch --flake .#"; + nixos-test = "sudo nixos-rebuild build-vm --flake .#"; + pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/"; + }; + }; + git = { + enable = true; + userName = "alisceon"; + userEmail = "alisceon@protonmail.com"; + extraConfig = { + push = { autoSetupRemote = true; }; + }; + }; + vscode.enable = true; + firefox = { + enable = true; + nativeMessagingHosts = [ + pkgs.gnome-browser-connector + ]; + }; + obsidian = { + enable = true; + package = pkgs.obsidian; + + vaults = { + "Documents/Obsidian/private".enable = true; + }; + }; + bat.enable = true; + ssh = { + enable = true; + matchBlocks = { + "alisceon.com" = { + hostname = "alisceon.com"; + user = "opc"; + }; + "miscbox" = { + hostname = "10.1.0.11"; + proxyJump = "alisceon.com"; + user = "opc"; + }; + "blogbox" = { + hostname = "10.1.0.10"; + proxyJump = "alisceon.com"; + user = "ubuntu"; + }; + "filurbox" = { + hostname = "oci.malice.zone"; + user = "opc"; + }; + "dnspi" = { + hostname = "10.40.0.2"; + user = "pi"; + }; + "tsla-exporter-bridge" = { + hostname = "alma02.lab.the.malice.zone"; + user = "root"; + }; + "tsla-runner-boi" = { + hostname = "alma03.lab.the.malice.zone"; + user = "root"; + }; + }; + }; }; - programs.obsidian.enable = true; - programs.bat.enable = true; - home.packages = with pkgs; [ signal-desktop discord @@ -26,9 +92,12 @@ ripgrep ]; - xdg.enable = true; - xdg.userDirs.enable = true; - xdg.mime.enable = true; + xdg = { + enable = true; + userDirs.enable = true; + mime.enable = true; + }; + services.syncthing = { enable = true; }; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 3bb3fd0..61770fa 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -56,16 +56,7 @@ LC_TELEPHONE = "sv_SE.UTF-8"; LC_TIME = "sv_SE.UTF-8"; }; - - - services.displayManager = { - gdm.enable = true; - gdm.wayland = true; - }; - services.desktopManager.gnome.enable = true; - services.xserver.xkb.layout = "se"; - services.gnome.gnome-keyring.enable = true; nix.settings.auto-optimise-store = true; nix.gc = { automatic = true; @@ -75,25 +66,40 @@ console.keyMap = "sv-latin1"; - services.printing.enable = true; - services.pulseaudio.enable = false; - services.pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - jack.enable = true; + services= { + printing.enable = true; + fwupd.enable = true; + thermald.enable = true; + pulseaudio.enable = false; + gnome.gnome-keyring.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + jack.enable = true; + }; + power-profiles-daemon.enable = true; + displayManager = { + gdm.enable = true; + gdm.wayland = true; + }; + desktopManager.gnome.enable = true; + xserver.xkb.layout = "se"; }; - services.fwupd.enable = true; - - - programs.fish.enable = true; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; + programs = { + dconf.enable = true; + fish.enable = true; + steam = { + enable = true; + remotePlay.openFirewall = true; + }; }; environment.systemPackages = with pkgs; [ + # NIX Tools + vulnix + # CLI tools git wget @@ -112,9 +118,10 @@ # Browser firefox - # Editor + # Development vscode - obsidian + devenv + direnv # Virtualization podman @@ -125,10 +132,10 @@ gnomeExtensions.ddterm gnomeExtensions.unpanel - # Other syncthing steam + obsidian ]; virtualisation.podman = { @@ -144,9 +151,11 @@ }; security.sudo.wheelNeedsPassword = false; - programs.dconf.enable = true; - environment.shells = with pkgs; [ fish ]; + environment.shells = with pkgs; [ + fish + bash + ]; system.stateVersion = "24.05"; } diff --git a/run/.containerenv b/run/.containerenv new file mode 100755 index 0000000..e69de29