Compare commits
13 Commits
6787243414
...
newuser
Author | SHA1 | Date | |
---|---|---|---|
9735d3f0c0 | |||
8f1b0ade4d | |||
db05024dc6 | |||
21053dac8c | |||
1ab0bf54fa | |||
5070d4dbfc | |||
12466b4426 | |||
23155d57b7 | |||
a9e30bd84b | |||
e62f6e9dce | |||
c543bc13ea | |||
b4d1681b99 | |||
6c32ffbe94 |
54
flake.lock
generated
54
flake.lock
generated
@@ -58,11 +58,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752113600,
|
||||
"narHash": "sha256-7LYDxKxZgBQ8LZUuolAQ8UkIB+jb4A2UmiR+kzY9CLI=",
|
||||
"lastModified": 1753140376,
|
||||
"narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "79264292b7e3482e5702932949de9cbb69fedf6d",
|
||||
"rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -111,11 +111,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751413152,
|
||||
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
|
||||
"lastModified": 1753121425,
|
||||
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
|
||||
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -203,11 +203,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752202894,
|
||||
"narHash": "sha256-knafgng4gCjZIUMyAEWjxxdols6n/swkYnbWr+oF+1w=",
|
||||
"lastModified": 1753470191,
|
||||
"narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fab659b346c0d4252208434c3c4b3983a4b38fec",
|
||||
"rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -348,11 +348,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751986921,
|
||||
"narHash": "sha256-lRVaL5ZOzg3OJNcp5RgCwgrXi/gdVgYAs9pGJKSenOc=",
|
||||
"lastModified": 1753455814,
|
||||
"narHash": "sha256-c78Dm4hxF9z1grjKbkKPvkOccIIxIl+optGRL0UDnf4=",
|
||||
"owner": "doronbehar",
|
||||
"repo": "nix-matlab",
|
||||
"rev": "2b6e33435a188dc8870e420abf4969d2b1b4ee8b",
|
||||
"rev": "550d8ad0c21c63991e873bf4dcfe3d69adc1a2f1",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -363,11 +363,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1752048960,
|
||||
"narHash": "sha256-gATnkOe37eeVwKKYCsL+OnS2gU4MmLuZFzzWCtaKLI8=",
|
||||
"lastModified": 1753122741,
|
||||
"narHash": "sha256-nFxE8lk9JvGelxClCmwuJYftbHqwnc01dRN4DVLUroM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "7ced9122cff2163c6a0212b8d1ec8c33a1660806",
|
||||
"rev": "cc66fddc6cb04ab479a1bb062f4d4da27c936a22",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -437,11 +437,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"lastModified": 1753250450,
|
||||
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -461,11 +461,11 @@
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752158208,
|
||||
"narHash": "sha256-XbXYLUtaB/wHvZYefvaDPbo4eYj27kbtowHfww9bqLw=",
|
||||
"lastModified": 1753487377,
|
||||
"narHash": "sha256-dEr3pYtC4/1PhP5ADIV8Fjjmxv6WC6UisQAUqtwdews=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "b728cf43d97814df43f5d9bd9dafac9072ccd9e8",
|
||||
"rev": "3d09c8eaceb7a78ef9f5568024da1616f00c33e3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -484,11 +484,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749730855,
|
||||
"narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=",
|
||||
"lastModified": 1753385846,
|
||||
"narHash": "sha256-XDu9T2o6Rxe0acpchwQ2aXaRfE/uEYALpVbf+9QDEO4=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742",
|
||||
"rev": "5c7e4eff303cba8447ffb443522b3c72bc47a9ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -546,11 +546,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751606940,
|
||||
"narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=",
|
||||
"lastModified": 1752544651,
|
||||
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d",
|
||||
"rev": "2c8def626f54708a9c38a5861866660395bb3461",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@@ -162,7 +162,10 @@ in {
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
# Autostart
|
||||
exec-once = ["firefox"];
|
||||
exec-once = [
|
||||
(lib.getExe pkgs.firefox)
|
||||
(lib.getExe pkgs.waybar)
|
||||
];
|
||||
|
||||
# Look and Feel
|
||||
general = {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
# systemd.enable = true;
|
||||
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
|
||||
};
|
||||
|
||||
|
@@ -49,7 +49,7 @@
|
||||
key = "<leader><space>";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope file_browser<cr>";
|
||||
action = "<cmd>Telescope file_browser path=%:p:h<cr>";
|
||||
key = "<leader>.";
|
||||
}
|
||||
{
|
||||
@@ -140,18 +140,21 @@
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
enable = true; # includes lsp-config, default settings for the lsps
|
||||
servers = {
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
nixd.enable = true;
|
||||
pyright.enable = true;
|
||||
dockerls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
clangd.enable = true;
|
||||
nixd.enable = true; # nix
|
||||
pyright.enable = true; # python
|
||||
dockerls.enable = true; # docker
|
||||
lua_ls.enable = true; # lua
|
||||
clangd.enable = true; # c, c++
|
||||
dartls.enable = true; # dart, flutter
|
||||
digestif.enable = true; # latex
|
||||
tinymist.enable = true; # typst
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@@ -40,6 +40,7 @@
|
||||
wireguard-tools # wg-quick
|
||||
xorg.xkill
|
||||
zip
|
||||
dig
|
||||
|
||||
## My scripts
|
||||
frajul.edit-config
|
||||
|
@@ -20,7 +20,7 @@
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
];
|
||||
# warn-dirty = false; # TODO: do I want it? also for systems
|
||||
warn-dirty = false; # TODO: do I want it? also for systems
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -39,5 +39,8 @@
|
||||
];
|
||||
|
||||
# nix.settings. # warn-dirty = false; # TODO: do I want this
|
||||
#
|
||||
# Ensure we can still build when missing-server is not accessible
|
||||
fallback = true;
|
||||
};
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
../common/global
|
||||
../common/users/julian
|
||||
../common/users/yukari
|
||||
../common/optional/binarycaches.nix
|
||||
|
||||
../common/optional/remote-builder.nix
|
||||
@@ -38,6 +39,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
services.blueman.enable = true;
|
||||
services.upower.enable = true;
|
||||
|
||||
|
@@ -41,6 +41,9 @@
|
||||
trusted-users = ["nix"];
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
|
||||
# Ensure we can still build when missing-server is not accessible
|
||||
fallback = true;
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
|
@@ -21,5 +21,8 @@
|
||||
"root"
|
||||
"@wheel"
|
||||
]; # needed for devenv to add custom caches
|
||||
|
||||
# Ensure we can still build when missing-server is not accessible
|
||||
fallback = true;
|
||||
};
|
||||
}
|
||||
|
@@ -17,6 +17,8 @@ in {
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"audio"
|
||||
"realtime"
|
||||
"rtkit"
|
||||
"network"
|
||||
"video"
|
||||
"podman"
|
||||
|
100
hosts/common/users/yukari/default.nix
Normal file
100
hosts/common/users/yukari/default.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
users.mutableUsers = false;
|
||||
users.users.yukari = {
|
||||
description = "Yukari";
|
||||
group = "yukari";
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
extraGroups = ifTheyExist [
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"network"
|
||||
"video"
|
||||
"podman"
|
||||
"docker"
|
||||
"git"
|
||||
"gamemode"
|
||||
];
|
||||
|
||||
createHome = true;
|
||||
hashedPassword = "$y$j9T$rGuTL0rfiy7ht8L58BGCw0$fN.KwHjYlIitFEPHndKvV06ezgeWzP3/58o1kkviZwB";
|
||||
packages = [pkgs.home-manager];
|
||||
};
|
||||
users.groups.yukari = {};
|
||||
|
||||
home-manager.users.yukari = {
|
||||
imports =
|
||||
[
|
||||
../../../../homes/julian/features/fonts
|
||||
../../../../homes/julian/features/suites/cli
|
||||
]
|
||||
++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "yukari";
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
stateVersion = lib.mkDefault "23.11";
|
||||
|
||||
sessionPath = ["$HOME/.local/bin"];
|
||||
|
||||
packages = with pkgs; [
|
||||
arandr
|
||||
calibre # ebook manager and viewer
|
||||
# digikam
|
||||
discord
|
||||
discord-ptb # in case discord updates take their time
|
||||
# dvdisaster
|
||||
# element-desktop
|
||||
# rocketchat-desktop
|
||||
thunderbird
|
||||
tdesktop # telegram
|
||||
# schildichat-desktop # not updated regularly
|
||||
nheko
|
||||
evince # Simple pdf reader, good for focusing on document content
|
||||
firefox
|
||||
vivaldi
|
||||
# geogebra
|
||||
cheese
|
||||
handbrake
|
||||
# kitty # Terminal, already available as feature
|
||||
libnotify
|
||||
libreoffice
|
||||
mate.engrampa
|
||||
nomacs # Image viewer
|
||||
kdePackages.okular # Pdf reader with many features, good for commenting documents
|
||||
pavucontrol
|
||||
pdfsam-basic # Split, merge, etc for pdfs
|
||||
qalculate-gtk # Nice gui calculator
|
||||
qpdfview
|
||||
# qutebrowser
|
||||
# realvnc-vnc-viewer
|
||||
rpi-imager # make isos
|
||||
# rustdesk
|
||||
tor-browser
|
||||
unstable.path-of-building # Path of Building
|
||||
# frajul.pob-dev-version # Path of Building
|
||||
vlc
|
||||
wineWowPackages.stable # 32-bit and 64-bit wine
|
||||
winetricks
|
||||
xclip # x11 clipboard access from terminal
|
||||
xfce.mousepad # simple text editor
|
||||
xournalpp # Edit pdf files
|
||||
zoom-us # Video conferencing
|
||||
zotero # Manage papers and other sources
|
||||
pdfpc # Present slides in pdf form
|
||||
];
|
||||
};
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@@ -8,7 +8,8 @@
|
||||
|
||||
flagFile = "/var/lib/frajul-auto-upgrade/flag";
|
||||
lockFile = "/var/lib/frajul-auto-upgrade/lock";
|
||||
lastStatusFile = "/var/lib/nixos-auto-upgrade/last-status";
|
||||
lastStatusFile = "/var/lib/frajul-auto-upgrade/last-status";
|
||||
lastAttemptFile = "/var/lib/frajul-auto-upgrade/last-attempt";
|
||||
in {
|
||||
options.modules.frajulAutoUpgrade = {
|
||||
enable = lib.mkEnableOption "NixOS auto-upgrade on boot";
|
||||
@@ -31,6 +32,7 @@ in {
|
||||
"d /var/lib/frajul-auto-upgrade 0755 root root -"
|
||||
"f ${flagFile} 0766 root root -"
|
||||
"f ${lastStatusFile} 0644 root root -"
|
||||
"f ${lastAttemptFile} 0644 root root -"
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
@@ -39,11 +41,24 @@ in {
|
||||
FLAG_FILE="${flagFile}"
|
||||
LOCK_FILE="${lockFile}"
|
||||
LAST_STATUS_FILE="${lastStatusFile}"
|
||||
LAST_ATTEMPT_FILE="${lastAttemptFile}"
|
||||
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
if [ ! -f "$FLAG_FILE" ] || [ "$(cat "$FLAG_FILE")" != "enabled" ]; then
|
||||
echo "Auto upgrade disabled. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if already attempted today
|
||||
if [ -f "$LAST_ATTEMPT_FILE" ]; then
|
||||
LAST_ATTEMPT_DATE=$(cut -d' ' -f1 "$LAST_ATTEMPT_FILE")
|
||||
if [ "$LAST_ATTEMPT_DATE" = "$TODAY" ]; then
|
||||
echo "Update already attempted today. Skipping."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$LOCK_FILE" ]; then
|
||||
echo "Already running"
|
||||
exit 1
|
||||
@@ -52,11 +67,15 @@ in {
|
||||
echo $$ > "$LOCK_FILE"
|
||||
trap 'rm -f "$LOCK_FILE"' EXIT
|
||||
|
||||
if nix flake update --flake "${cfg.flakePath}" && nixos-rebuild switch --flake "${cfg.flakePath}"; then
|
||||
if /run/current-system/sw/bin/nix flake update --flake "${cfg.flakePath}" && /run/current-system/sw/bin/nixos-rebuild switch --flake "${cfg.flakePath}"; then
|
||||
echo "success" > "$LAST_STATUS_FILE"
|
||||
else
|
||||
echo "failure" > "$LAST_STATUS_FILE"
|
||||
git -C "${cfg.flakePath}" restore flake.lock
|
||||
fi
|
||||
|
||||
# Write full timestamp
|
||||
date '+%Y-%m-%d %H:%M:%S' > "$LAST_ATTEMPT_FILE"
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "frajul-auto-upgrade-status" ''
|
||||
@@ -64,25 +83,31 @@ in {
|
||||
FLAG_FILE="${flagFile}"
|
||||
LOCK_FILE="${lockFile}"
|
||||
LAST_STATUS_FILE="${lastStatusFile}"
|
||||
LAST_ATTEMPT_FILE="${lastAttemptFile}"
|
||||
|
||||
if [ -f "$LOCK_FILE" ]; then
|
||||
ICON=" "
|
||||
STATUS="running"
|
||||
elif [ -f "$FLAG_FILE" ] && [ "$(cat "$FLAG_FILE")" == "enabled" ]; then
|
||||
LAST="unknown"
|
||||
LAST_STATUS="unknown"
|
||||
LAST_ATTEMPT="never"
|
||||
if [ -f "$LAST_STATUS_FILE" ]; then
|
||||
LAST=$(cat "$LAST_STATUS_FILE")
|
||||
LAST_STATUS=$(cat "$LAST_STATUS_FILE")
|
||||
fi
|
||||
|
||||
if [ "$LAST" = "success" ]; then
|
||||
if [ -f "$LAST_ATTEMPT_FILE" ]; then
|
||||
LAST_ATTEMPT=$(cat "$LAST_ATTEMPT_FILE")
|
||||
fi
|
||||
|
||||
if [ "$LAST_STATUS" = "success" ]; then
|
||||
ICON=""
|
||||
elif [ "$LAST" = "failure" ]; then
|
||||
elif [ "$LAST_STATUS" = "failure" ]; then
|
||||
ICON=""
|
||||
else
|
||||
ICON=""
|
||||
fi
|
||||
|
||||
STATUS="enabled (last: $LAST)"
|
||||
STATUS="enabled (last attempt: $LAST_ATTEMPT, $LAST_STATUS)"
|
||||
else
|
||||
ICON=" "
|
||||
STATUS="disabled"
|
||||
@@ -107,10 +132,28 @@ in {
|
||||
'')
|
||||
];
|
||||
|
||||
# Fixes error: repository path '...' is not owned by current user
|
||||
environment.etc."root/.gitconfig".text = ''
|
||||
[safe]
|
||||
directory = ${cfg.flakePath}
|
||||
'';
|
||||
|
||||
systemd.services.frajul-auto-upgrade = {
|
||||
description = "Frajul's NixOS Auto Upgrade";
|
||||
after = ["network-online.target"];
|
||||
wants = ["network-online.target"];
|
||||
restartIfChanged = false; # Do not start service on nixos switch
|
||||
|
||||
path = with pkgs; [
|
||||
coreutils
|
||||
gnutar
|
||||
xz.bin
|
||||
gzip
|
||||
gitMinimal
|
||||
config.nix.package.out
|
||||
config.programs.ssh.package
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = cfg.user;
|
||||
|
Reference in New Issue
Block a user