From d8a88625ef0d9da342ef94dada1d24dfc84c8cc5 Mon Sep 17 00:00:00 2001 From: ark-lamp-umbrella Date: Sun, 21 Apr 2024 22:42:59 -0700 Subject: [PATCH] temporarily satisfy flakes --- {nixos/alacritty => alacritty}/alacritty.nix | 0 nixos/configuration.nix => configuration.nix | 8 +++++++ {nixos/firefox => firefox}/firefox.nix | 0 {nixos/firefox => firefox}/userChrome.css | 0 {nixos/fish => fish}/shellinit.fish | 0 flake.nix | 21 ++++++++++++++++++ nixos/fonts.nix => fonts.nix | 0 ...guration.nix => hardware-configuration.nix | 0 {nixos/hyprland => hyprland}/hyprland.nix | 0 scripts/export.fish | 4 ++-- .../nix-black-4k.png | Bin 11 files changed, 31 insertions(+), 2 deletions(-) rename {nixos/alacritty => alacritty}/alacritty.nix (100%) rename nixos/configuration.nix => configuration.nix (98%) rename {nixos/firefox => firefox}/firefox.nix (100%) rename {nixos/firefox => firefox}/userChrome.css (100%) rename {nixos/fish => fish}/shellinit.fish (100%) create mode 100644 flake.nix rename nixos/fonts.nix => fonts.nix (100%) rename nixos/hardware-configuration.nix => hardware-configuration.nix (100%) rename {nixos/hyprland => hyprland}/hyprland.nix (100%) rename {nixos/wallpapers => wallpapers}/nix-black-4k.png (100%) diff --git a/nixos/alacritty/alacritty.nix b/alacritty/alacritty.nix similarity index 100% rename from nixos/alacritty/alacritty.nix rename to alacritty/alacritty.nix diff --git a/nixos/configuration.nix b/configuration.nix similarity index 98% rename from nixos/configuration.nix rename to configuration.nix index 9b8468f..88c0024 100644 --- a/nixos/configuration.nix +++ b/configuration.nix @@ -16,6 +16,14 @@ in ./fonts.nix (import "${home-manager}/nixos") ]; + + + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/nixos/firefox/firefox.nix b/firefox/firefox.nix similarity index 100% rename from nixos/firefox/firefox.nix rename to firefox/firefox.nix diff --git a/nixos/firefox/userChrome.css b/firefox/userChrome.css similarity index 100% rename from nixos/firefox/userChrome.css rename to firefox/userChrome.css diff --git a/nixos/fish/shellinit.fish b/fish/shellinit.fish similarity index 100% rename from nixos/fish/shellinit.fish rename to fish/shellinit.fish diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..24bff16 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +# /etc/nixos/flake.nix +{ + description = "flake for ark-desktop-nixos"; + + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + }; + + outputs = { self, nixpkgs }: { + nixosConfigurations = { + yourHostNameGoesHere = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ]; + }; + }; + }; +} diff --git a/nixos/fonts.nix b/fonts.nix similarity index 100% rename from nixos/fonts.nix rename to fonts.nix diff --git a/nixos/hardware-configuration.nix b/hardware-configuration.nix similarity index 100% rename from nixos/hardware-configuration.nix rename to hardware-configuration.nix diff --git a/nixos/hyprland/hyprland.nix b/hyprland/hyprland.nix similarity index 100% rename from nixos/hyprland/hyprland.nix rename to hyprland/hyprland.nix diff --git a/scripts/export.fish b/scripts/export.fish index 0f9a3c7..fef684e 100644 --- a/scripts/export.fish +++ b/scripts/export.fish @@ -27,14 +27,14 @@ else logprintn "EXIT" "red" "empty root password" exit 0 end - echo "$rpass" | sudo -S cp -r "nixos/" "/etc/" + echo "$rpass" | sudo -S printf "" set rebuild "$(logprinti "trigger rebuild (Y/n)" "c")" if [ "$rebuild" = "" ] set rebuild "y" end set rebuild "$(string lower $rebuild)" if [ "$rebuild" = "y" ] - sudo fish -c "sudo nixos-rebuild switch" + sudo nixos-rebuild --flake $(pwd) switch logprintn "INFO" "blue" "nixos-rebuild completed" end end diff --git a/nixos/wallpapers/nix-black-4k.png b/wallpapers/nix-black-4k.png similarity index 100% rename from nixos/wallpapers/nix-black-4k.png rename to wallpapers/nix-black-4k.png