aboutsummaryrefslogtreecommitdiff
path: root/nix/systems
diff options
context:
space:
mode:
Diffstat (limited to 'nix/systems')
-rw-r--r--nix/systems/desktop/configuration.nix8
-rw-r--r--nix/systems/desktop/home.nix2
-rw-r--r--nix/systems/desktop/user.nix20
-rw-r--r--nix/systems/installer/commits.nix2
-rw-r--r--nix/systems/installer/iso.nix29
5 files changed, 22 insertions, 39 deletions
diff --git a/nix/systems/desktop/configuration.nix b/nix/systems/desktop/configuration.nix
index 8359d25..e4f2439 100644
--- a/nix/systems/desktop/configuration.nix
+++ b/nix/systems/desktop/configuration.nix
@@ -5,7 +5,6 @@ in
{
imports = [];
- hardware.enableAllFirmware = true;
documentation = {
enable = true;
@@ -178,6 +177,7 @@ in
};
hardware = {
+ enableAllFirmware = true;
cpu.intel.updateMicrocode = true;
bluetooth = {
enable = true;
@@ -355,7 +355,11 @@ in
xdg.portal = {
enable = true;
wlr.enable = true;
- extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal xdg-desktop-portal-hyprland ];
+ extraPortals = with pkgs; [
+ xdg-desktop-portal-gtk
+ xdg-desktop-portal
+ xdg-desktop-portal-hyprland
+ ];
config.common.default = "*";
};
diff --git a/nix/systems/desktop/home.nix b/nix/systems/desktop/home.nix
index 166bd16..f1a11df 100644
--- a/nix/systems/desktop/home.nix
+++ b/nix/systems/desktop/home.nix
@@ -9,6 +9,6 @@ in
];
useGlobalPkgs = true;
useUserPackages = true;
- users."${vars.userName}" = ./user.nix;
+ users."${vars.userName}" = import ./user.nix;
};
}
diff --git a/nix/systems/desktop/user.nix b/nix/systems/desktop/user.nix
index 85dcd20..eeda20e 100644
--- a/nix/systems/desktop/user.nix
+++ b/nix/systems/desktop/user.nix
@@ -23,34 +23,21 @@ in
home = {
activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] ''
- if [ ! -d "/home/${vars.userName}/org/website/" ]; then
- mkdir -p /home/${vars.userName}/org/website/
- ${pkgs.git}/bin/git clone https://git.${vars.remoteHost}/ret2pop-website.git /home/${vars.userName}/org/website/
- fi
-
if [ ! -d "/home/${vars.userName}/src/publish-org-roam-ui" ]; then
mkdir -p /home/${vars.userName}/src
${pkgs.git}/bin/git clone https://git.${vars.remoteHost}/publish-org-roam-ui.git /home/${vars.userName}/src/publish-org-roam-ui
fi
-
- if [ ! -d "/home/${vars.userName}/.password-store" ]; then
- ${pkgs.git}/bin/git clone https://git.${vars.remoteHost}/passwords.git /home/${vars.userName}/.password-store
- fi
-
if [ ! -d "/home/${vars.userName}/email/ret2pop/" ]; then
mkdir -p /home/${vars.userName}/email/ret2pop/
fi
-
if [ ! -d "/home/${vars.userName}/music" ]; then
mkdir -p /home/${vars.userName}/music
fi
-
if [ ! -d "/home/${vars.userName}/sounds" ]; then
mkdir -p /home/${vars.userName}/sounds
fi
touch /home/${vars.userName}/org/agenda.org
touch /home/${vars.userName}/org/notes.org
-
if [ ! -f "/home/${vars.userName}/.toughnix" ]; then
echo "Don't delete this file. Autogen by home manager" > "/home/${vars.userName}/.toughnix"
fi
@@ -62,7 +49,6 @@ in
stateVersion = "24.11";
packages = with pkgs; [
- # kicad
age
acpilight
alsa-utils
@@ -91,9 +77,9 @@ in
(writeShellScriptBin "post-install" ''
cd $HOME
ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the post-install..." || nmtui
-sudo chown -R "$(whoami)":users toughnix
+sudo chown -R "$(whoami)":users ./monorepo
-sudo nixos-rebuild switch --flake ./toughnix#continuity
+sudo nixos-rebuild switch --flake ./monorepo/nix#continuity
echo "Post install done! Now install your ssh and gpg keys. Log in again."
sleep 3
exit
@@ -1078,7 +1064,7 @@ on-notify=exec mpv /home/${vars.userName}/sounds/notification.wav --no-config --
extraConfig = ''
(setq debug-on-error t)
(org-babel-load-file
- (expand-file-name "~/org/website/config/emacs.org"))'';
+ (expand-file-name "~/monorepo/config/emacs.org"))'';
extraPackages = epkgs: [
epkgs.all-the-icons
epkgs.auctex
diff --git a/nix/systems/installer/commits.nix b/nix/systems/installer/commits.nix
index f652035..18089f2 100644
--- a/nix/systems/installer/commits.nix
+++ b/nix/systems/installer/commits.nix
@@ -1,4 +1,4 @@
{
diskoCommitHash = "latest";
- toughnixCommitHash = "HEAD";
+ monorepoCommitHash = "HEAD";
}
diff --git a/nix/systems/installer/iso.nix b/nix/systems/installer/iso.nix
index 2fcc08f..84b8560 100644
--- a/nix/systems/installer/iso.nix
+++ b/nix/systems/installer/iso.nix
@@ -128,33 +128,26 @@ in
(writeShellScriptBin "nix_installer"
''
#!/usr/bin/env bash
-set -euo pipefail
+set -euo pipefail
if [ "$(id -u)" -eq 0 ]; then
echo "ERROR! $(basename "$0") should be run as a regular user"
exit 1
fi
-
ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the installation..." || nmtui
-
+cd
if [ ! -d "$HOME/toughnix/" ]; then
- cd $HOME
- git clone https://git.nullring.xyz/toughnix.git
- cd toughnix
- git checkout "${commits.toughnixCommitHash}"
- cd $HOME
+ git clone https://git.nullring.xyz/monorepo.git
+ cd monorepo
+ git checkout "${commits.monorepoCommitHash}"
fi
-
-vim "$HOME/toughnix/systems/desktop/vars.nix"
-vim "$HOME/toughnix/systems/desktop/sda-simple.nix"
-sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/${commits.diskoCommitHash}" -- --mode destroy,format,mount "$HOME/toughnix/systems/desktop/sda-simple.nix"
+vim "$HOME/monorepo/nix/modules/default.nix"
+vim "$HOME/monorepo/nix/modules/vars.nix"
+sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/${commits.diskoCommitHash}" -- --mode destroy,format,mount "$HOME/monorepo/nix/systems/desktop/sda-simple.nix"
cd /mnt
-
-sudo nixos-install --flake $HOME/toughnix#continuity
-sudo cp $HOME/toughnix "/mnt/home/$(ls /mnt/home/)/"
-echo "Installation complete! Rebooting..."
-sleep 3
-reboot
+sudo nixos-install --flake $HOME/monorepo/nix#continuity
+sudo cp $HOME/monorepo "/mnt/home/$(ls /mnt/home/)/"
+echo "rebooting..."; sleep 3; reboot
'')
];
};