diff --git a/flake.lock b/flake.lock index aac1a70..03cab8f 100644 --- a/flake.lock +++ b/flake.lock @@ -5,7 +5,7 @@ "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": [ - "nixpkgs-unstable" + "nixpkgs" ], "rust-overlay": "rust-overlay" }, @@ -213,7 +213,7 @@ "inputs": { "crane": "crane_2", "nixpkgs": [ - "nixpkgs-unstable" + "nixpkgs" ], "wezterm-src": "wezterm-src" }, @@ -304,22 +304,6 @@ "type": "github" } }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1686828063, - "narHash": "sha256-Cv0Sx1N5+3xBDF5OnmFU3Qoh9OqZmXDBKg1fgXlXTWs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "683f2f5ba2ea54abb633d0b17bc9f7f6dede5799", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "locked": { "lastModified": 1686892756, @@ -344,7 +328,6 @@ "nix-darwin": "nix-darwin", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", "sanctureplicum-nur": "sanctureplicum-nur", "sops-nix": "sops-nix" @@ -405,7 +388,7 @@ "sanctureplicum-nur": { "inputs": { "nixpkgs": [ - "nixpkgs-unstable" + "nixpkgs" ] }, "locked": { @@ -425,7 +408,7 @@ "sops-nix": { "inputs": { "nixpkgs": [ - "nixpkgs-unstable" + "nixpkgs" ], "nixpkgs-stable": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 71434ae..57cc73f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,15 +1,14 @@ { inputs = { nixpkgs.url = "nixpkgs/nixpkgs-unstable"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nur.url = "github:nix-community/nur"; sanctureplicum-nur = { url = "git+https://gitea.pid1.sh/sanctureplicum/nur"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; nekowinston-nur = { url = "github:nekowinston/nur"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-23.05"; @@ -18,7 +17,7 @@ sops-nix = { url = "github:Mic92/sops-nix"; inputs = { - nixpkgs.follows = "nixpkgs-unstable"; + nixpkgs.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs"; }; }; @@ -32,7 +31,7 @@ }; crane = { url = "github:ipetkov/crane/v0.11.3"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; emacs-overlay = { url = "github:nix-community/emacs-overlay"; @@ -43,7 +42,6 @@ outputs = { self, nixpkgs, - nixpkgs-unstable, nur, sanctureplicum-nur, nekowinston-nur, @@ -57,24 +55,24 @@ } @ inputs: let overlays = [ (import emacs-overlay) - (final: prev: let - unstable = import nixpkgs-unstable { - system = prev.system; - config.allowUnfree = true; - }; - in { + (final: prev: + # let unstable = import nixpkgs-unstable { + # system = prev.system; + # config.allowUnfree = true; + # }; in + { nur = import nur { - nurpkgs = unstable; - pkgs = unstable; + nurpkgs = prev; + pkgs = prev; repoOverrides = { - nekowinston = import nekowinston-nur {pkgs = unstable;}; + nekowinston = import nekowinston-nur {pkgs = prev;}; sanctureplicum = import sanctureplicum-nur { - pkgs = unstable; - system = unstable.system; + pkgs = prev; + system = prev.system; }; }; }; - inherit unstable; + #inherit unstable; }) ]; in { diff --git a/hosts/common/darwin.nix b/hosts/common/darwin.nix index a947f29..6e1a53f 100644 --- a/hosts/common/darwin.nix +++ b/hosts/common/darwin.nix @@ -1,5 +1,16 @@ -{ config, lib, ... }: { +{ config, lib, pkgs, ... }: { security.pam.enableSudoTouchIdAuth = true; services.nix-daemon.enable = true; + + homebrew = { + enable = true; + casks = [ + "discord" + "firefox-developer-edition" + "alfred" + "ukelele" + ]; + taps = ["homebrew/cask" "homebrew/cask-versions" ]; + }; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index ed56cab..27d01e5 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -23,9 +23,6 @@ with pkgs; { # Maximum number of jobs that Nix will try to build in parallel max-jobs = "auto"; - # Perform builds in a sandboxed environment - sandbox = true; - # Enable flakes experimental-features = ["nix-command" "flakes"]; diff --git a/hosts/hawk/default.nix b/hosts/hawk/default.nix index ebda3fc..53b54fd 100644 --- a/hosts/hawk/default.nix +++ b/hosts/hawk/default.nix @@ -8,6 +8,7 @@ ../common ]; + users.users.carsten.home = "/Users/carsten"; nix.settings.build-cores = 8; networking.hostName = "hawk"; diff --git a/users/carsten/conf/emacs.nix b/users/carsten/conf/emacs.nix index 701c356..3b2b880 100644 --- a/users/carsten/conf/emacs.nix +++ b/users/carsten/conf/emacs.nix @@ -3,8 +3,8 @@ sessionPath = [ "${config.xdg.configHome}/emacs/bin" ]; sessionVariables = { DOOMDIR = "${config.xdg.configHome}/doom"; - DOOMLOCALDIR = "${config.xdg.configHome}/doom-local"; - DOOMPROFILELOADFILE = "${config.xdg.configHome}/doom-local/profiles.el"; + DOOMLOCALDIR = "${config.xdg.dataHome}/doom"; + DOOMPROFILELOADFILE = "${config.xdg.dataHome}/doom/profiles.el"; }; }; systemd.user.sessionVariables = config.home.sessionVariables; @@ -17,25 +17,14 @@ ]; xdg.configFile = { - "doom" = { - source = ./doom; - onChange = "${pkgs.writeShellScript "doom-change" '' - export DOOMDIR="${config.home.sessionVariables.DOOMDIR}" - export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}" - export PATH="${lib.makeBinPath [ pkgs.git ]}:$PATH" - export EMACS="${toString config.home.path}/bin/emacs" - if [ ! -d "$DOOMLOCALDIR" ]; then - ${config.xdg.configHome}/emacs/bin/doom install - else - ${config.xdg.configHome}/emacs/bin/doom sync -e - fi - ''}"; - }; + "doom/config.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/config.el"); + "doom/init.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/init.el"); + "doom/packages.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/packages.el"); "emacs" = { source = pkgs.fetchgit { url = "https://github.com/doomemacs/doomemacs"; - rev = "4e105a95af9c4c7e86471e5566eb7a5ff776ec92"; - sha256 = "sha256-X6kCIc1PU0AZBSDhlyJ2Az3jgC6ZHiAfB2yuHDvIpQ4="; + rev = "07fca786154551f90f36535bfb21f8ca4abd5027"; + sha256 = "sha256-qAI2FbELXIYDMsgMjn19MhYS9WaOxzpcWrATgQW+RP8="; }; onChange = "${pkgs.writeShellScript "doom-change" '' export DOOMDIR="${config.home.sessionVariables.DOOMDIR}" diff --git a/users/carsten/conf/firefox.nix b/users/carsten/conf/firefox.nix index 26cb86c..9580a08 100644 --- a/users/carsten/conf/firefox.nix +++ b/users/carsten/conf/firefox.nix @@ -86,6 +86,7 @@ "extensions.shield-recipe-client.api_url" = ""; "extensions.shield-recipe-client.enabled" = false; "extensions.webservice.discoverURL" = ""; + "full-screen-api.ignore-widgets" = true; "media.autoplay.default" = 1; "media.autoplay.enabled" = false; "media.eme.enabled" = false; diff --git a/users/carsten/default.nix b/users/carsten/default.nix index eddefe5..ba9cd89 100644 --- a/users/carsten/default.nix +++ b/users/carsten/default.nix @@ -5,21 +5,8 @@ ... }: { imports = []; - - users.users.carsten = { - home = if pkgs.stdenv.isDarwin then "/Users/carsten" else "/home/carsten"; - } // lib.mkIf pkgs.stdenv.isLinux { - isNormalUser = true; - description = "Carsten Kragelund"; - hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39"; - shell = pkgs.bash; - packages = []; - extraGroups = [ - "networkmanager" # Use networks - "wheel" # Sudoer - "vboxusers" # VirtualBox - "docker" # Containers - ]; + users.users.carten = { + home = if lib.traceVal pkgs.stdenv.isLinux then "/home/carsten" else lib.traceVal "/Users/carsten"; }; @@ -31,7 +18,7 @@ home = { stateVersion = builtins.trace config.users.users.carsten.home "23.05"; - homeDirectory = lib.mkIf pkgs.stdenv.isLinux "/home/carsten"; + homeDirectory = if pkgs.stdenv.isLinux then "/home/carsten" else lib.mkForce "/Users/carsten"; username = "carsten"; }; }; diff --git a/users/carsten/linux.nix b/users/carsten/linux.nix new file mode 100644 index 0000000..241c4f8 --- /dev/null +++ b/users/carsten/linux.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, ... }: { + config.users.users.carsten = lib.mkIf pkgs.stdenv.isLinux { + isNormalUser = true; + description = "Carsten Kragelund"; + hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39"; + shell = pkgs.bash; + extraGroups = [ + "networkmanager" # Use networks + "wheel" # Sudoer + "vboxusers" # VirtualBox + "docker" # Containers + ]; + }; +} diff --git a/users/carsten/pkgs/default.nix b/users/carsten/pkgs/default.nix index a35b72c..841e437 100644 --- a/users/carsten/pkgs/default.nix +++ b/users/carsten/pkgs/default.nix @@ -52,7 +52,6 @@ rust-analyzer ] ++ lib.lists.optionals (osConfig.graphical or true) [ - (discord.override {withOpenASAR = true;}) recursive # Local (callPackage ./areon-pro {}) @@ -60,6 +59,7 @@ pkgs.nur.repos.sanctureplicum.rec-mono-nyx ] ++ lib.lists.optionals (osConfig.graphical or true && pkgs.stdenv.isLinux) [ + (discord.override {withOpenASAR = true;}) catppuccin-gtk pavucontrol dconf diff --git a/users/carsten/pkgs/editors.nix b/users/carsten/pkgs/editors.nix index 9c87628..ae3ba81 100644 --- a/users/carsten/pkgs/editors.nix +++ b/users/carsten/pkgs/editors.nix @@ -2,6 +2,6 @@ programs.neovim.enable = true; programs.emacs = { enable = true; - package = pkgs.emacsUnstable; + package = pkgs.emacs; }; }