diff --git a/flake.lock b/flake.lock index 1001d03f..000161e8 100644 --- a/flake.lock +++ b/flake.lock @@ -130,22 +130,6 @@ "type": "github" } }, - "mobile-nixos": { - "flake": false, - "locked": { - "lastModified": 1667160126, - "narHash": "sha256-YRgxMHdvMuLsuXCaKs5YNMD6NKgvcATSjfi9YkUOOLk=", - "owner": "NixOS", - "repo": "mobile-nixos", - "rev": "da56c338a2b00c868697b75bdbd388f60d50c820", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "mobile-nixos", - "type": "github" - } - }, "naersk": { "inputs": { "nixpkgs": [ @@ -279,6 +263,22 @@ "type": "github" } }, + "private": { + "flake": false, + "locked": { + "lastModified": 1667531394, + "narHash": "sha256-eo5s09w9DjRTqk4y+ULpYHQw5RNjNi+n9tEyvpbL84g=", + "owner": "thexyno", + "repo": "nixos-config-private-dummy", + "rev": "b38da5d5dd120e7dcc61b2ed3536be69fac649da", + "type": "github" + }, + "original": { + "owner": "thexyno", + "repo": "nixos-config-private-dummy", + "type": "github" + } + }, "rnix-lsp": { "inputs": { "naersk": "naersk", @@ -309,7 +309,6 @@ "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", "impermanence": "impermanence", - "mobile-nixos": "mobile-nixos", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", @@ -317,6 +316,7 @@ "octoprint-spoolmanager": "octoprint-spoolmanager", "octoprint-telegram": "octoprint-telegram", "pandoc-latex-template": "pandoc-latex-template", + "private": "private", "rnix-lsp": "rnix-lsp", "utils": "utils_3", "x": "x", diff --git a/flake.nix b/flake.nix index 84ebdf81..57a34104 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,10 @@ { description = "ragons nix/nixos configs"; inputs = { + # base imports + utils.url = "github:numtide/flake-utils"; + + ## nixos/nix-darwin dependencies nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-master.url = "github:NixOS/nixpkgs/master"; agenix.url = "github:ryantm/agenix/main"; @@ -8,41 +12,28 @@ home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; impermanence.url = "github:nix-community/impermanence"; - #impermanence.inputs.nixpkgs.follows = "nixpkgs"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + darwin.url = "github:lnl7/nix-darwin/master"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; + + # programs xynoblog.url = "github:thexyno/blog"; xynoblog.inputs.nixpkgs.follows = "nixpkgs"; x.url = "github:thexyno/x"; x.inputs.nixpkgs.follows = "nixpkgs"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - darwin.url = "github:lnl7/nix-darwin/master"; - darwin.inputs.nixpkgs.follows = "nixpkgs"; - utils.url = "github:numtide/flake-utils"; - #pinephone - mobile-nixos.url = "github:NixOS/mobile-nixos"; - mobile-nixos.flake = false; # whyever this isn't a flake - octoprint-telegram.url = "github:fabianonline/OctoPrint-Telegram"; - octoprint-telegram.flake = false; - octoprint-spoolmanager.url = "github:OllisGit/OctoPrint-SpoolManager"; - octoprint-spoolmanager.flake = false; + ## editor stuff + rnix-lsp.url = "github:nix-community/rnix-lsp"; + rnix-lsp.inputs.nixpkgs.follows = "nixpkgs"; ## emacs emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; ## vim - #neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; - #neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs"; - #coc-nvim.url = "github:neoclide/coc.nvim/release"; - #coc-nvim.flake = false; nnn-vim.url = "github:mcchrish/nnn.vim"; nnn-vim.flake = false; - #dart-vim.url = "github:dart-lang/dart-vim-plugin/master"; - #dart-vim.flake = false; - rnix-lsp.url = "github:nix-community/rnix-lsp"; - rnix-lsp.inputs.nixpkgs.follows = "nixpkgs"; - pandoc-latex-template.url = "github:Wandmalfarbe/pandoc-latex-template"; - pandoc-latex-template.flake = false; + ## zsh zsh-completions.url = "github:zsh-users/zsh-completions"; zsh-completions.flake = false; @@ -52,6 +43,22 @@ zsh-vim-mode.flake = false; agkozak-zsh-prompt.url = "github:agkozak/agkozak-zsh-prompt"; agkozak-zsh-prompt.flake = false; + + + #other dependencies + pandoc-latex-template.url = "github:Wandmalfarbe/pandoc-latex-template"; + pandoc-latex-template.flake = false; + + ## octoprint + octoprint-telegram.url = "github:fabianonline/OctoPrint-Telegram"; + octoprint-telegram.flake = false; + octoprint-spoolmanager.url = "github:OllisGit/OctoPrint-SpoolManager"; + octoprint-spoolmanager.flake = false; + + ## mail + private.url = "github:thexyno/nixos-config-private-dummy"; + private.flake = false; + }; outputs = @@ -61,7 +68,6 @@ , agenix , home-manager , impermanence - , mobile-nixos , darwin , utils , emacs-overlay @@ -171,12 +177,6 @@ picard = nixosSystem "x86_64-linux" [ ./hosts/picard/default.nix ]; ds9 = nixosSystem "x86_64-linux" [ ./hosts/ds9/default.nix ]; daedalusvm = nixosSystem "aarch64-linux" [ ./hosts/daedalusvm/default.nix ]; - octopine = nixosSystem "aarch64-linux" [ - ./hosts/octopine/default.nix - (import "${mobile-nixos}/lib/configuration.nix" { - device = "pine64-pinephone"; - }) - ]; }; darwinConfigurations = processConfigurations { daedalus = darwinSystem "aarch64-darwin" [ ./hosts/daedalus/default.nix ]; diff --git a/hosts/daedalus/default.nix b/hosts/daedalus/default.nix index 0c47c26c..4cb6577f 100644 --- a/hosts/daedalus/default.nix +++ b/hosts/daedalus/default.nix @@ -51,6 +51,11 @@ in programs.gnupg.agent.enable = true; home-manager.users.ragon = { pkgs, lib, inputs, config, ... }: { + + imports = [ + "${inputs.private}/mail.nix" + ]; + home.file.".hammerspoon/init.lua".source = pkgs.substituteAll { src = ./hammerspoon.lua; inherit myEmacs; diff --git a/hosts/octopine/default.nix b/hosts/octopine/default.nix deleted file mode 100644 index c3bce3c9..00000000 --- a/hosts/octopine/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, inputs, pkgs, lib, ... }: -with lib; -let - compressLargeArtifacts = false; -in -{ - imports = - [ - ]; - - services.octoprint = { - enable = true; - plugins = plugins: with plugins; [ telegram ]; - }; - - mobile.boot.stage-1.kernel.modular = true; - mobile.generatedFilesystems.rootfs = { - type = "ext4"; - label = "NIXOS_SYSTEM"; - id = "44444444-4444-4444-8888-888888888888"; - populateCommands = - let - closureInfo = pkgs.buildPackages.closureInfo { rootPaths = config.system.build.toplevel; }; - in - '' - mkdir -p ./nix/store - echo "Copying system closure..." - while IFS= read -r path; do - echo " Copying $path" - cp -prf "$path" ./nix/store - done < "${closureInfo}/store-paths" - echo "Done copying system closure..." - cp -v ${closureInfo}/registration ./nix-path-registration - ''; - - # Give some headroom for initial mounting. - extraPadding = pkgs.imageBuilder.size.MiB 600; # without this much of a padding inodes are too small for some reason - - # FIXME: See #117, move compression into the image builder. - # Zstd can take a long time to complete successfully at high compression - # levels. Increasing the compression level could lead to timeouts. - postProcess = optionalString compressLargeArtifacts '' - (PS4=" $ "; set -x - PATH="$PATH:${buildPackages.zstd}/bin" - cd $out - ls -lh - time zstd -10 --rm "$filename" - ls -lh - ) - '' + '' - (PS4=" $ "; set -x - mkdir $out/nix-support - cat < $out/nix-support/hydra-build-products - file rootfs${optionalString compressLargeArtifacts "-zstd"} $out/$filename${optionalString compressLargeArtifacts ".zst"} - EOF - ) - ''; - - zstd = compressLargeArtifacts; - }; - - mobile.boot.stage-1.kernel.additionalModules = [ "ftdi_sio" ]; - networking.wireless.enable = true; - networking.useDHCP = true; - networking.networkmanager.enable = mkForce false; - services.mjpg-streamer.enable = true; - services.mjpg-streamer.inputPlugin = "input_uvc.so -d /dev/video1 -r 1280x720 -f 15 -u"; - services.xserver.desktopManager.phosh.enable = true; - services.xserver.desktopManager.phosh.user = "ragon"; - services.xserver.desktopManager.phosh.group = "wheel"; - services.xserver.displayManager.autoLogin.user = "ragon"; - hardware.opengl.enable = true; - environment.systemPackages = [ pkgs.epiphany ]; - - security.sudo.wheelNeedsPassword = false; - networking.firewall.allowedTCPPorts = [ 5000 5050 ]; - - ragon = { - cli.enable = true; - user.enable = true; - system.security.enable = false; - - services = { - ssh.enable = true; - }; - }; -} diff --git a/packages/scripts/nosrebuild b/packages/scripts/nosrebuild index 66c64421..9811d63f 100755 --- a/packages/scripts/nosrebuild +++ b/packages/scripts/nosrebuild @@ -7,5 +7,5 @@ REV=$(curl https://api.github.com/repos/thexyno/nixos-config/branches/main | jq if [[ $(uname) == "Linux" ]]; then sudo nixos-rebuild switch --flake "github:thexyno/nixos-config?rev=$REV" else # Darwin - /nix/var/nix/profiles/system/sw/bin/darwin-rebuild switch --flake "github:thexyno/nixos-config?rev=$REV" + /nix/var/nix/profiles/system/sw/bin/darwin-rebuild switch --flake "github:thexyno/nixos-config?rev=$REV" --update-input private "git+ssh://git@github.com/thexyno/nixos-config-private" fi