Initialze repository

This commit is contained in:
muon 2025-07-30 22:13:52 +00:00
commit 34f4d58e3e
7 changed files with 232 additions and 0 deletions

View file

@ -0,0 +1,2 @@
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

37
home/dotfiles/.bashrc Normal file
View file

@ -0,0 +1,37 @@
# Bash initialization for interactive non-login shells and
# for remote shells (info "(bash) Bash Startup Files").
# Export 'SHELL' to child processes. Programs such as 'screen'
# honor it and otherwise use /bin/sh.
export SHELL
if [[ $- != *i* ]]
then
# We are being invoked from a non-interactive shell. If this
# is an SSH session (as in "ssh host command"), source
# /etc/profile so we get PATH and other essential variables.
[[ -n "$SSH_CLIENT" ]] && source /etc/profile
# Don't do anything else.
return
fi
# Source the system-wide file.
source /etc/bashrc
# Adjust the prompt depending on whether we're in 'guix environment'.
if [ -n "$GUIX_ENVIRONMENT" ]
then
PS1='\u@\h \w [env]\$ '
else
PS1='\u@\h \w\$ '
fi
alias ls='ls -p --color=auto'
alias ll='ls -l'
alias la='ls -lah --color=auto'
alias grep='grep --color=auto'
force_color_prompt=yes
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '
set -o vi

View file

@ -0,0 +1,34 @@
;; This "home-environment" file can be passed to 'guix home reconfigure'
;; to reproduce the content of your profile. This is "symbolic": it only
;; specifies package names. To reproduce the exact same profile, you also
;; need to capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.
(use-modules (gnu home)
(gnu packages)
(gnu services)
(guix gexp)
(gnu home services shells))
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages (list "nss-certs" "git"
"gcc-toolchain@14" "helix")))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
(append (list (service home-bash-service-type
(home-bash-configuration
(aliases '(("grep" . "grep --color=auto")
("la" . "ls -lah --color=auto")
("ll" . "ls -l")
("ls" . "ls -p --color=auto")))
(bashrc (list (local-file
"/home/muon/src/guix-config/home/dotfiles/.bashrc"
"bashrc")))
(bash-profile (list (local-file
"/home/muon/src/guix-config/home/dotfiles/.bash_profile"
"bash_profile"))))))
%base-home-services)))

42
home/muix.scm Normal file
View file

@ -0,0 +1,42 @@
(use-modules (gnu home)
(gnu home services)
(gnu packages)
(gnu services)
(guix gexp)
(gnu home services shells))
(home-environment
(packages (specifications->packages
(list
"helix")))
(services (append (list
(service home-bash-service-type
(home-bash-configuration
(aliases '(("grep" . "grep --color=auto")
("la" . "ls -lah --color=auto")
("ll" . "ls -l")
("ls" . "ls -p --color=auto")))
(bashrc (list (local-file
"/home/muon/src/guix-config/home/dotfiles/.bashrc"
"bashrc")))
(bash-profile (list (local-file
"/home/muon/src/guix-config/home/dotfiles/.bash_profile"
"bash_profile")))))
(service home-inputrc-service-type
(home-inputrc-configuration
(variables
'(("editing-mode" . "vi")
("keymap" . "vi-insert")
("show-mode-in-prompt" . "on")
("keyseq-timeout" . "50")
("vi-cmd-mode-string" . "\\1\\e[2 q\\2")
("vi-ins-mode-string" . "\\1\\e[6 q\\2")))))
(simple-service 'my-env-vars home-environment-variables-service-type
'(("SSL_CERT_DIR" . "$HOME/.guix-profile/etc/ssl/certs")
("SSL_CERT_FILE" . "$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt")
("GIT_SSL_CAINFO" . "$SSL_CERT_FILE"))))
%base-home-services)))

30
home/old.scm Normal file
View file

@ -0,0 +1,30 @@
(use-modules (gnu home)
(gnu packages)
(gnu services)
(guix gexp)
(gnu home services shells))
(home-environment
(packages (specifications->packages (list "nss-certs" "git"
"gcc-toolchain@14" "helix")))
(services (append
(list (service home-bash-service-type
(home-bash-configuration
(aliases '(("grep" . "grep --color=auto")
("la" . "ls -lah --color=auto")
("ll" . "ls -l")
("ls" . "ls -p --color=auto")))
(bashrc (list (local-file
"/home/muon/src/guix-config//.bashrc"
"bashrc")))
(bash-profile (list (local-file
"/home/muon/src/guix-config//.bash_profile"
"bash_profile"))))))
(list
(simple-service 'my-env-vars home-environment-variables-service-type
`(("SSL_CERT_DIR" . "$HOME/.guix-profile/etc/ssl/certs")
("SSL_CERT_FILE" . "$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt")
("GIT_SSL_CAINFO" . "$SSL_CERT_FILE")))))
%base-home-services)))

38
systems/base.scm Normal file
View file

@ -0,0 +1,38 @@
(define-module (systems base)
#:use-module (gnu)
#:use-module (guix)
#:export (system-config))
(use-service-modules networking ssh)
(define (system-config system)
(operating-system
(inherit system)
(timezone "Etc/UTC")
(locale "en_DK.utf8")
(users (cons (user-account
(name "muon")
(group "users")
(home-directory "/home/muon")
(supplementary-groups
'("wheel" "netdev" "kvm" "tty" "input" "audio" "video")))
%base-user-accounts))
(packages (append (map specification->package
'("git"
"glibc-locales"
"nss-certs"
"gnupg"
"curl"
"cryptsetup"
"openssl"
"polkit"
"vim"))
%base-packages))
(services (append (list (service dhcpcd-service-type)
(service openssh-service-type))
%base-services))))

49
systems/muix.scm Normal file
View file

@ -0,0 +1,49 @@
(define-module (systems muix)
#:use-module (gnu)
#:use-module (guix)
#:use-module (systems base))
;; /dev/sda1
(define %device-uuid-efi "AC4A-082E")
;; /dev/sda2
(define %device-uuid-root "d1efd870-c9d9-47f5-bed5-3209e95b4f16")
(system-config (operating-system
(host-name "muix")
(keyboard-layout (keyboard-layout "us" "altgr-intl" #:model "thinkpad"))
(mapped-devices (list (mapped-device
(source (uuid %device-uuid-root))
(target "guixvm")
(type luks-device-mapping))))
(file-systems (append (map
(lambda (item) (file-system
(device "/dev/mapper/guixvm")
(mount-point (car item))
(type "btrfs")
(options (car (cdr item)))
(dependencies mapped-devices)))
'(("/" "subvol=root")
("/swap" "subvol=swap")
("/boot" "subvol=boot")
("/gnu" "subvol=gnu")
("/home" "subvol=home")
("/var/log" "subvol=log")))
(list (file-system
(mount-point "/boot/efi")
(device (uuid %device-uuid-efi 'fat32))
(type "vfat")))
%base-file-systems))
(swap-devices (list (swap-space
(target "/swap/swapfile")
(dependencies file-systems))))
(bootloader (bootloader-configuration
(bootloader grub-efi-removable-bootloader)
(targets '("/boot/efi"))
(timeout 1)
(keyboard-layout keyboard-layout)))))