From 405a78ee1a4fc027ebc4ed16ac9b0a60585f2ec4 Mon Sep 17 00:00:00 2001 From: Marco Burro Date: Thu, 14 May 2026 18:35:04 +0200 Subject: [PATCH] cleanup --- .github/workflows/flake-format.yaml | 5 +- flake.lock | 16 -- flake.nix | 13 -- hosts/ionos-m/configuration.nix | 39 ----- hosts/ionos-m/disk-config.nix | 61 ------- hosts/ionos-m/hardware-configuration.nix | 27 --- hosts/oven/configuration.nix | 71 -------- hosts/oven/disk-config.nix | 61 ------- hosts/oven/hardware-configuration.nix | 28 ---- install.sh | 41 ----- modules/home-manager/waybar/default.nix | 154 ------------------ packages/linux-timemachine.nix | 43 ----- secrets/authelia.jwtSecretFile.age | Bin 277 -> 0 bytes secrets/authelia.storageEncryptionKeyFile.age | Bin 277 -> 0 bytes 14 files changed, 3 insertions(+), 556 deletions(-) delete mode 100644 hosts/ionos-m/configuration.nix delete mode 100644 hosts/ionos-m/disk-config.nix delete mode 100644 hosts/ionos-m/hardware-configuration.nix delete mode 100644 hosts/oven/configuration.nix delete mode 100644 hosts/oven/disk-config.nix delete mode 100644 hosts/oven/hardware-configuration.nix delete mode 100644 install.sh delete mode 100644 modules/home-manager/waybar/default.nix delete mode 100644 packages/linux-timemachine.nix delete mode 100644 secrets/authelia.jwtSecretFile.age delete mode 100644 secrets/authelia.storageEncryptionKeyFile.age diff --git a/.github/workflows/flake-format.yaml b/.github/workflows/flake-format.yaml index 0e8bc3d..3fd4f13 100644 --- a/.github/workflows/flake-format.yaml +++ b/.github/workflows/flake-format.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: jobs: check: @@ -12,8 +13,8 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main + - uses: actions/checkout@v6 + - uses: DeterminateSystems/nix-installer-action@v22 - run: nix fmt . - run: | if [[ $(git status --porcelain) ]]; then diff --git a/flake.lock b/flake.lock index d5b8c42..579a6ec 100644 --- a/flake.lock +++ b/flake.lock @@ -168,21 +168,6 @@ "type": "github" } }, - "nixos-hardware": { - "locked": { - "lastModified": 1778143761, - "narHash": "sha256-lkesY6x2X2qxlqLM7CT2iM/0rP2JB7fruPN3h8POXmI=", - "owner": "nixos", - "repo": "nixos-hardware", - "rev": "3bcaa367d4c550d687a17ac792fd5cda214ee871", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1777954456, @@ -228,7 +213,6 @@ "darwin": "darwin_2", "disko": "disko", "home-manager": "home-manager_2", - "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixvim": "nixvim" } diff --git a/flake.nix b/flake.nix index 3f58022..ea7b536 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,6 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware"; catppuccin = { url = "github:catppuccin/nix"; @@ -38,7 +37,6 @@ nixpkgs, darwin, home-manager, - nixos-hardware, disko, agenix, ... @@ -109,17 +107,6 @@ specialArgs = {inherit inputs;}; }; - "ionos-m" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - agenix.nixosModules.default - self.nixosModules.default - ./hosts/ionos-m/configuration.nix - ]; - specialArgs = {inherit inputs;}; - }; - "mixer" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ diff --git a/hosts/ionos-m/configuration.nix b/hosts/ionos-m/configuration.nix deleted file mode 100644 index 249e5c1..0000000 --- a/hosts/ionos-m/configuration.nix +++ /dev/null @@ -1,39 +0,0 @@ -{pkgs, ...}: { - imports = [ - ./disk-config.nix - ./hardware-configuration.nix - ]; - - networking.hostName = "ionos-m"; - - environment.systemPackages = [pkgs.k3s]; - - networking.firewall.allowedTCPPorts = [6443]; - - services.k3s.enable = true; - services.k3s.role = "server"; - - systemd.services.argocd = { - requires = ["k3s.service"]; - after = ["k3s.service"]; - serviceConfig = let - argoscript = pkgs.writeShellScriptBin "argocd" '' - set -e - - ${pkgs.k3s}/bin/k3s kubectl create namespace argocd - ${pkgs.k3s}/bin/k3s kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - ''; - in { - ExecStart = "${argoscript}/bin/argocd"; - }; - }; - - modules.home-manager.enable = true; - - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - - system.stateVersion = "24.05"; -} diff --git a/hosts/ionos-m/disk-config.nix b/hosts/ionos-m/disk-config.nix deleted file mode 100644 index bfc92af..0000000 --- a/hosts/ionos-m/disk-config.nix +++ /dev/null @@ -1,61 +0,0 @@ -# Example to create a bios compatible gpt partition -{lib, ...}: { - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/vda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - swap = { - size = "6G"; - content = { - type = "swap"; - }; - }; - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/ionos-m/hardware-configuration.nix b/hosts/ionos-m/hardware-configuration.nix deleted file mode 100644 index 2946513..0000000 --- a/hosts/ionos-m/hardware-configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = []; - - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_blk"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens6.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - virtualisation.hypervGuest.enable = true; -} diff --git a/hosts/oven/configuration.nix b/hosts/oven/configuration.nix deleted file mode 100644 index 17b0033..0000000 --- a/hosts/oven/configuration.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - pkgs, - inputs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ./disk-config.nix - - # broken - # "${inputs.nixos-hardware}/common/gpu/nvidia/ampere" - ]; - - networking.hostName = "oven"; - - environment.systemPackages = with pkgs; [ - chromium - discord - mpv - nvtopPackages.nvidia - spotify - vscode.fhs - jellyfin-media-player - ]; - - security.polkit.enable = true; - programs = { - _1password.enable = true; - _1password-gui = { - enable = true; - polkitPolicyOwners = ["marco"]; - }; - }; - - services.ollama = { - enable = true; - acceleration = "cuda"; - host = "[::]"; - openFirewall = true; - }; - - networking.firewall.allowedTCPPorts = [ - 80 - 5678 - ]; - - virtualisation.oci-containers.containers = { - cheshire_cat_core = { - image = "ghcr.io/cheshire-cat-ai/core:1.7.1"; - extraOptions = ["--network=host"]; - volumes = [ - "cheshire_cat_static:/app/cat/static" - "cheshire_cat_plugins:/app/cat/plugins" - "cheshire_cat_data:/app/cat/data" - ]; - }; - }; - - modules.home-manager.enable = true; - - services.qemuGuest.enable = true; - fileSystems."/".autoResize = true; - - powerManagement.cpuFreqGovernor = "performance"; - - boot.binfmt.emulatedSystems = ["aarch64-linux" "armv6l-linux"]; - - boot.kernelPackages = pkgs.linuxPackages_latest; - - system.stateVersion = "24.11"; -} diff --git a/hosts/oven/disk-config.nix b/hosts/oven/disk-config.nix deleted file mode 100644 index eb064f2..0000000 --- a/hosts/oven/disk-config.nix +++ /dev/null @@ -1,61 +0,0 @@ -# Example to create a bios compatible gpt partition -{lib, ...}: { - disko.devices = { - disk.disk1 = { - device = "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - swap = { - size = "8G"; - content = { - type = "swap"; - }; - }; - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/oven/hardware-configuration.nix b/hosts/oven/hardware-configuration.nix deleted file mode 100644 index 0c4a59a..0000000 --- a/hosts/oven/hardware-configuration.nix +++ /dev/null @@ -1,28 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; - boot.initrd.kernelModules = ["dm-snapshot"]; - boot.kernelModules = []; - boot.extraModulePackages = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp6s18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/install.sh b/install.sh deleted file mode 100644 index 9ec6bb7..0000000 --- a/install.sh +++ /dev/null @@ -1,41 +0,0 @@ -SHELL_REPO="github:buurro/shell" -SCREENSHOTS_PATH="$HOME/Pictures/screenshots"; - -set -e - -if [[ $OSTYPE == 'darwin'* ]]; then - if ! command -v brew &> /dev/null; then - echo "installing homebrew" - NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - fi - if ! command -v nix-env &> /dev/null; then - echo "installing nix" - sh <(curl -L https://nixos.org/nix/install) - zsh - fi - - if [ ! -d "$SCREENSHOTS_PATH" ]; then - echo "creating screenshots directory" - mkdir -p "$SCREENSHOTS_PATH" - fi - cd /tmp - if ! command -v darwin-rebuild &> /dev/null; then - FLAKE="$SHELL_REPO#darwinConfigurations.$(hostname -s).system" - nix --experimental-features 'nix-command flakes' build "$FLAKE" - ./result/sw/bin/darwin-rebuild switch --flake "$SHELL_REPO" - else - darwin-rebuild switch --flake "$SHELL_REPO" - fi -else - if ! command -v nix-env &> /dev/null; then - echo "installing nix" - sh <(curl -L https://nixos.org/nix/install) --daemon - fi - if ! command -v home-manager &> /dev/null; then - FLAKE="$SHELL_REPO#homeConfigurations.common.activationPackage" - nix --experimental-features 'nix-command flakes' build --no-link "$FLAKE" - "$(nix --experimental-features 'nix-command flakes' path-info $FLAKE)"/activate - else - home-manager switch --flake "$SHELL_REPO#common" - fi -fi diff --git a/modules/home-manager/waybar/default.nix b/modules/home-manager/waybar/default.nix deleted file mode 100644 index c7f1c1c..0000000 --- a/modules/home-manager/waybar/default.nix +++ /dev/null @@ -1,154 +0,0 @@ -{...}: { - programs.waybar = { - enable = true; - style = '' - * { - color: rgb(217, 224, 238); - font-family: "MesloLGSDZ Nerd Font"; - font-size: 10pt; - font-weight: bold; - border-radius: 10px; - transition-property: background-color; - transition-duration: 0.5s; - } - @keyframes blink_red { - to { - background-color: rgb(242, 143, 173); - color: rgb(26, 24, 38); - } - } - .warning, .critical, .urgent { - animation-name: blink_red; - animation-duration: 1s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - window#waybar { - background-color: transparent; - } - window > box { - margin-top: 5px; - background-color: transparent; - /* background-color: #1e1e2a; */ - } - #mode, - #clock, - #backlight, - #pulseaudio, - #network, - #battery, - #custom-spotify, - #tray, - #bluetooth, - #workspaces { - padding-top: 3px; - padding-bottom: 3px; - padding-left: 10px; - padding-right: 10px; - margin-left: 5px; - margin-right: 5px; - background-color: #1e1e2a; - } - #clock { - color: rgb(217, 224, 238); - } - #backlight { - color: rgb(248, 189, 150); - } - #pulseaudio { - color: rgb(245, 224, 220); - } - #network { - color: #ABE9B3; - } - #network.disconnected { - color: rgb(255, 255, 255); - } - #workspaces { - padding-left: 3px; - padding-right: 3px; - } - #workspaces button { - border-radius: 7px; - padding-top: 0px; - padding-bottom: 0px; - padding-left: 5px; - padding-right: 5px; - } - #workspaces button.active { - background-color: rgb(69, 71, 90); - } - ''; - settings = [ - { - "layer" = "top"; - "position" = "top"; - # "height" = 35; - modules-left = [ - "hyprland/workspaces" - "tray" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "custom/spotify" - "backlight" - "pulseaudio" - "network" - "battery" - ]; - "pulseaudio" = { - "scroll-step" = 1; - "format" = "{icon} {volume}%"; - "format-muted" = "󰖁 Muted"; - "format-icons" = { - "default" = ["" "" ""]; - }; - "on-click" = "pavucontrol"; - "tooltip" = false; - }; - "clock" = { - "interval" = 1; - "format" = "{:%a %d %b %H:%M}"; - }; - "network" = { - "format-disconnected" = "󰯡 Disconnected"; - "format-ethernet" = "󰈀 {ifname}"; - "format-linked" = "󰖪 {essid} (No IP)"; - "format-wifi" = "󰖩 {essid}"; - "interval" = 1; - "tooltip" = true; - "tooltip-format" = "{ifname} {ipaddr}/{cidr}"; - }; - "tray" = { - "spacing" = 6; - "icon-size" = 14; - }; - "custom/spotify" = { - "format" = "{}"; - "escape" = true; - "interval" = 5; - "exec" = "playerctl -f '{{artist}} - {{title}}' -p spotify metadata"; - "exec-if" = "pgrep spotify"; - }; - "hyprland/workspaces" = { - "format" = "{icon}"; - }; - "battery" = { - "format" = "{icon} {capacity}%"; - "format-icons" = { - "default" = ["" "" "" "" ""]; - "plugged" = ""; - "charging" = ""; - }; - }; - "backlight" = { - "format" = "{icon} {percent}%"; - "format-icons" = ["󰃞" "󰃟" "󰃠"]; - }; - } - ]; - }; -} diff --git a/packages/linux-timemachine.nix b/packages/linux-timemachine.nix deleted file mode 100644 index 070498f..0000000 --- a/packages/linux-timemachine.nix +++ /dev/null @@ -1,43 +0,0 @@ -{pkgs, ...}: -pkgs.stdenv.mkDerivation -{ - name = "timemachine"; - src = pkgs.fetchFromGitHub { - owner = "cytopia"; - repo = "linux-timemachine"; - rev = "v1.3.2"; - sha256 = "k0FUVwgRFKiZkzmqLrAYxtxsAjcjTfR11SxTEffSUVo="; - }; - - # buildInputs = with pkgs; [ - # rsync - # gnumake - # gnused - # coreutils - # bash - # ]; - - buildPhase = '' - runHook preBuild - - substituteInPlace timemachine --replace "command -v rsync" "command -v ${pkgs.rsync}/bin/rsync" - substituteInPlace timemachine --replace "cmd=\"rsync" "cmd=\"${pkgs.rsync}/bin/rsync" - substituteInPlace timemachine --replace "grep" "${pkgs.gnugrep}/bin/grep" - substituteInPlace timemachine --replace " sed " " ${pkgs.gnused}/bin/sed " - substituteInPlace timemachine --replace " awk " " ${pkgs.busybox}/bin/awk " - substituteInPlace timemachine --replace "mv " "${pkgs.busybox}/bin/mv " - substituteInPlace timemachine --replace "ln " "${pkgs.busybox}/bin/ln " - substituteInPlace timemachine --replace "ssh " "${pkgs.openssh}/bin/ssh " - substituteInPlace timemachine --replace "\$(date" "\$(${pkgs.coreutils}/bin/date" - substituteInPlace timemachine --replace "\$( date" "\$( ${pkgs.coreutils}/bin/date" - - substituteInPlace Makefile --replace "/bin/bash" "${pkgs.bash}/bin/bash" - - runHook postBuild - ''; - - installPhase = '' - mkdir -p $out/bin - install -t $out/bin timemachine - ''; -} diff --git a/secrets/authelia.jwtSecretFile.age b/secrets/authelia.jwtSecretFile.age deleted file mode 100644 index be57493058266a65e25106cd9658e2baab920381..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 277 zcmV+w0qXu?XJsvAZewzJaCB*JZZ2Pa8glAc2!JxF;7V}MKe@cZ8X`cNet9b}LXhQ!z4dWJyIvZgWdvR&6#xYcL9)Yr2^!e}$#NN{i%u+wOy3jjEA; z+N!S;IBo#8zt#?YHPLs^J2*dagC7$aY6iWLF;mfDjLdoTaQb3uk;mv2e?6x;wVDGn boO&2=lUs0Zs_IIqJkw%#&9l}HW?C>c)Qe^- diff --git a/secrets/authelia.storageEncryptionKeyFile.age b/secrets/authelia.storageEncryptionKeyFile.age deleted file mode 100644 index dbbea45e7f2c7685543798763ebe949a62fd2c78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 277 zcmV+w0qXu?XJsvAZewzJaCB*JZZ2uG&BkwCFU>4?fzpb4lIrer-Z!g^yjM^ z(+38ndQ)Qu02yKgbk?t;i7_t!S8RVCCS<`(m=SKO@MO