mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
prepared workstation
This commit is contained in:
parent
c71dd30ad4
commit
3b29594b79
4 changed files with 55 additions and 42 deletions
|
|
@ -4,12 +4,6 @@
|
||||||
|
|
||||||
imports = [ ../../modules ];
|
imports = [ ../../modules ];
|
||||||
|
|
||||||
modules = {
|
|
||||||
system = {
|
|
||||||
bitcoin.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
${config.user.name} = {
|
${config.user.name} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,15 @@
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
username = "${config.user.name}";
|
username = "${config.user.name}";
|
||||||
homeDirectory = "/home/${config.user.name}";
|
homeDirectory = "/home/${config.user.name}";
|
||||||
|
|
||||||
file.".config/home-manager" = {
|
|
||||||
source = ../../../..;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.bash.shellAliases = {
|
|
||||||
#nixup = "home-manager switch --flake";
|
programs.bash = {
|
||||||
|
shellAliases = {
|
||||||
|
nixup = "home-manager switch --flake";
|
||||||
|
};
|
||||||
|
initExtra =
|
||||||
|
import ./scripts/guiControl
|
||||||
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
@ -27,6 +26,7 @@
|
||||||
trusted-users = [ "${config.user.name}" ];
|
trusted-users = [ "${config.user.name}" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
user = {
|
user = {
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
security.enable = false;
|
security.enable = false;
|
||||||
gui = {
|
gui = {
|
||||||
|
sway.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
browsers.enable = true;
|
browsers.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
@ -47,4 +48,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17
src/system/machines/workstation/scripts/guiControl.nix
Normal file
17
src/system/machines/workstation/scripts/guiControl.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
''
|
||||||
|
function nome() {
|
||||||
|
case $1 in
|
||||||
|
on)
|
||||||
|
sudo systemctl set-default graphical.target
|
||||||
|
sudo systemctl start graphical.target
|
||||||
|
;;
|
||||||
|
off)
|
||||||
|
sudo systemctl set-default multi-user.target
|
||||||
|
sudo systemctl isolate multi-user.target
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {on|off}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
''
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
git = config.modules.user.git;
|
git = config.modules.user.git;
|
||||||
gui = config.modules.user.gui.sway;
|
gui = config.modules.user.gui.alacritty;
|
||||||
|
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue