diff options
| author | David Morgan <djm_uk@protonmail.com> | 2025-07-23 15:19:58 +0100 |
|---|---|---|
| committer | David Morgan <djm_uk@protonmail.com> | 2025-07-23 15:19:58 +0100 |
| commit | b971a881c6e9ccae612f55caeea072acb785950a (patch) | |
| tree | 36ff6c0f71f0a5a030d0fc792d6f13463f9eeb68 | |
| parent | 3019f67cd3c9a2e90d69df572792f9325adf8c92 (diff) | |
| download | dotfiles-b971a881c6e9ccae612f55caeea072acb785950a.tar.gz | |
WIP
| -rw-r--r-- | nix-conf/home/TODO | 3 | ||||
| -rw-r--r-- | nix-conf/home/flake.lock | 48 | ||||
| -rw-r--r-- | nix-conf/home/flake.nix | 31 | ||||
| -rw-r--r-- | nix-conf/home/includes/common.nix | 29 | ||||
| -rw-r--r-- | nix-conf/home/otm.nix | 31 |
5 files changed, 113 insertions, 29 deletions
diff --git a/nix-conf/home/TODO b/nix-conf/home/TODO new file mode 100644 index 0000000..a5a749f --- /dev/null +++ b/nix-conf/home/TODO @@ -0,0 +1,3 @@ +- sops channel +- unstable channel +- use /etc/ssl/cert.pem ? diff --git a/nix-conf/home/flake.lock b/nix-conf/home/flake.lock new file mode 100644 index 0000000..92e9af9 --- /dev/null +++ b/nix-conf/home/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753181343, + "narHash": "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0cdfcdbb525b77b951c889b6131047bc374f48fe", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1752950548, + "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix-conf/home/flake.nix b/nix-conf/home/flake.nix new file mode 100644 index 0000000..699bc6f --- /dev/null +++ b/nix-conf/home/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Home Manager configuration of dmorgan"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { nixpkgs, home-manager, ... }: + let + system = "aarch64-darwin"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + homeConfigurations."dmorgan" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./otm.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + }; + }; +} diff --git a/nix-conf/home/includes/common.nix b/nix-conf/home/includes/common.nix index e12558c..3917715 100644 --- a/nix-conf/home/includes/common.nix +++ b/nix-conf/home/includes/common.nix @@ -7,12 +7,12 @@ let hcr = pkgs.callPackage ./scripts/hm-changes-report.nix { inherit config pkgs; }; scr = pkgs.callPackage ./scripts/system-changes-report.nix { inherit config pkgs; }; - unstable = import <unstable> { }; + #unstable = import <unstable> { }; in { imports = [ ./zsh.nix - <sops-nix/modules/home-manager/sops.nix> + #<sops-nix/modules/home-manager/sops.nix> ]; nixpkgs.config.allowUnfreePredicate = @@ -28,15 +28,15 @@ in }; }; - sops = { - age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; - defaultSopsFile = builtins.path { - path = ./secrets.yaml; - name = "home-secrets.yaml"; - }; - secrets."ssh_config/oci" = { }; - secrets."git_email_config/default" = { }; - }; + #sops = { + # age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; + # defaultSopsFile = builtins.path { + # path = ./secrets.yaml; + # name = "home-secrets.yaml"; + # }; + # secrets."ssh_config/oci" = { }; + # secrets."git_email_config/default" = { }; + #}; home.sessionVariables = { LSP_USE_PLISTS = "true"; @@ -106,7 +106,8 @@ in zip zstd - unstable.nixfmt-rfc-style + # TODO + #unstable.nixfmt-rfc-style ]; programs.bat = { @@ -214,7 +215,7 @@ in ''; includes = [ "~/.ssh/config_local" - config.sops.secrets."ssh_config/oci".path + #config.sops.secrets."ssh_config/oci".path ]; matchBlocks = { "djm.ovh" = { @@ -282,7 +283,7 @@ in programs.git = { enable = true; userName = "David Morgan"; - includes = [ { path = config.sops.secrets."git_email_config/default".path; } ]; + #includes = [ { path = config.sops.secrets."git_email_config/default".path; } ]; aliases = { # difftastic logt = "!sh -c 'GIT_EXTERNAL_DIFF=\"difft --background=dark\" git log -p --ext-diff'"; diff --git a/nix-conf/home/otm.nix b/nix-conf/home/otm.nix index 2055780..38ad2b5 100644 --- a/nix-conf/home/otm.nix +++ b/nix-conf/home/otm.nix @@ -91,7 +91,8 @@ let + zscaler-cert; full-cert = - (builtins.readFile /etc/ssl/cert.pem) + aws-cert + internal-cert + internal-staging-cert; + #(builtins.readFile /etc/ssl/cert.pem) + # TODO can this be an input? + aws-cert + internal-cert + internal-staging-cert; zscaler-cert-file = pkgs.writeText "zscaler-cert.pem" zscaler-cert; aws-cert-file = pkgs.writeText "aws-cert.pem" aws-cert; @@ -165,10 +166,10 @@ in ".wgetrc".text = "ca_certificate=${full-cert-file}"; }; - sops.secrets = { - "git_email_config/otm" = { }; - "ssh_config/otm" = { }; - }; + #sops.secrets = { + # "git_email_config/otm" = { }; + # "ssh_config/otm" = { }; + #}; programs.java = { enable = true; @@ -178,15 +179,15 @@ in programs.git = { signing.signByDefault = lib.mkForce false; includes = lib.mkForce [ - { path = config.sops.secrets."git_email_config/otm".path; } - { - path = config.sops.secrets."git_email_config/default".path; - condition = "gitdir:~/src/personal/"; - } - { - path = config.sops.secrets."git_email_config/default".path; - condition = "gitdir:~/dotfiles/"; - } + #{ path = config.sops.secrets."git_email_config/otm".path; } + #{ + # path = config.sops.secrets."git_email_config/default".path; + # condition = "gitdir:~/src/personal/"; + #} + #{ + # path = config.sops.secrets."git_email_config/default".path; + # condition = "gitdir:~/dotfiles/"; + #} { contents = { commit.gpgSign = true; @@ -218,7 +219,7 @@ in ]; }; programs.ssh = { - includes = [ config.sops.secrets."ssh_config/otm".path ]; + #includes = [ config.sops.secrets."ssh_config/otm".path ]; matchBlocks = { "github.com" = lib.mkForce { hostname = "github.com"; |