nix config udpate; polish top-level Justfile
This commit is contained in:
parent
0e2f704aa3
commit
239c2c9c44
8 changed files with 81 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
*.swp
|
*.swp
|
||||||
*.qcow2
|
*.qcow2
|
||||||
|
.*.log
|
||||||
|
|
53
Justfile
53
Justfile
|
@ -1,16 +1,49 @@
|
||||||
devices action dir +moreargs="":
|
_device action dir +moreargs="":
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -x
|
set -e
|
||||||
sudo $(nix-build --no-link --show-trace $(dirname {{dir}})/default.nix -A {{action}} --argstr dir {{dir}} {{moreargs}} )
|
sudo $(nix-build --no-link --show-trace $(dirname {{dir}})/default.nix -A {{action}} --argstr dir {{dir}} {{moreargs}} )
|
||||||
|
|
||||||
diskMount dir:
|
|
||||||
just -v devices diskMount {{dir}}
|
|
||||||
|
|
||||||
diskUmount dir:
|
_rebuild-device dir rebuildarg="dry-activate":
|
||||||
just -v devices diskUmount {{dir}}
|
just -v _device rebuild {{dir}} --argstr rebuildarg {{rebuildarg}}
|
||||||
|
|
||||||
diskInstall dir:
|
# Rebulid this device's NixOS
|
||||||
just -v devices diskInstall {{dir}}
|
rebuild-this-device rebuildarg="dry-activate":
|
||||||
|
just -v _rebuild-device nix/os/devices/$(hostname -s) {{rebuildarg}}
|
||||||
|
|
||||||
device-rebuild dir rebuildarg="build":
|
# Update nix-channels and switch to updated NixOS and home environments
|
||||||
just -v devices rebuild {{dir}} --argstr rebuildarg {{rebuildarg}}
|
update-this-device:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
echo Updating system channels...
|
||||||
|
sudo nix-channel --update > .$(hostname -s)_sysupdate.log 2>&1
|
||||||
|
echo Updating system...
|
||||||
|
if just -v rebuild-this-device >> .$(hostname -s)_sysupdate.log 2>&1 ; then
|
||||||
|
echo System update successful
|
||||||
|
else
|
||||||
|
System update failed
|
||||||
|
fi
|
||||||
|
|
||||||
|
if type home-manager > /dev/null 2>&1; then
|
||||||
|
echo Updating home...
|
||||||
|
if home-manager -v switch > .$(hostname -s)_homeupdate.log 2>&1 ; then
|
||||||
|
echo Home update successful
|
||||||
|
else
|
||||||
|
echo Home update failed
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Sorry, this is a manual step for now. Please see nix/os/modules/encryptedDisk.nix for the layout
|
||||||
|
disk-prepare:
|
||||||
|
echo NOT IMPLEMENTED
|
||||||
|
|
||||||
|
# Mount the target disk specified by device configuration directory. The 'dir' argument points to a device configuration, e.g. 'nix/os/devices/steveej-live-mmc-SL32G_0x259093f6'
|
||||||
|
disk-mount dir:
|
||||||
|
just -v _device diskMount {{dir}}
|
||||||
|
|
||||||
|
# Unmount target disk, specified by device configuration directory
|
||||||
|
disk-umount dir:
|
||||||
|
just -v _device diskUmount {{dir}}
|
||||||
|
|
||||||
|
# Perform an offline installation on the mounted the target disk, specified by device configuration directory
|
||||||
|
disk-install dir:
|
||||||
|
just -v _device diskInstall {{dir}}
|
||||||
|
|
|
@ -69,6 +69,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
# TODO: find a way to prevent using a store path for the current file
|
||||||
|
# HM_CONFIG_PATH=builtins.toString "${./.}";
|
||||||
|
HM_CONFIG="fullblown-workstation";
|
||||||
|
|
||||||
GOPATH="$HOME/src/go";
|
GOPATH="$HOME/src/go";
|
||||||
|
|
||||||
PATH=pkgs.lib.concatStringsSep ":" [
|
PATH=pkgs.lib.concatStringsSep ":" [
|
||||||
|
@ -99,10 +103,7 @@ in {
|
||||||
# Version Control Systems
|
# Version Control Systems
|
||||||
git-crypt
|
git-crypt
|
||||||
unstablepkgs.pijul
|
unstablepkgs.pijul
|
||||||
gitFull
|
|
||||||
gitless
|
gitless
|
||||||
mr
|
|
||||||
|
|
||||||
gitRepo
|
gitRepo
|
||||||
|
|
||||||
# Cloud/Remote System Management
|
# Cloud/Remote System Management
|
||||||
|
|
|
@ -56,6 +56,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
HM_CONFIG=builtins.toString ./.;
|
||||||
|
|
||||||
GOPATH="$HOME/src/go";
|
GOPATH="$HOME/src/go";
|
||||||
|
|
||||||
PATH=pkgs.lib.concatStringsSep ":" [
|
PATH=pkgs.lib.concatStringsSep ":" [
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowBroken = false;
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../../profiles/common/configuration.nix
|
../../profiles/common/configuration.nix
|
||||||
../../profiles/graphical/configuration.nix
|
../../profiles/graphical/configuration.nix
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
unstablepkgs = import <nixos-unstable> {};
|
unstablepkgs = import <nixos-unstable> { config = config.nixpkgs; };
|
||||||
|
|
||||||
in rec {
|
in {
|
||||||
# The NixOS release to be compatible with for stateful data such as databases.
|
# The NixOS release to be compatible with for stateful data such as databases.
|
||||||
# system.stateVersion = "unstable";
|
# system.stateVersion = "unstable";
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ in rec {
|
||||||
server=/tectonic-ci.de/192.168.124.1
|
server=/tectonic-ci.de/192.168.124.1
|
||||||
server=/tectonic-ci.lan/192.168.124.1
|
server=/tectonic-ci.lan/192.168.124.1
|
||||||
'';
|
'';
|
||||||
|
networking.firewall.enable = lib.mkForce false;
|
||||||
networking.firewall.checkReversePath = false;
|
networking.firewall.checkReversePath = false;
|
||||||
|
|
||||||
networking.bridges."virbr1".interfaces = [];
|
networking.bridges."virbr1".interfaces = [];
|
||||||
|
@ -28,11 +29,11 @@ in rec {
|
||||||
|
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [
|
drivers = with pkgs; [
|
||||||
pkgs.hplip
|
hplip
|
||||||
unstablepkgs.cups-kyodialog3
|
cups-kyodialog3
|
||||||
unstablepkgs.mfcj6510dwlpr
|
mfcj6510dwlpr
|
||||||
unstablepkgs.mfcj6510dw-cupswrapper
|
mfcj6510dw-cupswrapper
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,22 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
# Package configuration
|
# Package configuration
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowBroken = false;
|
||||||
|
allowUnfree = true;
|
||||||
|
|
||||||
|
packageOverrides = pkgs: with pkgs; {
|
||||||
|
busyboxStatic = busybox.override {
|
||||||
|
enableStatic = true;
|
||||||
|
extraConfig = ''
|
||||||
|
CONFIG_STATIC y
|
||||||
|
CONFIG_INSTALL_APPLET_DONT y
|
||||||
|
CONFIG_INSTALL_APPLET_SYMLINKS n
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
elfutils
|
elfutils
|
||||||
exfat
|
exfat
|
||||||
|
@ -16,9 +32,10 @@
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
|
|
||||||
git
|
gitFull
|
||||||
pastebinit
|
pastebinit
|
||||||
gist
|
gist
|
||||||
|
mr
|
||||||
|
|
||||||
usbutils
|
usbutils
|
||||||
pciutils
|
pciutils
|
||||||
|
|
|
@ -7,21 +7,5 @@
|
||||||
"${builtins.fetchGit { url = "https://github.com/rycee/home-manager.git"; ref = "master"; }}/nixos"
|
"${builtins.fetchGit { url = "https://github.com/rycee/home-manager.git"; ref = "master"; }}/nixos"
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config = {
|
|
||||||
allowBroken = false;
|
|
||||||
allowUnfree = true;
|
|
||||||
|
|
||||||
packageOverrides = pkgs: with pkgs; {
|
|
||||||
busyboxStatic = busybox.override {
|
|
||||||
enableStatic = true;
|
|
||||||
extraConfig = ''
|
|
||||||
CONFIG_STATIC y
|
|
||||||
CONFIG_INSTALL_APPLET_DONT y
|
|
||||||
CONFIG_INSTALL_APPLET_SYMLINKS n
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.steveej = import ../../../home-manager/configuration/removable-desktop.nix;
|
home-manager.users.steveej = import ../../../home-manager/configuration/removable-desktop.nix;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue