diff --git a/.bootstrap.sh b/.bootstrap.sh index fa596fd..86672fd 100644 --- a/.bootstrap.sh +++ b/.bootstrap.sh @@ -1,12 +1,15 @@ -#!/bin/bash +#!/usr/bin/env bash -# check if this is already a git repo. +# Temproraty test. +touch INIT_DOT + +# Check if this is already a git repo. if [[ -d ".git" ]]; then echo "Found the .git directory. Already initialized?" exit 1 fi -# sync. +# Sync. git init &> /dev/null git remote add origin https://git.voronind.com/voronind/linux.git &> /dev/null git fetch &> /dev/null diff --git a/.config/linux/system/flake.nix b/.config/linux/system/flake.nix index 55afc2c..b893983 100644 --- a/.config/linux/system/flake.nix +++ b/.config/linux/system/flake.nix @@ -3,7 +3,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; }; - outputs = { self, nixpkgs } @inputs: { + outputs = { self, nixpkgs } @inputs: rec { # Constant values. nixosModules.const = { hashedPassword = "$y$j9T$oqCB16i5E2t1t/HAWaFd5.$tTaHtAcifXaDVpTcRv.yH2/eWKxKE9xM8KcqXHfHrD7"; # Use `mkpasswd`. @@ -14,6 +14,7 @@ nixosModules.common.imports = [ ./module/common/Bootloader.nix ./module/common/Distrobox.nix + ./module/common/Dotfile.nix ./module/common/Firewall.nix ./module/common/Kernel.nix ./module/common/Locale.nix diff --git a/.config/linux/system/host/live/Configuration.nix b/.config/linux/system/host/live/Configuration.nix new file mode 100644 index 0000000..91cbd9e --- /dev/null +++ b/.config/linux/system/host/live/Configuration.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ]; +} diff --git a/.config/linux/system/host/live/HardwareConfiguration.nix b/.config/linux/system/host/live/HardwareConfiguration.nix new file mode 100644 index 0000000..04618ac --- /dev/null +++ b/.config/linux/system/host/live/HardwareConfiguration.nix @@ -0,0 +1,4 @@ +{ ... }: + +{ +} diff --git a/.config/linux/system/module/common/Dotfile.nix b/.config/linux/system/module/common/Dotfile.nix new file mode 100644 index 0000000..6fac0a7 --- /dev/null +++ b/.config/linux/system/module/common/Dotfile.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + systemd.user.services.dotfiles = { + description = "Install/update dotfiles in startup."; + wantedBy = [ "graphical-session-pre.target" ]; + serviceConfig.Type = "oneshot"; + script = '' + cd ~ + ${pkgs.curl}/bin/curl https://git.voronind.com/voronind/linux/raw/branch/main/.bootstrap.sh | ${pkgs.bash}/bin/bash || true + ${pkgs.git}/bin/git pull + ''; + }; +} diff --git a/.config/linux/system/module/common/Package.nix b/.config/linux/system/module/common/Package.nix index ffcc15f..5ca2948 100644 --- a/.config/linux/system/module/common/Package.nix +++ b/.config/linux/system/module/common/Package.nix @@ -7,6 +7,7 @@ binwalk btop cryptsetup + curl ddrescue ffmpeg file